blob: f3ab2396c18a2ceec4f22a2ec3767058e601664d [file] [log] [blame]
Darin Petkov5c97ac52011-07-19 16:30:49 -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_DBUS_PROPERTIES_PROXY_
6#define SHILL_DBUS_PROPERTIES_PROXY_
7
8#include <base/basictypes.h>
9
10#include "shill/dbus_bindings/dbus-properties.h"
11#include "shill/dbus_properties_proxy_interface.h"
12
13namespace shill {
14
15class Modem;
16
17class DBusPropertiesProxy : public DBusPropertiesProxyInterface {
18 public:
19 DBusPropertiesProxy(DBus::Connection *connection,
20 Modem *modem,
21 const std::string &path,
22 const std::string &service);
23 virtual ~DBusPropertiesProxy();
24
25 // Inherited from DBusPropertiesProxyInterface.
Darin Petkove0a312e2011-07-20 13:45:28 -070026 virtual DBusPropertiesMap GetAll(const std::string &interface_name);
Darin Petkov5c97ac52011-07-19 16:30:49 -070027
28 private:
29 class Proxy : public org::freedesktop::DBus::Properties_proxy,
30 public DBus::ObjectProxy {
31 public:
32 Proxy(DBus::Connection *connection,
33 Modem *modem,
34 const std::string &path,
35 const std::string &service);
36 virtual ~Proxy();
37
38 private:
39 // Signal callbacks inherited from DBusProperties_proxy.
Darin Petkove0a312e2011-07-20 13:45:28 -070040 virtual void MmPropertiesChanged(const std::string &interface,
41 const DBusPropertiesMap &properties);
Darin Petkov5c97ac52011-07-19 16:30:49 -070042
43 virtual void PropertiesChanged(
44 const std::string &interface,
Darin Petkove0a312e2011-07-20 13:45:28 -070045 const DBusPropertiesMap &changed_properties,
Darin Petkov5c97ac52011-07-19 16:30:49 -070046 const std::vector<std::string> &invalidated_properties);
47
48 Modem *modem_;
49
50 DISALLOW_COPY_AND_ASSIGN(Proxy);
51 };
52
53 Proxy proxy_;
54
55 DISALLOW_COPY_AND_ASSIGN(DBusPropertiesProxy);
56};
57
58} // namespace shill
59
60#endif // SHILL_DBUS_PROPERTIES_PROXY_