Revert of Sandbox html_viewer on Linux. (patchset #6 id:100001 of https://codereview...
[chromium-blink-merge.git] / remoting / host / host_config.h
blobc55b51acb2c1fb9756c3f1d2eadcece609615ebf
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_HOST_CONFIG_H_
6 #define REMOTING_HOST_HOST_CONFIG_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace base {
14 class DictionaryValue;
15 class FilePath;
16 } // namespace base
18 namespace remoting {
20 // Following constants define names for configuration parameters.
22 // Status of the host, whether it is enabled or disabled.
23 extern const char kHostEnabledConfigPath[];
24 // Base JID of the host owner (may not equal the email for non-gmail users).
25 extern const char kHostOwnerConfigPath[];
26 // Email of the owner of this host.
27 extern const char kHostOwnerEmailConfigPath[];
28 // Login used to authenticate in XMPP network (could be a service account).
29 extern const char kXmppLoginConfigPath[];
30 // OAuth refresh token used to fetch an access token for the XMPP network.
31 extern const char kOAuthRefreshTokenConfigPath[];
32 // Unique identifier of the host used to register the host in directory.
33 // Normally a random UUID.
34 extern const char kHostIdConfigPath[];
35 // Readable host name.
36 extern const char kHostNameConfigPath[];
37 // Hash of the host secret used for authentication.
38 extern const char kHostSecretHashConfigPath[];
39 // Private keys used for host authentication.
40 extern const char kPrivateKeyConfigPath[];
41 // Whether consent is given for usage stats reporting.
42 extern const char kUsageStatsConsentConfigPath[];
43 // Whether to offer VP9 encoding to clients.
44 extern const char kEnableVp9ConfigPath[];
45 // Number of Kibibytes of frame data to allow each client to record.
46 extern const char kFrameRecorderBufferKbConfigPath[];
47 // The GCD device ID of this host (if registered with GCD).
48 extern const char kGcdDeviceIdConfigPath[];
50 // Helpers for serializing/deserializing Host configuration dictonaries.
51 scoped_ptr<base::DictionaryValue> HostConfigFromJson(
52 const std::string& serialized);
53 std::string HostConfigToJson(const base::DictionaryValue& host_config);
55 // Helpers for loading/saving host configurations from/to files.
56 scoped_ptr<base::DictionaryValue> HostConfigFromJsonFile(
57 const base::FilePath& config_file);
58 bool HostConfigToJsonFile(const base::DictionaryValue& host_config,
59 const base::FilePath& config_file);
61 } // namespace remoting
63 #endif // REMOTING_HOST_HOST_CONFIG_H_