Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -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 | #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 Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 14 | #include "shill/manager.h" |
| 15 | |
| 16 | using std::map; |
| 17 | using std::string; |
| 18 | |
| 19 | namespace shill { |
| 20 | |
| 21 | EphemeralProfile::EphemeralProfile(ControlInterface *control_interface, |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 22 | Manager *manager) |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 23 | : Profile(control_interface, manager, Identifier(), "", false) { |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | EphemeralProfile::~EphemeralProfile() {} |
| 27 | |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 28 | bool EphemeralProfile::AdoptService(const ServiceRefPtr &service) { |
| 29 | VLOG(2) << "Adding " << service->UniqueName() << " to ephemeral profile."; |
| 30 | service->set_profile(this); |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | bool 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 Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 39 | } |
| 40 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 41 | bool EphemeralProfile::Save() { |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 42 | NOTREACHED(); |
| 43 | return false; |
| 44 | } |
| 45 | |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 46 | } // namespace shill |