blob: 672a098b896a10f662f5b694da215e89f5dac9d6 [file] [log] [blame]
Chris Masone7aa5f902011-07-11 11:13:35 -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 "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"
15
16using std::map;
17using std::string;
18
19namespace shill {
20
21EphemeralProfile::EphemeralProfile(ControlInterface *control_interface,
Chris Masone7aa5f902011-07-11 11:13:35 -070022 Manager *manager)
Chris Masone9d779932011-08-25 16:33:41 -070023 : Profile(control_interface, manager, Identifier(), "", false) {
Chris Masone7aa5f902011-07-11 11:13:35 -070024}
25
26EphemeralProfile::~EphemeralProfile() {}
27
Chris Masone6515aab2011-10-12 16:19:09 -070028bool EphemeralProfile::AdoptService(const ServiceRefPtr &service) {
29 VLOG(2) << "Adding " << service->UniqueName() << " to ephemeral profile.";
30 service->set_profile(this);
31 return true;
32}
33
34bool EphemeralProfile::AbandonService(const ServiceRefPtr &service) {
35 if (service->profile() == this)
36 service->set_profile(NULL);
37 VLOG(2) << "Removing " << service->UniqueName() << " from ephemeral profile.";
38 return true;
Chris Masone7aa5f902011-07-11 11:13:35 -070039}
40
Chris Masoneb9c00592011-10-06 13:10:39 -070041bool EphemeralProfile::Save() {
Chris Masone9d779932011-08-25 16:33:41 -070042 NOTREACHED();
43 return false;
44}
45
Chris Masone7aa5f902011-07-11 11:13:35 -070046} // namespace shill