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 | #include "shill/service_dbus_adaptor.h" |
| 6 | |
| 7 | #include <map> |
| 8 | #include <string> |
| 9 | |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 10 | #include "shill/service.h" |
| 11 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 12 | using std::map; |
| 13 | using std::string; |
| 14 | |
| 15 | namespace shill { |
| 16 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 17 | // static |
| 18 | const char ServiceDBusAdaptor::kInterfaceName[] = SHILL_INTERFACE; |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 19 | // static |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 20 | const char ServiceDBusAdaptor::kPath[] = "/service/"; |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 21 | |
Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 22 | ServiceDBusAdaptor::ServiceDBusAdaptor(DBus::Connection* conn, |
| 23 | ServiceRefPtr service) |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 24 | : DBusAdaptor(conn, kPath + service->UniqueName()), |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 25 | service_(service) {} |
| 26 | ServiceDBusAdaptor::~ServiceDBusAdaptor() {} |
| 27 | |
| 28 | void ServiceDBusAdaptor::UpdateConnected() {} |
| 29 | |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 30 | void ServiceDBusAdaptor::EmitBoolChanged(const std::string& name, bool value) { |
| 31 | PropertyChanged(name, DBusAdaptor::BoolToVariant(value)); |
| 32 | } |
| 33 | |
| 34 | void ServiceDBusAdaptor::EmitUintChanged(const std::string& name, |
| 35 | uint32 value) { |
| 36 | PropertyChanged(name, DBusAdaptor::UInt32ToVariant(value)); |
| 37 | } |
| 38 | |
| 39 | void ServiceDBusAdaptor::EmitIntChanged(const std::string& name, int value) { |
| 40 | PropertyChanged(name, DBusAdaptor::IntToVariant(value)); |
| 41 | } |
| 42 | |
| 43 | void ServiceDBusAdaptor::EmitStringChanged(const std::string& name, |
| 44 | const std::string& value) { |
| 45 | PropertyChanged(name, DBusAdaptor::StringToVariant(value)); |
| 46 | |
| 47 | } |
| 48 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 49 | map<string, ::DBus::Variant> ServiceDBusAdaptor::GetProperties( |
| 50 | ::DBus::Error &error) { |
| 51 | return map<string, ::DBus::Variant>(); |
| 52 | } |
| 53 | |
| 54 | void ServiceDBusAdaptor::SetProperty(const string& , |
| 55 | const ::DBus::Variant& , |
| 56 | ::DBus::Error &error) { |
| 57 | } |
| 58 | |
| 59 | void ServiceDBusAdaptor::ClearProperty(const string& , ::DBus::Error &error) { |
| 60 | } |
| 61 | |
| 62 | void ServiceDBusAdaptor::Connect(::DBus::Error &error) { |
| 63 | } |
| 64 | |
| 65 | void ServiceDBusAdaptor::Disconnect(::DBus::Error &error) { |
| 66 | } |
| 67 | |
| 68 | void ServiceDBusAdaptor::Remove(::DBus::Error &error) { |
| 69 | } |
| 70 | |
| 71 | void ServiceDBusAdaptor::MoveBefore(const ::DBus::Path& , |
| 72 | ::DBus::Error &error) { |
| 73 | } |
| 74 | |
| 75 | void ServiceDBusAdaptor::MoveAfter(const ::DBus::Path& , |
| 76 | ::DBus::Error &error) { |
| 77 | } |
| 78 | |
| 79 | void ServiceDBusAdaptor::ActivateCellularModem(const string& , |
| 80 | ::DBus::Error &error) { |
| 81 | } |
| 82 | |
| 83 | } // namespace shill |