blob: 381256db730ca197b8b6f3190fa4b55e4baea443 [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}
26ManagerDBusAdaptor::~ManagerDBusAdaptor() {}
27
28void ManagerDBusAdaptor::UpdateRunning() {}
29
Chris Masoned0ceb8c2011-06-02 10:05:39 -070030void ManagerDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) {
31 PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
32}
33
34void ManagerDBusAdaptor::EmitUintChanged(const std::string& name,
35 uint32 value) {
36 PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value));
37}
38
39void ManagerDBusAdaptor::EmitIntChanged(const std::string& name, int value) {
40 PropertyChanged(name, DBusAdaptor::IntToVariant(value));
41}
42
43void ManagerDBusAdaptor::EmitStringChanged(const std::string& name,
44 const std::string& value) {
45 PropertyChanged(name, DBusAdaptor::StringToVariant(value));
46}
47
48void ManagerDBusAdaptor::EmitStateChanged(const std::string& new_state) {
49 StateChanged(new_state);
50}
51
Chris Masoned7732e42011-05-20 11:08:56 -070052map<string, ::DBus::Variant> ManagerDBusAdaptor::GetProperties(
53 ::DBus::Error &error) {
54 return map<string, ::DBus::Variant>();
55}
56
57void ManagerDBusAdaptor::SetProperty(const string& name,
58 const ::DBus::Variant& value,
59 ::DBus::Error &error) {
60}
61
62string ManagerDBusAdaptor::GetState(::DBus::Error &error) {
63 return string();
64}
65
66::DBus::Path ManagerDBusAdaptor::CreateProfile(const string& name,
67 ::DBus::Error &error) {
68 return ::DBus::Path();
69}
70
71void ManagerDBusAdaptor::RemoveProfile(const ::DBus::Path& path,
72 ::DBus::Error &error) {
73}
74
75void ManagerDBusAdaptor::RequestScan(const string& ,
76 ::DBus::Error &error) {
77}
78
79void ManagerDBusAdaptor::EnableTechnology(const string& ,
80 ::DBus::Error &error) {
81}
82
83void ManagerDBusAdaptor::DisableTechnology(const string& ,
84 ::DBus::Error &error) {
85}
86
87::DBus::Path ManagerDBusAdaptor::GetService(
88 const map<string, ::DBus::Variant>& ,
89 ::DBus::Error &error) {
90 return ::DBus::Path();
91}
92
93::DBus::Path ManagerDBusAdaptor::GetWifiService(
94 const map<string, ::DBus::Variant>& ,
95 ::DBus::Error &error) {
96 return ::DBus::Path();
97}
98
99void ManagerDBusAdaptor::ConfigureWifiService(
100 const map<string, ::DBus::Variant>& ,
101 ::DBus::Error &error) {
102}
103
104void ManagerDBusAdaptor::RegisterAgent(const ::DBus::Path& ,
105 ::DBus::Error &error) {
106}
107
108void ManagerDBusAdaptor::UnregisterAgent(const ::DBus::Path& ,
109 ::DBus::Error &error) {
110}
111
Chris Masone7ccc8192011-05-24 14:54:49 -0700112int32_t ManagerDBusAdaptor::GetDebugLevel(::DBus::Error &error) {
113 return logging::GetMinLogLevel();
Chris Masoned7732e42011-05-20 11:08:56 -0700114}
115
Chris Masone7ccc8192011-05-24 14:54:49 -0700116void ManagerDBusAdaptor::SetDebugLevel(const int32_t& level,
Chris Masoned7732e42011-05-20 11:08:56 -0700117 ::DBus::Error &error) {
Chris Masone7ccc8192011-05-24 14:54:49 -0700118 if (level < logging::LOG_NUM_SEVERITIES)
119 logging::SetMinLogLevel(level);
120 else
121 LOG(WARNING) << "Ignoring attempt to set log level to " << level;
Chris Masoned7732e42011-05-20 11:08:56 -0700122}
123
124string ManagerDBusAdaptor::GetServiceOrder(::DBus::Error &error) {
125 return string();
126}
127
128void ManagerDBusAdaptor::SetServiceOrder(const string& ,
129 ::DBus::Error &error) {
130}
131
132} // namespace shill