blob: 490867178920c2e5c395a9fa1158f9eb25b92ba9 [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_
6#define SHILL_MODEM_PROXY_
7
8#include <base/basictypes.h>
9
10#include "shill/dbus_bindings/modem.h"
11#include "shill/modem_proxy_interface.h"
12
13namespace shill {
14
15// There's a single proxy per ModemManager.Modem service identified by its DBus
16// |path| and owner name |service|.
17class ModemProxy : public ModemProxyInterface {
18 public:
19 ModemProxy(DBus::Connection *connection,
20 const std::string &path,
21 const std::string &service);
22 virtual ~ModemProxy();
23
24 // Inherited from ModemProxyInterface.
25 virtual void Enable(const bool enable);
26
27 private:
28 class Proxy : public org::freedesktop::ModemManager::Modem_proxy,
29 public DBus::ObjectProxy {
30 public:
31 Proxy(DBus::Connection *connection,
32 const std::string &path,
33 const std::string &service);
34 virtual ~Proxy();
35
36 private:
37 // Signal callbacks inherited from ModemManager::Modem_proxy.
38 virtual void StateChanged(const uint32 &old_state,
39 const uint32 &new_state,
40 const uint32 &reason);
41
42 DISALLOW_COPY_AND_ASSIGN(Proxy);
43 };
44
45 Proxy proxy_;
46
47 DISALLOW_COPY_AND_ASSIGN(ModemProxy);
48};
49
50} // namespace shill
51
52#endif // SHILL_MODEM_PROXY_