blob: aa4f9b2c54d1d0d193f1f7d2b74ffdf8e2f06171 [file] [log] [blame]
Ben Chanfad4a0b2012-04-18 15:49:59 -07001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masone7aa5f902011-07-11 11:13:35 -07002// 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/ephemeral_profile.h"
6
7#include <string>
8#include <map>
9
10#include <chromeos/dbus/service_constants.h>
11
12#include "shill/adaptor_interfaces.h"
13#include "shill/control_interface.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070014#include "shill/manager.h"
Ben Chanfad4a0b2012-04-18 15:49:59 -070015#include "shill/scope_logger.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070016
17using std::map;
18using std::string;
19
20namespace shill {
21
22EphemeralProfile::EphemeralProfile(ControlInterface *control_interface,
Chris Masone7aa5f902011-07-11 11:13:35 -070023 Manager *manager)
Chris Masone9d779932011-08-25 16:33:41 -070024 : Profile(control_interface, manager, Identifier(), "", false) {
Chris Masone7aa5f902011-07-11 11:13:35 -070025}
26
27EphemeralProfile::~EphemeralProfile() {}
28
Chris Masone6515aab2011-10-12 16:19:09 -070029bool EphemeralProfile::AdoptService(const ServiceRefPtr &service) {
Ben Chanfad4a0b2012-04-18 15:49:59 -070030 SLOG(Profile, 2) << "Adding " << service->UniqueName()
31 << " to ephemeral profile.";
Chris Masone6515aab2011-10-12 16:19:09 -070032 service->set_profile(this);
33 return true;
34}
35
36bool EphemeralProfile::AbandonService(const ServiceRefPtr &service) {
37 if (service->profile() == this)
38 service->set_profile(NULL);
Ben Chanfad4a0b2012-04-18 15:49:59 -070039 SLOG(Profile, 2) << "Removing " << service->UniqueName()
40 << " from ephemeral profile.";
Chris Masone6515aab2011-10-12 16:19:09 -070041 return true;
Chris Masone7aa5f902011-07-11 11:13:35 -070042}
43
Chris Masoneb9c00592011-10-06 13:10:39 -070044bool EphemeralProfile::Save() {
Chris Masone9d779932011-08-25 16:33:41 -070045 NOTREACHED();
46 return false;
47}
48
Chris Masone7aa5f902011-07-11 11:13:35 -070049} // namespace shill