Darin Petkov | a9b1fed | 2012-02-29 11:49:05 +0100 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 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_DBUS_CONTROL_ |
| 6 | #define SHILL_DBUS_CONTROL_ |
| 7 | |
Eric Shienbrood | 3e20a23 | 2012-02-16 11:35:56 -0500 | [diff] [blame] | 8 | #include <base/memory/scoped_ptr.h> |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 9 | #include <dbus-c++/glib-integration.h> |
| 10 | #include <dbus-c++/util.h> |
| 11 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 12 | #include "shill/control_interface.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | // This is the Interface for the control channel for Shill. |
| 16 | class DBusControl : public ControlInterface { |
| 17 | public: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 18 | DBusControl(); |
| 19 | virtual ~DBusControl(); |
| 20 | |
Chris Masone | c6c6c13 | 2011-06-30 11:29:52 -0700 | [diff] [blame] | 21 | virtual DeviceAdaptorInterface *CreateDeviceAdaptor(Device *device); |
| 22 | virtual IPConfigAdaptorInterface *CreateIPConfigAdaptor(IPConfig *ipconfig); |
| 23 | virtual ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager); |
| 24 | virtual ProfileAdaptorInterface *CreateProfileAdaptor(Profile *profile); |
Darin Petkov | a9b1fed | 2012-02-29 11:49:05 +0100 | [diff] [blame] | 25 | virtual RPCTaskAdaptorInterface *CreateRPCTaskAdaptor(RPCTask *task); |
Chris Masone | c6c6c13 | 2011-06-30 11:29:52 -0700 | [diff] [blame] | 26 | virtual ServiceAdaptorInterface *CreateServiceAdaptor(Service *service); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 27 | |
Darin Petkov | d1b715b | 2011-06-02 21:21:22 -0700 | [diff] [blame] | 28 | void Init(); |
Darin Petkov | 50308cd | 2011-06-01 18:25:07 -0700 | [diff] [blame] | 29 | DBus::Connection *connection() { return connection_.get(); } |
| 30 | |
| 31 | private: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 32 | scoped_ptr<DBus::Glib::BusDispatcher> dispatcher_; |
Paul Stewart | 28fbfdf | 2011-05-31 09:37:38 -0700 | [diff] [blame] | 33 | scoped_ptr<DBus::Connection> connection_; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace shill |
| 37 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 38 | #endif // SHILL_DBUS_CONTROL_ |