blob: 5051f5a25822b2a69f1dfe113e206f7640d44a70 [file] [log] [blame]
mukesh agrawalaf571952011-07-14 14:31:12 -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 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 Petkov4a09b6b2011-07-19 12:52:06 -070013#include "shill/dbus_bindings/supplicant-process.h"
14#include "shill/supplicant_process_proxy_interface.h"
mukesh agrawalaf571952011-07-14 14:31:12 -070015
16namespace shill {
17
18class SupplicantProcessProxy : public SupplicantProcessProxyInterface {
19 public:
Darin Petkovaceede32011-07-18 15:32:38 -070020 SupplicantProcessProxy(DBus::Connection *bus,
21 const char *dbus_path,
22 const char *dbus_addr);
mukesh agrawalaf571952011-07-14 14:31:12 -070023 virtual ~SupplicantProcessProxy();
Darin Petkovaceede32011-07-18 15:32:38 -070024
mukesh agrawalaf571952011-07-14 14:31:12 -070025 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 Petkovaceede32011-07-18 15:32:38 -070034 Proxy(DBus::Connection *bus, const char *dbus_path, const char *dbus_addr);
mukesh agrawalaf571952011-07-14 14:31:12 -070035 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 agrawalaf571952011-07-14 14:31:12 -070050 Proxy proxy_;
51
52 DISALLOW_COPY_AND_ASSIGN(SupplicantProcessProxy);
mukesh agrawalaf571952011-07-14 14:31:12 -070053};
54
55} // namespace shill
56
57#endif // SUPPLICANT_PROCESS_PROXY_H_