Chris Masone | 88cbd5f | 2011-07-03 14:30:04 -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 | #ifndef SHILL_DEFAULT_PROFILE_ |
| 6 | #define SHILL_DEFAULT_PROFILE_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 11 | #include <base/file_path.h> |
Chris Masone | 88cbd5f | 2011-07-03 14:30:04 -0700 | [diff] [blame] | 12 | #include <base/memory/scoped_ptr.h> |
| 13 | |
| 14 | #include "shill/manager.h" |
| 15 | #include "shill/profile.h" |
| 16 | #include "shill/property_store.h" |
| 17 | #include "shill/refptr_types.h" |
| 18 | #include "shill/shill_event.h" |
| 19 | |
| 20 | namespace shill { |
| 21 | |
| 22 | class ControlInterface; |
| 23 | |
| 24 | class DefaultProfile : public Profile { |
| 25 | public: |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 26 | DefaultProfile(ControlInterface *control, |
Darin Petkov | a476682 | 2011-07-07 10:42:22 -0700 | [diff] [blame] | 27 | GLib *glib, |
Chris Masone | 6791a43 | 2011-07-12 13:23:19 -0700 | [diff] [blame] | 28 | Manager *manager, |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 29 | const FilePath &storage_path, |
Chris Masone | 88cbd5f | 2011-07-03 14:30:04 -0700 | [diff] [blame] | 30 | const Manager::Properties &manager_props); |
| 31 | virtual ~DefaultProfile(); |
| 32 | |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 33 | |
| 34 | // Sets |path| to the persistent store file path for the default, global |
| 35 | // profile. Returns true on success, and false if unable to determine an |
| 36 | // appropriate file location. |
| 37 | // |
| 38 | // In this implementation, |name_| is ignored. |
| 39 | virtual bool GetStoragePath(FilePath *path); |
| 40 | |
Chris Masone | 88cbd5f | 2011-07-03 14:30:04 -0700 | [diff] [blame] | 41 | private: |
Chris Masone | 7df0c67 | 2011-07-15 10:24:54 -0700 | [diff] [blame] | 42 | static const char kDefaultId[]; |
| 43 | |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 44 | const FilePath storage_path_; |
| 45 | |
Chris Masone | 88cbd5f | 2011-07-03 14:30:04 -0700 | [diff] [blame] | 46 | DISALLOW_COPY_AND_ASSIGN(DefaultProfile); |
| 47 | }; |
| 48 | |
| 49 | } // namespace shill |
| 50 | |
| 51 | #endif // SHILL_DEFAULT_PROFILE_ |