Darin Petkov | c37a9c4 | 2012-09-06 15:28:22 +0200 | [diff] [blame] | 1 | // Copyright (c) 2012 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_GOBI_PROXY_H_ |
| 6 | #define SHILL_MODEM_GOBI_PROXY_H_ |
| 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | |
| 10 | #include "shill/dbus_bindings/modem-gobi.h" |
| 11 | #include "shill/modem_gobi_proxy_interface.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class ModemGobiProxy : public ModemGobiProxyInterface { |
| 16 | public: |
| 17 | // Constructs a ModemManager.Modem.Gobi DBus object proxy at |path| owned by |
| 18 | // |service|. |
| 19 | ModemGobiProxy(DBus::Connection *connection, |
| 20 | const std::string &path, |
| 21 | const std::string &service); |
| 22 | virtual ~ModemGobiProxy(); |
| 23 | |
| 24 | // Inherited from ModemGobiProxyInterface. |
| 25 | virtual void SetCarrier(const std::string &carrier, |
| 26 | Error *error, const ResultCallback &callback, |
| 27 | int timeout); |
| 28 | |
| 29 | private: |
| 30 | class Proxy |
| 31 | : public org::chromium::ModemManager::Modem::Gobi_proxy, |
| 32 | public DBus::ObjectProxy { |
| 33 | public: |
| 34 | Proxy(DBus::Connection *connection, |
| 35 | const std::string &path, |
| 36 | const std::string &service); |
| 37 | virtual ~Proxy(); |
| 38 | |
| 39 | private: |
| 40 | // Signal callbacks inherited from ModemManager::Modem::Gobi_proxy. |
| 41 | // [None] |
| 42 | |
| 43 | // Method callbacks inherited from ModemManager::Modem::Gobi_proxy. |
| 44 | virtual void SetCarrierCallback(const DBus::Error &dberror, void *data); |
| 45 | |
| 46 | DISALLOW_COPY_AND_ASSIGN(Proxy); |
| 47 | }; |
| 48 | |
| 49 | Proxy proxy_; |
| 50 | |
| 51 | DISALLOW_COPY_AND_ASSIGN(ModemGobiProxy); |
| 52 | }; |
| 53 | |
| 54 | } // namespace shill |
| 55 | |
| 56 | #endif // SHILL_MODEM_GOBI_PROXY_H_ |