OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef POWER_MANAGER_POWER_PREFS_H_ | 5 #ifndef POWER_MANAGER_POWER_PREFS_H_ |
6 #define POWER_MANAGER_POWER_PREFS_H_ | 6 #define POWER_MANAGER_POWER_PREFS_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "power_manager/power_prefs_interface.h" | 9 #include "power_manager/power_prefs_interface.h" |
10 | 10 |
11 namespace power_manager { | 11 namespace power_manager { |
12 | 12 |
13 // Prefs for power manager | 13 // Prefs for power manager |
14 class PowerPrefs : public PowerPrefsInterface { | 14 class PowerPrefs : public PowerPrefsInterface { |
15 public: | 15 public: |
16 explicit PowerPrefs(const FilePath& base_path); | 16 explicit PowerPrefs(const FilePath& base_path); |
17 virtual ~PowerPrefs() {} | 17 virtual ~PowerPrefs() {} |
18 | 18 |
19 // Read a setting from disk into |val|. | 19 // Read a setting from disk into |val|. |
20 // Returns true if successful; otherwise returns false. | 20 // Returns true if successful; otherwise returns false. |
21 bool ReadSetting(const char* setting_name, int64 *val); | 21 bool ReadSetting(const char* setting_name, int64* val); |
22 | 22 |
23 // Write a setting to disk. | 23 // Write a setting to disk. |
24 // Returns true if successful; otherwise returns false. | 24 // Returns true if successful; otherwise returns false. |
25 bool WriteSetting(const char* setting_name, int64 level); | 25 bool WriteSetting(const char* setting_name, int64 level); |
26 | 26 |
27 private: | 27 private: |
28 FilePath base_path_; | 28 FilePath base_path_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(PowerPrefs); | 30 DISALLOW_COPY_AND_ASSIGN(PowerPrefs); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace power_manager | 33 } // namespace power_manager |
34 | 34 |
35 #endif // POWER_MANAGER_POWER_PREFS_H_ | 35 #endif // POWER_MANAGER_POWER_PREFS_H_ |
OLD | NEW |