Darin Petkov | 5c97ac5 | 2011-07-19 16:30:49 -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 SHILL_DBUS_PROPERTIES_PROXY_INTERFACE_ |
| 6 | #define SHILL_DBUS_PROPERTIES_PROXY_INTERFACE_ |
| 7 | |
Darin Petkov | c5f5656 | 2011-08-06 16:40:05 -0700 | [diff] [blame] | 8 | #include <vector> |
| 9 | |
Darin Petkov | e0a312e | 2011-07-20 13:45:28 -0700 | [diff] [blame] | 10 | #include "shill/dbus_properties.h" |
Darin Petkov | 5c97ac5 | 2011-07-19 16:30:49 -0700 | [diff] [blame] | 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | // These are the methods that a DBusProperties proxy must support. The interface |
| 15 | // is provided so that it can be mocked in tests. |
| 16 | class DBusPropertiesProxyInterface { |
| 17 | public: |
| 18 | virtual ~DBusPropertiesProxyInterface() {} |
| 19 | |
Darin Petkov | e0a312e | 2011-07-20 13:45:28 -0700 | [diff] [blame] | 20 | virtual DBusPropertiesMap GetAll(const std::string &interface_name) = 0; |
Darin Petkov | 5c97ac5 | 2011-07-19 16:30:49 -0700 | [diff] [blame] | 21 | }; |
| 22 | |
Darin Petkov | 580c7af | 2011-10-24 12:32:50 +0200 | [diff] [blame] | 23 | // DBus.Properties signal delegate to be associated with the proxy. |
| 24 | class DBusPropertiesProxyDelegate { |
Darin Petkov | c5f5656 | 2011-08-06 16:40:05 -0700 | [diff] [blame] | 25 | public: |
Darin Petkov | 580c7af | 2011-10-24 12:32:50 +0200 | [diff] [blame] | 26 | virtual ~DBusPropertiesProxyDelegate() {} |
Darin Petkov | c5f5656 | 2011-08-06 16:40:05 -0700 | [diff] [blame] | 27 | |
| 28 | virtual void OnDBusPropertiesChanged( |
| 29 | const std::string &interface, |
| 30 | const DBusPropertiesMap &changed_properties, |
| 31 | const std::vector<std::string> &invalidated_properties) = 0; |
| 32 | |
| 33 | virtual void OnModemManagerPropertiesChanged( |
| 34 | const std::string &interface, |
| 35 | const DBusPropertiesMap &properties) = 0; |
| 36 | }; |
| 37 | |
Darin Petkov | 5c97ac5 | 2011-07-19 16:30:49 -0700 | [diff] [blame] | 38 | } // namespace shill |
| 39 | |
| 40 | #endif // SHILL_DBUS_PROPERTIES_PROXY_INTERFACE_ |