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 REMOTING_HOST_HOST_CONFIG_H_ | 5 #ifndef REMOTING_HOST_HOST_CONFIG_H_ |
6 #define REMOTING_HOST_HOST_CONFIG_H_ | 6 #define REMOTING_HOST_HOST_CONFIG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
11 | 11 |
12 class Task; | 12 class Task; |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 | 15 |
16 // Following constants define names for configuration parameters. | 16 // Following constants define names for configuration parameters. |
17 | 17 |
18 // Login used to authenticate in XMPP network. | 18 // Login used to authenticate in XMPP network. |
19 extern const std::wstring kXmppLoginConfigPath; | 19 extern const std::wstring kXmppLoginConfigPath; |
20 // Auth token used to authenticate in XMPP network. | 20 // Auth token used to authenticate in XMPP network. |
21 extern const std::wstring kXmppAuthTokenConfigPath; | 21 extern const std::wstring kXmppAuthTokenConfigPath; |
22 // Unique identifier of the host used to register the host in directory. | 22 // Unique identifier of the host used to register the host in directory. |
23 // Normally a random UUID. | 23 // Normally a random UUID. |
24 extern const std::wstring kHostIdConfigPath; | 24 extern const std::wstring kHostIdConfigPath; |
25 // Readable host name. | 25 // Readable host name. |
26 extern const std::wstring kHostNameConfigPath; | 26 extern const std::wstring kHostNameConfigPath; |
27 // Public key used by the host for authentication. | 27 // Private keys used for host authentication. |
28 extern const std::wstring kPublicKeyConfigPath; | 28 extern const std::wstring kPrivateKeyConfigPath; |
awong
2010/07/14 19:36:32
Tangential note, why are these all wstrings? Shou
Sergey Ulanov
2010/07/14 19:56:55
DictionaryValue works with wstring path only.
| |
29 | |
30 // TODO(sergeyu): Add a property for private key. | |
31 | 29 |
32 // HostConfig interace provides read-only access to host configuration. | 30 // HostConfig interace provides read-only access to host configuration. |
33 class HostConfig : public base::RefCountedThreadSafe<HostConfig> { | 31 class HostConfig : public base::RefCountedThreadSafe<HostConfig> { |
34 public: | 32 public: |
35 HostConfig() { }; | 33 HostConfig() { }; |
36 virtual ~HostConfig() { } | 34 virtual ~HostConfig() { } |
37 | 35 |
38 virtual bool GetString(const std::wstring& path, | 36 virtual bool GetString(const std::wstring& path, |
39 std::wstring* out_value) = 0; | 37 std::wstring* out_value) = 0; |
40 virtual bool GetString(const std::wstring& path, | 38 virtual bool GetString(const std::wstring& path, |
(...skipping 18 matching lines...) Expand all Loading... | |
59 const std::wstring& in_value) = 0; | 57 const std::wstring& in_value) = 0; |
60 virtual void SetString(const std::wstring& path, | 58 virtual void SetString(const std::wstring& path, |
61 const std::string& in_value) = 0; | 59 const std::string& in_value) = 0; |
62 | 60 |
63 DISALLOW_COPY_AND_ASSIGN(MutableHostConfig); | 61 DISALLOW_COPY_AND_ASSIGN(MutableHostConfig); |
64 }; | 62 }; |
65 | 63 |
66 } // namespace remoting | 64 } // namespace remoting |
67 | 65 |
68 #endif // REMOTING_HOST_HOST_CONFIG_H_ | 66 #endif // REMOTING_HOST_HOST_CONFIG_H_ |
OLD | NEW |