blob: e87bc45808c46bfbbd006400b7747487ad6b5a2b [file] [log] [blame]
Chris Masoned7732e42011-05-20 11:08:56 -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#include "shill/manager_dbus_adaptor.h"
6
7#include <map>
8#include <string>
9
Chris Masone7ccc8192011-05-24 14:54:49 -070010#include <base/logging.h>
11
Chris Masoned7732e42011-05-20 11:08:56 -070012using std::map;
13using std::string;
14
15namespace shill {
16
Chris Masoned7732e42011-05-20 11:08:56 -070017// static
18const char ManagerDBusAdaptor::kInterfaceName[] = SHILL_INTERFACE;
Chris Masoned7732e42011-05-20 11:08:56 -070019// static
20const char ManagerDBusAdaptor::kPath[] = SHILL_PATH "/Manager";
21
Chris Masoned0ceb8c2011-06-02 10:05:39 -070022ManagerDBusAdaptor::ManagerDBusAdaptor(DBus::Connection* conn, Manager *manager)
Chris Masoned7732e42011-05-20 11:08:56 -070023 : DBusAdaptor(conn, kPath),
24 manager_(manager) {
25}
Chris Masoneec6b18b2011-06-08 14:09:10 -070026
27ManagerDBusAdaptor::~ManagerDBusAdaptor() {
28 manager_ = NULL;
29}
Chris Masoned7732e42011-05-20 11:08:56 -070030
31void ManagerDBusAdaptor::UpdateRunning() {}
32
Chris Masoned0ceb8c2011-06-02 10:05:39 -070033void ManagerDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) {
34 PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
35}
36
37void ManagerDBusAdaptor::EmitUintChanged(const std::string& name,
38 uint32 value) {
39 PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value));
40}
41
42void ManagerDBusAdaptor::EmitIntChanged(const std::string& name, int value) {
43 PropertyChanged(name, DBusAdaptor::IntToVariant(value));
44}
45
46void ManagerDBusAdaptor::EmitStringChanged(const std::string& name,
47 const std::string& value) {
48 PropertyChanged(name, DBusAdaptor::StringToVariant(value));
49}
50
51void ManagerDBusAdaptor::EmitStateChanged(const std::string& new_state) {
52 StateChanged(new_state);
53}
54
Chris Masoned7732e42011-05-20 11:08:56 -070055map<string, ::DBus::Variant> ManagerDBusAdaptor::GetProperties(
56 ::DBus::Error &error) {
57 return map<string, ::DBus::Variant>();
58}
59
60void ManagerDBusAdaptor::SetProperty(const string& name,
61 const ::DBus::Variant& value,
62 ::DBus::Error &error) {
63}
64
65string ManagerDBusAdaptor::GetState(::DBus::Error &error) {
66 return string();
67}
68
69::DBus::Path ManagerDBusAdaptor::CreateProfile(const string& name,
70 ::DBus::Error &error) {
71 return ::DBus::Path();
72}
73
74void ManagerDBusAdaptor::RemoveProfile(const ::DBus::Path& path,
75 ::DBus::Error &error) {
76}
77
78void ManagerDBusAdaptor::RequestScan(const string& ,
79 ::DBus::Error &error) {
80}
81
82void ManagerDBusAdaptor::EnableTechnology(const string& ,
83 ::DBus::Error &error) {
84}
85
86void ManagerDBusAdaptor::DisableTechnology(const string& ,
87 ::DBus::Error &error) {
88}
89
90::DBus::Path ManagerDBusAdaptor::GetService(
91 const map<string, ::DBus::Variant>& ,
92 ::DBus::Error &error) {
93 return ::DBus::Path();
94}
95
96::DBus::Path ManagerDBusAdaptor::GetWifiService(
97 const map<string, ::DBus::Variant>& ,
98 ::DBus::Error &error) {
99 return ::DBus::Path();
100}
101
102void ManagerDBusAdaptor::ConfigureWifiService(
103 const map<string, ::DBus::Variant>& ,
104 ::DBus::Error &error) {
105}
106
107void ManagerDBusAdaptor::RegisterAgent(const ::DBus::Path& ,
108 ::DBus::Error &error) {
109}
110
111void ManagerDBusAdaptor::UnregisterAgent(const ::DBus::Path& ,
112 ::DBus::Error &error) {
113}
114
Chris Masone7ccc8192011-05-24 14:54:49 -0700115int32_t ManagerDBusAdaptor::GetDebugLevel(::DBus::Error &error) {
116 return logging::GetMinLogLevel();
Chris Masoned7732e42011-05-20 11:08:56 -0700117}
118
Chris Masone7ccc8192011-05-24 14:54:49 -0700119void ManagerDBusAdaptor::SetDebugLevel(const int32_t& level,
Chris Masoned7732e42011-05-20 11:08:56 -0700120 ::DBus::Error &error) {
Chris Masone7ccc8192011-05-24 14:54:49 -0700121 if (level < logging::LOG_NUM_SEVERITIES)
122 logging::SetMinLogLevel(level);
123 else
124 LOG(WARNING) << "Ignoring attempt to set log level to " << level;
Chris Masoned7732e42011-05-20 11:08:56 -0700125}
126
127string ManagerDBusAdaptor::GetServiceOrder(::DBus::Error &error) {
128 return string();
129}
130
131void ManagerDBusAdaptor::SetServiceOrder(const string& ,
132 ::DBus::Error &error) {
133}
134
135} // namespace shill