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