OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIN_REGISTRY_H_ | 5 #ifndef BASE_WIN_REGISTRY_H_ |
6 #define BASE_WIN_REGISTRY_H_ | 6 #define BASE_WIN_REGISTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <string> | 10 #include <string> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // value, if any. | 77 // value, if any. |
78 LONG ReadInt64(const wchar_t* name, int64* out_value) const; | 78 LONG ReadInt64(const wchar_t* name, int64* out_value) const; |
79 | 79 |
80 // Returns a string value. If |name| is NULL or empty, returns the default | 80 // Returns a string value. If |name| is NULL or empty, returns the default |
81 // value, if any. | 81 // value, if any. |
82 LONG ReadValue(const wchar_t* name, std::wstring* out_value) const; | 82 LONG ReadValue(const wchar_t* name, std::wstring* out_value) const; |
83 | 83 |
84 // Reads a REG_MULTI_SZ registry field into a vector of strings. Clears | 84 // Reads a REG_MULTI_SZ registry field into a vector of strings. Clears |
85 // |values| initially and adds further strings to the list. Returns | 85 // |values| initially and adds further strings to the list. Returns |
86 // ERROR_CANTREAD if type is not REG_MULTI_SZ. | 86 // ERROR_CANTREAD if type is not REG_MULTI_SZ. |
87 LONG RegKey::ReadValues(const wchar_t* name, | 87 LONG ReadValues(const wchar_t* name, std::vector<std::wstring>* values); |
88 std::vector<std::wstring>* values); | |
89 | 88 |
90 // Returns raw data. If |name| is NULL or empty, returns the default | 89 // Returns raw data. If |name| is NULL or empty, returns the default |
91 // value, if any. | 90 // value, if any. |
92 LONG ReadValue(const wchar_t* name, | 91 LONG ReadValue(const wchar_t* name, |
93 void* data, | 92 void* data, |
94 DWORD* dsize, | 93 DWORD* dsize, |
95 DWORD* dtype) const; | 94 DWORD* dtype) const; |
96 | 95 |
97 // Setters: | 96 // Setters: |
98 | 97 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 205 |
207 wchar_t name_[MAX_PATH]; | 206 wchar_t name_[MAX_PATH]; |
208 | 207 |
209 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); | 208 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); |
210 }; | 209 }; |
211 | 210 |
212 } // namespace win | 211 } // namespace win |
213 } // namespace base | 212 } // namespace base |
214 | 213 |
215 #endif // BASE_WIN_REGISTRY_H_ | 214 #endif // BASE_WIN_REGISTRY_H_ |
OLD | NEW |