blob: e4326e6903150e2288316b54dfbe8e4f91c30d40 [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#ifndef SHILL_EPHEMERAL_PROFILE_
6#define SHILL_EPHEMERAL_PROFILE_
7
8#include <string>
9#include <vector>
10
11#include <base/memory/scoped_ptr.h>
12
Paul Stewart26b327e2011-10-19 11:38:09 -070013#include "shill/event_dispatcher.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070014#include "shill/profile.h"
15#include "shill/property_store.h"
16#include "shill/refptr_types.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070017
18namespace shill {
19
20class ControlInterface;
Chris Masone6791a432011-07-12 13:23:19 -070021class Manager;
Chris Masone9d779932011-08-25 16:33:41 -070022class StoreInterface;
Chris Masone7aa5f902011-07-11 11:13:35 -070023
24// An in-memory profile that is not persisted to disk, but allows the
25// promotion of entries contained herein to the currently active profile.
26class EphemeralProfile : public Profile {
27 public:
Chris Masone9d779932011-08-25 16:33:41 -070028 EphemeralProfile(ControlInterface *control_interface, Manager *manager);
Chris Masone7aa5f902011-07-11 11:13:35 -070029 virtual ~EphemeralProfile();
30
Chris Masone6515aab2011-10-12 16:19:09 -070031 virtual bool AdoptService(const ServiceRefPtr &service);
32 virtual bool AbandonService(const ServiceRefPtr &service);
Chris Masone9d779932011-08-25 16:33:41 -070033
34 // Should not be called.
Chris Masoneb9c00592011-10-06 13:10:39 -070035 virtual bool Save();
Chris Masone9d779932011-08-25 16:33:41 -070036
37 // Leaves |path| untouched and returns false.
mukesh agrawal1830fa12011-09-26 14:31:40 -070038 virtual bool GetStoragePath(FilePath */*path*/) { return false; }
Chris Masone7aa5f902011-07-11 11:13:35 -070039
40 private:
Chris Masone7aa5f902011-07-11 11:13:35 -070041 DISALLOW_COPY_AND_ASSIGN(EphemeralProfile);
42};
43
44} // namespace shill
45
46#endif // SHILL_EPHEMERAL_PROFILE_