blob: eda5ec2447d7070b91427363eed3050203ebeda3 [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
Paul Stewart28fbfdf2011-05-31 09:37:38 -07005#include "shill/device.h"
Chris Masoned7732e42011-05-20 11:08:56 -07006#include "shill/device_dbus_adaptor.h"
7
8#include <map>
9#include <string>
10
Chris Masonea82b7112011-05-25 15:16:29 -070011#include "shill/device.h"
12
Chris Masoned7732e42011-05-20 11:08:56 -070013using std::map;
14using std::string;
15
16namespace shill {
17
Chris Masoned7732e42011-05-20 11:08:56 -070018// static
Chris Masonea82b7112011-05-25 15:16:29 -070019const char DeviceDBusAdaptor::kInterfaceName[] = SHILL_INTERFACE;
Chris Masoned7732e42011-05-20 11:08:56 -070020// static
Chris Masonea82b7112011-05-25 15:16:29 -070021const char DeviceDBusAdaptor::kPath[] = "/device/";
Chris Masoned7732e42011-05-20 11:08:56 -070022
Chris Masoneec6b18b2011-06-08 14:09:10 -070023DeviceDBusAdaptor::DeviceDBusAdaptor(DBus::Connection* conn, Device *device)
Chris Masonea82b7112011-05-25 15:16:29 -070024 : DBusAdaptor(conn, kPath + device->UniqueName()),
Chris Masoned7732e42011-05-20 11:08:56 -070025 device_(device) {
26}
Chris Masoned0ceb8c2011-06-02 10:05:39 -070027
Chris Masoneec6b18b2011-06-08 14:09:10 -070028DeviceDBusAdaptor::~DeviceDBusAdaptor() {
29 device_ = NULL;
30}
Chris Masoned7732e42011-05-20 11:08:56 -070031
32void DeviceDBusAdaptor::UpdateEnabled() {}
33
Chris Masoned0ceb8c2011-06-02 10:05:39 -070034void DeviceDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) {
35 PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
36}
37
38void DeviceDBusAdaptor::EmitUintChanged(const std::string& name, uint32 value) {
39 PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value));
40}
41
42void DeviceDBusAdaptor::EmitIntChanged(const std::string& name, int value) {
43 PropertyChanged(name, DBusAdaptor::IntToVariant(value));
44}
45
46void DeviceDBusAdaptor::EmitStringChanged(const std::string& name,
47 const std::string& value) {
48 PropertyChanged(name, DBusAdaptor::StringToVariant(value));
49}
50
Chris Masoned7732e42011-05-20 11:08:56 -070051map<string, ::DBus::Variant> DeviceDBusAdaptor::GetProperties(
52 ::DBus::Error &error) {
53 return map<string, ::DBus::Variant>();
54}
55
56void DeviceDBusAdaptor::SetProperty(const string& ,
57 const ::DBus::Variant& ,
58 ::DBus::Error &error) {
59}
60
Chris Masoneccc88812011-06-08 18:00:10 -070061void DeviceDBusAdaptor::ClearProperty(const std::string& ,
62 ::DBus::Error &error) {
63}
64
Chris Masoned7732e42011-05-20 11:08:56 -070065void DeviceDBusAdaptor::ProposeScan(::DBus::Error &error) {
66}
67
68::DBus::Path DeviceDBusAdaptor::AddIPConfig(const string& ,
69 ::DBus::Error &error) {
70 return ::DBus::Path();
71}
72
Chris Masoneccc88812011-06-08 18:00:10 -070073void DeviceDBusAdaptor::Register(const std::string& , ::DBus::Error &error) {
74}
75
76void DeviceDBusAdaptor::RequirePin(const std::string& ,
77 const bool& ,
78 ::DBus::Error &error) {
79}
80
81void DeviceDBusAdaptor::EnterPin(const std::string& , ::DBus::Error &error) {
82}
83
84void DeviceDBusAdaptor::UnblockPin(const std::string& ,
85 const std::string& ,
86 ::DBus::Error &error) {
87}
88
89void DeviceDBusAdaptor::ChangePin(const std::string& ,
90 const std::string& ,
91 ::DBus::Error &error) {
92}
93
Chris Masoned7732e42011-05-20 11:08:56 -070094} // namespace shill