mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 1 | // 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 SUPPLICANT_PROCESS_PROXY_H_ |
| 6 | #define SUPPLICANT_PROCESS_PROXY_H_ |
| 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | |
Darin Petkov | 4a09b6b | 2011-07-19 12:52:06 -0700 | [diff] [blame^] | 13 | #include "shill/dbus_bindings/supplicant-process.h" |
| 14 | #include "shill/supplicant_process_proxy_interface.h" |
mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 15 | |
| 16 | namespace shill { |
| 17 | |
| 18 | class SupplicantProcessProxy : public SupplicantProcessProxyInterface { |
| 19 | public: |
Darin Petkov | aceede3 | 2011-07-18 15:32:38 -0700 | [diff] [blame] | 20 | SupplicantProcessProxy(DBus::Connection *bus, |
| 21 | const char *dbus_path, |
| 22 | const char *dbus_addr); |
mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 23 | virtual ~SupplicantProcessProxy(); |
Darin Petkov | aceede3 | 2011-07-18 15:32:38 -0700 | [diff] [blame] | 24 | |
mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 25 | virtual ::DBus::Path CreateInterface( |
| 26 | const std::map<std::string, ::DBus::Variant> &args); |
| 27 | virtual void RemoveInterface(const ::DBus::Path &path); |
| 28 | virtual ::DBus::Path GetInterface(const std::string &ifname); |
| 29 | |
| 30 | private: |
| 31 | class Proxy : public fi::w1::wpa_supplicant1_proxy, |
| 32 | public ::DBus::ObjectProxy { |
| 33 | public: |
Darin Petkov | aceede3 | 2011-07-18 15:32:38 -0700 | [diff] [blame] | 34 | Proxy(DBus::Connection *bus, const char *dbus_path, const char *dbus_addr); |
mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 35 | virtual ~Proxy(); |
| 36 | |
| 37 | private: |
| 38 | // signal handlers called by dbus-c++, via |
| 39 | // wpa_supplicant1_proxy interface. |
| 40 | virtual void InterfaceAdded( |
| 41 | const ::DBus::Path &path, |
| 42 | const std::map<std::string, ::DBus::Variant> &properties); |
| 43 | virtual void InterfaceRemoved(const ::DBus::Path &path); |
| 44 | virtual void PropertiesChanged( |
| 45 | const std::map<std::string, ::DBus::Variant> &properties); |
| 46 | |
| 47 | DISALLOW_COPY_AND_ASSIGN(Proxy); |
| 48 | }; |
| 49 | |
mukesh agrawal | af57195 | 2011-07-14 14:31:12 -0700 | [diff] [blame] | 50 | Proxy proxy_; |
| 51 | |
| 52 | DISALLOW_COPY_AND_ASSIGN(SupplicantProcessProxy); |
| 53 | |
| 54 | }; |
| 55 | |
| 56 | } // namespace shill |
| 57 | |
| 58 | #endif // SUPPLICANT_PROCESS_PROXY_H_ |