blob: 2616dea5192e46bb97039347fc9308733d16a460 [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
Darin Petkovceb68172011-07-29 14:47:48 -07008#include <dbus-c++/types.h>
9
Darin Petkove9d12e02011-07-27 15:09:37 -070010namespace shill {
11
12// These are the methods that a ModemManager.Modem proxy must support. The
13// interface is provided so that it can be mocked in tests.
14class ModemProxyInterface {
15 public:
Darin Petkovceb68172011-07-29 14:47:48 -070016 typedef DBus::Struct<std::string, std::string, std::string> Info;
17
Darin Petkove9d12e02011-07-27 15:09:37 -070018 virtual ~ModemProxyInterface() {}
19
20 virtual void Enable(const bool enable) = 0;
Darin Petkovceb68172011-07-29 14:47:48 -070021 virtual Info GetInfo() = 0;
Darin Petkove9d12e02011-07-27 15:09:37 -070022};
23
Darin Petkovc5f56562011-08-06 16:40:05 -070024// ModemManager.Modem signal listener to be associated with the proxy.
25class ModemProxyListener {
26 public:
27 virtual ~ModemProxyListener() {}
28
29 virtual void OnModemStateChanged(uint32 old_state,
30 uint32 new_state,
31 uint32 reason) = 0;
32};
33
Darin Petkove9d12e02011-07-27 15:09:37 -070034} // namespace shill
35
36#endif // SHILL_MODEM_PROXY_INTERFACE_