blob: 9654c3e1a1c6641601368b011e7a39641a395b9f [file] [log] [blame]
Darin Petkove9d12e02011-07-27 15:09:37 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_MODEM_PROXY_INTERFACE_
6#define SHILL_MODEM_PROXY_INTERFACE_
7
Hristo Stefanoved2c28c2011-11-29 15:37:30 -08008#include <string>
9
Darin Petkovceb68172011-07-29 14:47:48 -070010#include <dbus-c++/types.h>
11
Darin Petkove9d12e02011-07-27 15:09:37 -070012namespace shill {
13
14// These are the methods that a ModemManager.Modem proxy must support. The
15// interface is provided so that it can be mocked in tests.
16class ModemProxyInterface {
17 public:
Darin Petkovceb68172011-07-29 14:47:48 -070018 typedef DBus::Struct<std::string, std::string, std::string> Info;
19
Darin Petkove9d12e02011-07-27 15:09:37 -070020 virtual ~ModemProxyInterface() {}
21
22 virtual void Enable(const bool enable) = 0;
Darin Petkovceb68172011-07-29 14:47:48 -070023 virtual Info GetInfo() = 0;
Darin Petkove9d12e02011-07-27 15:09:37 -070024};
25
Darin Petkov580c7af2011-10-24 12:32:50 +020026// ModemManager.Modem signal delegate to be associated with the proxy.
27class ModemProxyDelegate {
Darin Petkovc5f56562011-08-06 16:40:05 -070028 public:
Darin Petkov580c7af2011-10-24 12:32:50 +020029 virtual ~ModemProxyDelegate() {}
Darin Petkovc5f56562011-08-06 16:40:05 -070030
31 virtual void OnModemStateChanged(uint32 old_state,
32 uint32 new_state,
33 uint32 reason) = 0;
34};
35
Darin Petkove9d12e02011-07-27 15:09:37 -070036} // namespace shill
37
38#endif // SHILL_MODEM_PROXY_INTERFACE_