blob: f5874420f8c8992bbfe96da64fba713070775d3b [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
Chris Masone7aa5f902011-07-11 11:13:35 -070013#include "shill/profile.h"
14#include "shill/property_store.h"
15#include "shill/refptr_types.h"
16#include "shill/shill_event.h"
17
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 Masone6791a432011-07-12 13:23:19 -070031 // Merely stop managing service persistence; flush nothing to disk.
Chris Masone9d779932011-08-25 16:33:41 -070032 virtual void Finalize(StoreInterface *storage);
33
34 // Should not be called.
35 virtual bool Save(StoreInterface *storage);
36
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_