Paul Stewart | 75897df | 2011-04-27 09:05:53 -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 | #ifndef SHILL_DBUS_CONTROL_ |
| 6 | #define SHILL_DBUS_CONTROL_ |
| 7 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 8 | #include <base/scoped_ptr.h> |
| 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 | 413a319 | 2011-05-09 17:10:05 -0700 | [diff] [blame] | 21 | ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager); |
| 22 | ServiceAdaptorInterface *CreateServiceAdaptor(Service *service); |
| 23 | DeviceAdaptorInterface *CreateDeviceAdaptor(Device *device); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 24 | |
Darin Petkov | d1b715b | 2011-06-02 21:21:22 -0700 | [diff] [blame] | 25 | void Init(); |
Darin Petkov | 50308cd | 2011-06-01 18:25:07 -0700 | [diff] [blame] | 26 | DBus::Connection *connection() { return connection_.get(); } |
| 27 | |
| 28 | private: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 29 | scoped_ptr<DBus::Glib::BusDispatcher> dispatcher_; |
Paul Stewart | 28fbfdf | 2011-05-31 09:37:38 -0700 | [diff] [blame] | 30 | scoped_ptr<DBus::Connection> connection_; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } // namespace shill |
| 34 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 35 | #endif // SHILL_DBUS_CONTROL_ |