blob: 2c2278eb4f3a912b122aa099a5236e5d33a2ca34 [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_INTERFACE_
6#define SHILL_DBUS_PROPERTIES_PROXY_INTERFACE_
7
Darin Petkovc5f56562011-08-06 16:40:05 -07008#include <vector>
9
Jason Glasgow9c09e362012-04-18 15:16:29 -040010#include <base/callback.h>
11
Darin Petkove0a312e2011-07-20 13:45:28 -070012#include "shill/dbus_properties.h"
Darin Petkov5c97ac52011-07-19 16:30:49 -070013
14namespace shill {
15
16// These are the methods that a DBusProperties proxy must support. The interface
17// is provided so that it can be mocked in tests.
18class DBusPropertiesProxyInterface {
19 public:
Jason Glasgow9c09e362012-04-18 15:16:29 -040020 // Callback invoked when an object sends a DBus property change signal.
21 typedef base::Callback<void(
22 const std::string &interface,
23 const DBusPropertiesMap &changed_properties,
24 const std::vector<std::string> &invalidated_properties)>
25 PropertiesChangedCallback;
26
27 // Callback invoked when the classic modem manager sends a DBus
28 // property change signal.
29 typedef base::Callback<void(
30 const std::string &interface,
31 const DBusPropertiesMap &properties)>
32 ModemManagerPropertiesChangedCallback;
33
Darin Petkov5c97ac52011-07-19 16:30:49 -070034 virtual ~DBusPropertiesProxyInterface() {}
35
Darin Petkove0a312e2011-07-20 13:45:28 -070036 virtual DBusPropertiesMap GetAll(const std::string &interface_name) = 0;
Darin Petkov5c97ac52011-07-19 16:30:49 -070037
Jason Glasgow9c09e362012-04-18 15:16:29 -040038 virtual void set_properties_changed_callback(
39 const PropertiesChangedCallback &callback) = 0;
40 virtual void set_modem_manager_properties_changed_callback(
41 const ModemManagerPropertiesChangedCallback &callback) = 0;
Darin Petkovc5f56562011-08-06 16:40:05 -070042};
43
Darin Petkov5c97ac52011-07-19 16:30:49 -070044} // namespace shill
45
46#endif // SHILL_DBUS_PROPERTIES_PROXY_INTERFACE_