blob: 19472f5db7d8eaf06cc6ebbbb905b89e8adba27e [file] [log] [blame]
Paul Stewart75897df2011-04-27 09:05:53 -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#include <time.h>
Paul Stewart75897df2011-04-27 09:05:53 -07006#include <stdio.h>
Chris Masoneee929b72011-05-10 10:02:18 -07007
Paul Stewart75897df2011-04-27 09:05:53 -07008#include <string>
9
Chris Masoneee929b72011-05-10 10:02:18 -070010#include <base/logging.h>
11
Paul Stewart75897df2011-04-27 09:05:53 -070012#include "shill/control_interface.h"
Chris Masonec1e50412011-06-07 13:04:53 -070013#include "shill/device_config_interface.h"
Paul Stewart75897df2011-04-27 09:05:53 -070014#include "shill/service.h"
Chris Masoned7732e42011-05-20 11:08:56 -070015#include "shill/service_dbus_adaptor.h"
Paul Stewart75897df2011-04-27 09:05:53 -070016
17using std::string;
18
19namespace shill {
20Service::Service(ControlInterface *control_interface,
Chris Masone9be4a9d2011-05-16 15:44:09 -070021 EventDispatcher */* dispatcher */,
Chris Masonec1e50412011-06-07 13:04:53 -070022 DeviceConfigInterfaceRefPtr config_interface,
Chris Masonea82b7112011-05-25 15:16:29 -070023 const string& name)
24 : name_(name),
25 available_(false),
26 configured_(false),
27 auto_connect_(false),
28 configuration_(NULL),
29 connection_(NULL),
Chris Masonec1e50412011-06-07 13:04:53 -070030 config_interface_(config_interface),
Chris Masonea82b7112011-05-25 15:16:29 -070031 adaptor_(control_interface->CreateServiceAdaptor(this)) {
Chris Masonede21bba2011-05-10 09:15:39 -070032 // Initialize Interface montior, so we can detect new interfaces
Chris Masoneb07006b2011-05-14 16:10:04 -070033 VLOG(2) << "Service initialized.";
Paul Stewart75897df2011-04-27 09:05:53 -070034}
35
Paul Stewartba41b992011-05-26 07:02:46 -070036Service::~Service() {}
Paul Stewart75897df2011-04-27 09:05:53 -070037
38} // namespace shill