Darin Petkov | 096b347 | 2012-05-15 10:26: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_WIMAX_MANAGER_PROXY_H_ |
| 6 | #define SHILL_WIMAX_MANAGER_PROXY_H_ |
| 7 | |
| 8 | #include <vector> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
| 12 | #include "shill/dbus_bindings/wimax_manager.h" |
| 13 | #include "shill/wimax_manager_proxy_interface.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class WiMaxManagerProxy : public WiMaxManagerProxyInterface { |
| 18 | public: |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 19 | explicit WiMaxManagerProxy(DBus::Connection *connection); |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 20 | virtual ~WiMaxManagerProxy(); |
| 21 | |
| 22 | // Inherited from WiMaxManagerProxyInterface. |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 23 | virtual void set_devices_changed_callback( |
| 24 | const DevicesChangedCallback &callback); |
| 25 | virtual RpcIdentifiers Devices(Error *error); |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 26 | |
| 27 | private: |
| 28 | class Proxy : public org::chromium::WiMaxManager_proxy, |
| 29 | public DBus::ObjectProxy { |
| 30 | public: |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 31 | explicit Proxy(DBus::Connection *connection); |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 32 | virtual ~Proxy(); |
| 33 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 34 | void set_devices_changed_callback(const DevicesChangedCallback &callback); |
| 35 | |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 36 | private: |
| 37 | // Signal callbacks inherited from WiMaxManager_proxy. |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 38 | virtual void DevicesChanged(const std::vector<DBus::Path> &devices); |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 39 | |
| 40 | // Method callbacks inherited from WiMaxManager_proxy. |
| 41 | // [None] |
| 42 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 43 | DevicesChangedCallback devices_changed_callback_; |
| 44 | |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 45 | DISALLOW_COPY_AND_ASSIGN(Proxy); |
| 46 | }; |
| 47 | |
| 48 | Proxy proxy_; |
| 49 | |
| 50 | DISALLOW_COPY_AND_ASSIGN(WiMaxManagerProxy); |
| 51 | }; |
| 52 | |
| 53 | } // namespace shill |
| 54 | |
| 55 | #endif // SHILL_WIMAX_MANAGER_PROXY_H_ |