OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium 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 BASE_REGISTRY_H_ | 5 #ifndef BASE_REGISTRY_H_ |
6 #define BASE_REGISTRY_H_ | 6 #define BASE_REGISTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 // Kill a key and everything that live below it; please be careful when using | 50 // Kill a key and everything that live below it; please be careful when using |
51 // it. | 51 // it. |
52 bool DeleteKey(const wchar_t* name); | 52 bool DeleteKey(const wchar_t* name); |
53 | 53 |
54 // Deletes a single value within the key. | 54 // Deletes a single value within the key. |
55 bool DeleteValue(const wchar_t* name); | 55 bool DeleteValue(const wchar_t* name); |
56 | 56 |
57 bool ValueExists(const wchar_t* name); | 57 bool ValueExists(const wchar_t* name); |
58 | 58 |
59 bool ReadValue(const wchar_t* name, void* data, DWORD* dsize, | 59 bool ReadValue(const wchar_t* name, void* data, DWORD* dsize, |
60 DWORD* dtype = NULL); | 60 DWORD* dtype = NULL); |
M-A Ruel
2010/08/28 02:07:17
so this is the only one remaining?
| |
61 bool ReadValue(const wchar_t* name, std::wstring* value); | 61 bool ReadValue(const wchar_t* name, std::wstring* value); |
62 bool ReadValueDW(const wchar_t* name, DWORD* value); | 62 bool ReadValueDW(const wchar_t* name, DWORD* value); |
63 | 63 |
64 bool WriteValue(const wchar_t* name, const void* data, DWORD dsize, | 64 bool WriteValue(const wchar_t* name, const void* data, DWORD dsize, |
65 DWORD dtype = REG_BINARY); | 65 DWORD dtype); |
66 bool WriteValue(const wchar_t* name, const wchar_t* value); | 66 bool WriteValue(const wchar_t* name, const wchar_t* value); |
67 bool WriteValue(const wchar_t* name, DWORD value); | 67 bool WriteValue(const wchar_t* name, DWORD value); |
68 | 68 |
69 // Starts watching the key to see if any of its values have changed. | 69 // Starts watching the key to see if any of its values have changed. |
70 // The key must have been opened with the KEY_NOTIFY access privelege. | 70 // The key must have been opened with the KEY_NOTIFY access privelege. |
71 bool StartWatching(); | 71 bool StartWatching(); |
72 | 72 |
73 // If StartWatching hasn't been called, always returns false. | 73 // If StartWatching hasn't been called, always returns false. |
74 // Otherwise, returns true if anything under the key has changed. | 74 // Otherwise, returns true if anything under the key has changed. |
75 // This can't be const because the |watch_event_| may be refreshed. | 75 // This can't be const because the |watch_event_| may be refreshed. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 | 161 |
162 // Current index of the iteration. | 162 // Current index of the iteration. |
163 int index_; | 163 int index_; |
164 | 164 |
165 wchar_t name_[MAX_PATH]; | 165 wchar_t name_[MAX_PATH]; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); | 167 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); |
168 }; | 168 }; |
169 | 169 |
170 #endif // BASE_REGISTRY_H_ | 170 #endif // BASE_REGISTRY_H_ |
OLD | NEW |