blob: c8f51ce35f74b4f8f035a9cfea99cf6019a098d4 [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:
Thieu Le5133b712013-02-19 14:47:21 -080028 EphemeralProfile(ControlInterface *control_interface,
29 Metrics *metrics,
30 Manager *manager);
Chris Masone7aa5f902011-07-11 11:13:35 -070031 virtual ~EphemeralProfile();
32
Chris Masone6515aab2011-10-12 16:19:09 -070033 virtual bool AdoptService(const ServiceRefPtr &service);
34 virtual bool AbandonService(const ServiceRefPtr &service);
Chris Masone9d779932011-08-25 16:33:41 -070035
36 // Should not be called.
Chris Masoneb9c00592011-10-06 13:10:39 -070037 virtual bool Save();
Chris Masone9d779932011-08-25 16:33:41 -070038
39 // Leaves |path| untouched and returns false.
Paul Stewart5ad16062013-02-21 18:10:48 -080040 virtual bool GetStoragePath(base::FilePath */*path*/) { return false; }
Chris Masone7aa5f902011-07-11 11:13:35 -070041
42 private:
Chris Masone7aa5f902011-07-11 11:13:35 -070043 DISALLOW_COPY_AND_ASSIGN(EphemeralProfile);
44};
45
46} // namespace shill
47
48#endif // SHILL_EPHEMERAL_PROFILE_