Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own...
[chromium-blink-merge.git] / rlz / lib / lib_values.h
blob05fbc6b25a1e21a4b730f0eddd20c0971423c97c
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.
4 //
5 // Key and value names of the location of the RLZ shared state.
7 #ifndef RLZ_LIB_LIB_VALUES_H_
8 #define RLZ_LIB_LIB_VALUES_H_
10 #include "base/basictypes.h"
11 #include "rlz/lib/rlz_enums.h"
13 namespace rlz_lib {
16 // Ping CGI arguments:
18 // Events are reported as (without spaces):
19 // kEventsCgiVariable = <AccessPoint1><Event1> kEventsCgiSeparator <P2><E2>...
21 // Event responses from the server look like:
22 // kEventsCgiVariable : <AccessPoint1><Event1> kEventsCgiSeparator <P2><E2>...
24 // RLZ's are reported as (without spaces):
25 // kRlzCgiVariable = <AccessPoint> <kRlzCgiIndicator> <RLZ value>
26 // <kRlzCgiSeparator> <AP2><Indicator><V2><Separator> ....
28 // RLZ responses from the server look like (without spaces):
29 // kRlzCgiVariable<Access Point> : <RLZ value>
31 // DCC if reported should look like (without spaces):
32 // kDccCgiVariable = <DCC Value>
34 // RLS if reported should look like (without spaces):
35 // kRlsCgiVariable = <RLS Value>
37 // Machine ID if reported should look like (without spaces):
38 // kMachineIdCgiVariable = <Machine ID Value>
40 // A server response setting / confirming the DCC will look like (no spaces):
41 // kDccCgiVariable : <DCC Value>
43 // Each ping to the server must also contain kProtocolCgiArgument as well.
45 // Pings may also contain (but not necessarily controlled by this Lib):
46 // - The product signature: kProductSignatureCgiVariable = <signature>
47 // - The product brand: kProductBrandCgiVariable = <brand>
48 // - The product installation ID: kProductIdCgiVariable = <id>
49 extern const char kEventsCgiVariable[];
50 extern const char kStatefulEventsCgiVariable[];
51 extern const char kEventsCgiSeparator;
53 extern const char kDccCgiVariable[];
54 extern const char kProtocolCgiArgument[];
56 extern const char kProductSignatureCgiVariable[];
57 extern const char kProductBrandCgiVariable[];
58 extern const char kProductLanguageCgiVariable[];
59 extern const char kProductIdCgiVariable[];
61 extern const char kRlzCgiVariable[];
62 extern const char kRlzCgiSeparator[];
63 extern const char kRlzCgiIndicator[];
65 extern const char kRlsCgiVariable[];
66 extern const char kMachineIdCgiVariable[];
67 extern const char kSetDccResponseVariable[];
70 // Financial ping server information.
73 extern const char kFinancialPingPath[];
74 extern const char kFinancialServer[];
76 extern const int kFinancialPort;
78 extern const int64 kEventsPingInterval;
79 extern const int64 kNoEventsPingInterval;
81 extern const char kFinancialPingUserAgent[];
82 extern const char* kFinancialPingResponseObjects[];
85 // The names for AccessPoints and Events that we use MUST be the same
86 // as those used/understood by the server.
88 const char* GetAccessPointName(AccessPoint point);
89 bool GetAccessPointFromName(const char* name, AccessPoint* point);
91 const char* GetEventName(Event event);
92 bool GetEventFromName(const char* name, Event* event);
94 // The names for products are used only client-side.
95 const char* GetProductName(Product product);
97 } // namespace rlz_lib
99 #endif // RLZ_LIB_LIB_VALUES_H_