blob: 2065d676acf0779c3afb70e700e116b572da837b [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#ifndef SHILL_SERVICE_DBUS_ADAPTOR_H_
6#define SHILL_SERVICE_DBUS_ADAPTOR_H_
7
8#include <map>
9#include <string>
10
11#include <base/basictypes.h>
12
13#include "shill/adaptor_interfaces.h"
14#include "shill/dbus_adaptor.h"
15#include "shill/flimflam-service.h"
16
17namespace shill {
18class Service;
19
20// Subclass of DBusAdaptor for Service objects
21class ServiceDBusAdaptor : public org::chromium::flimflam::Service_adaptor,
22 public DBusAdaptor,
23 public ServiceAdaptorInterface {
24 public:
25 static const char kInterfaceName[];
26 static const char kPath[];
27
28 ServiceDBusAdaptor(DBus::Connection& conn, Service *service);
29 virtual ~ServiceDBusAdaptor();
30 void UpdateConnected();
31
32 // Implementation of Service_adaptor
33 std::map<std::string, ::DBus::Variant> GetProperties(::DBus::Error &error);
34 void SetProperty(const std::string& ,
35 const ::DBus::Variant& ,
36 ::DBus::Error &error);
37 void ClearProperty(const std::string& , ::DBus::Error &error);
38 void Connect(::DBus::Error &error);
39 void Disconnect(::DBus::Error &error);
40 void Remove(::DBus::Error &error);
41 void MoveBefore(const ::DBus::Path& , ::DBus::Error &error);
42 void MoveAfter(const ::DBus::Path& , ::DBus::Error &error);
43 void ActivateCellularModem(const std::string& , ::DBus::Error &error);
44
45 private:
46 Service *service_;
47 DISALLOW_COPY_AND_ASSIGN(ServiceDBusAdaptor);
48};
49
50} // namespace shill
51#endif // SHILL_SERVICE_DBUS_ADAPTOR_H_