blob: 8241ac7ae06b7e047cba95bf9cb721c9b640f218 [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/service_dbus_adaptor.h"
6
7#include <map>
8#include <string>
9
Chris Masonea82b7112011-05-25 15:16:29 -070010#include "shill/service.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 ServiceDBusAdaptor::kInterfaceName[] = SHILL_INTERFACE;
Chris Masoned7732e42011-05-20 11:08:56 -070019// static
Chris Masonea82b7112011-05-25 15:16:29 -070020const char ServiceDBusAdaptor::kPath[] = "/service/";
Chris Masoned7732e42011-05-20 11:08:56 -070021
Chris Masoneec6b18b2011-06-08 14:09:10 -070022ServiceDBusAdaptor::ServiceDBusAdaptor(DBus::Connection* conn, Service *service)
Chris Masonea82b7112011-05-25 15:16:29 -070023 : DBusAdaptor(conn, kPath + service->UniqueName()),
Chris Masoned7732e42011-05-20 11:08:56 -070024 service_(service) {}
Chris Masoneec6b18b2011-06-08 14:09:10 -070025
26ServiceDBusAdaptor::~ServiceDBusAdaptor() {
27 service_ = NULL;
28}
Chris Masoned7732e42011-05-20 11:08:56 -070029
30void ServiceDBusAdaptor::UpdateConnected() {}
31
Chris Masoned0ceb8c2011-06-02 10:05:39 -070032void ServiceDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) {
33 PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
34}
35
36void ServiceDBusAdaptor::EmitUintChanged(const std::string& name,
37 uint32 value) {
38 PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value));
39}
40
41void ServiceDBusAdaptor::EmitIntChanged(const std::string& name, int value) {
42 PropertyChanged(name, DBusAdaptor::IntToVariant(value));
43}
44
45void ServiceDBusAdaptor::EmitStringChanged(const std::string& name,
46 const std::string& value) {
47 PropertyChanged(name, DBusAdaptor::StringToVariant(value));
48
49}
50
Chris Masoned7732e42011-05-20 11:08:56 -070051map<string, ::DBus::Variant> ServiceDBusAdaptor::GetProperties(
52 ::DBus::Error &error) {
53 return map<string, ::DBus::Variant>();
54}
55
56void ServiceDBusAdaptor::SetProperty(const string& ,
57 const ::DBus::Variant& ,
58 ::DBus::Error &error) {
59}
60
61void ServiceDBusAdaptor::ClearProperty(const string& , ::DBus::Error &error) {
62}
63
64void ServiceDBusAdaptor::Connect(::DBus::Error &error) {
65}
66
67void ServiceDBusAdaptor::Disconnect(::DBus::Error &error) {
68}
69
70void ServiceDBusAdaptor::Remove(::DBus::Error &error) {
71}
72
73void ServiceDBusAdaptor::MoveBefore(const ::DBus::Path& ,
74 ::DBus::Error &error) {
75}
76
77void ServiceDBusAdaptor::MoveAfter(const ::DBus::Path& ,
78 ::DBus::Error &error) {
79}
80
81void ServiceDBusAdaptor::ActivateCellularModem(const string& ,
82 ::DBus::Error &error) {
83}
84
85} // namespace shill