Chris Masone | d7732e4 | 2011-05-20 11:08:56 -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_MANAGER_DBUS_ADAPTOR_H_ |
| 6 | #define SHILL_MANAGER_DBUS_ADAPTOR_H_ |
| 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | |
| 13 | #include "shill/adaptor_interfaces.h" |
| 14 | #include "shill/dbus_adaptor.h" |
| 15 | #include "shill/flimflam-manager.h" |
| 16 | |
| 17 | namespace shill { |
| 18 | class Manager; |
| 19 | |
| 20 | // Subclass of DBusAdaptor for Manager objects |
| 21 | class ManagerDBusAdaptor : public org::chromium::flimflam::Manager_adaptor, |
| 22 | public DBusAdaptor, |
| 23 | public ManagerAdaptorInterface { |
| 24 | public: |
| 25 | static const char kInterfaceName[]; |
| 26 | static const char kPath[]; |
| 27 | |
| 28 | ManagerDBusAdaptor(DBus::Connection& conn, Manager *manager); |
| 29 | virtual ~ManagerDBusAdaptor(); |
| 30 | void UpdateRunning(); |
| 31 | |
| 32 | // Implementation of Manager_adaptor |
| 33 | std::map<std::string, ::DBus::Variant> GetProperties(::DBus::Error &error); |
| 34 | void SetProperty(const std::string& name, |
| 35 | const ::DBus::Variant& value, |
| 36 | ::DBus::Error &error); |
| 37 | std::string GetState(::DBus::Error &error); |
| 38 | ::DBus::Path CreateProfile(const std::string& name, ::DBus::Error &error); |
| 39 | void RemoveProfile(const ::DBus::Path& path, ::DBus::Error &error); |
| 40 | void RequestScan(const std::string& , ::DBus::Error &error); |
| 41 | |
| 42 | void EnableTechnology(const std::string& , ::DBus::Error &error); |
| 43 | void DisableTechnology(const std::string& , ::DBus::Error &error); |
| 44 | |
| 45 | ::DBus::Path GetService(const std::map<std::string, ::DBus::Variant>& , |
| 46 | ::DBus::Error &error); |
| 47 | ::DBus::Path GetWifiService(const std::map<std::string, ::DBus::Variant>& , |
| 48 | ::DBus::Error &error); |
| 49 | void ConfigureWifiService(const std::map<std::string, ::DBus::Variant>& , |
| 50 | ::DBus::Error &error); |
| 51 | |
| 52 | void RegisterAgent(const ::DBus::Path& , ::DBus::Error &error); |
| 53 | void UnregisterAgent(const ::DBus::Path& , ::DBus::Error &error); |
| 54 | |
| 55 | std::string GetDebugTags(::DBus::Error &error); |
| 56 | void SetDebugTags(const std::string& , ::DBus::Error &error); |
| 57 | std::string ListDebugTags(::DBus::Error &error); |
| 58 | uint32_t GetDebugMask(::DBus::Error &error); |
| 59 | void SetDebugMask(const uint32_t& , ::DBus::Error &error); |
| 60 | |
| 61 | std::string GetServiceOrder(::DBus::Error &error); |
| 62 | void SetServiceOrder(const std::string& , ::DBus::Error &error); |
| 63 | |
| 64 | private: |
| 65 | Manager *manager_; |
| 66 | DISALLOW_COPY_AND_ASSIGN(ManagerDBusAdaptor); |
| 67 | }; |
| 68 | |
| 69 | } // namespace shill |
| 70 | #endif // SHILL_MANAGER_DBUS_ADAPTOR_H_ |