| OLD | NEW |
| (Empty) |
| 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. | |
| 6 | |
| 7 #ifndef RLZ_LIB_LIB_VALUES_H_ | |
| 8 #define RLZ_LIB_LIB_VALUES_H_ | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "rlz/lib/rlz_enums.h" | |
| 12 | |
| 13 namespace rlz_lib { | |
| 14 | |
| 15 // | |
| 16 // Ping CGI arguments: | |
| 17 // | |
| 18 // Events are reported as (without spaces): | |
| 19 // kEventsCgiVariable = <AccessPoint1><Event1> kEventsCgiSeparator <P2><E2>... | |
| 20 // | |
| 21 // Event responses from the server look like: | |
| 22 // kEventsCgiVariable : <AccessPoint1><Event1> kEventsCgiSeparator <P2><E2>... | |
| 23 // | |
| 24 // RLZ's are reported as (without spaces): | |
| 25 // kRlzCgiVariable = <AccessPoint> <kRlzCgiIndicator> <RLZ value> | |
| 26 // <kRlzCgiSeparator> <AP2><Indicator><V2><Separator> .... | |
| 27 // | |
| 28 // RLZ responses from the server look like (without spaces): | |
| 29 // kRlzCgiVariable<Access Point> : <RLZ value> | |
| 30 // | |
| 31 // DCC if reported should look like (without spaces): | |
| 32 // kDccCgiVariable = <DCC Value> | |
| 33 // | |
| 34 // RLS if reported should look like (without spaces): | |
| 35 // kRlsCgiVariable = <RLS Value> | |
| 36 // | |
| 37 // Machine ID if reported should look like (without spaces): | |
| 38 // kMachineIdCgiVariable = <Machine ID Value> | |
| 39 // | |
| 40 // A server response setting / confirming the DCC will look like (no spaces): | |
| 41 // kDccCgiVariable : <DCC Value> | |
| 42 // | |
| 43 // Each ping to the server must also contain kProtocolCgiArgument as well. | |
| 44 // | |
| 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; | |
| 52 | |
| 53 extern const char kDccCgiVariable[]; | |
| 54 extern const char kProtocolCgiArgument[]; | |
| 55 | |
| 56 extern const char kProductSignatureCgiVariable[]; | |
| 57 extern const char kProductBrandCgiVariable[]; | |
| 58 extern const char kProductLanguageCgiVariable[]; | |
| 59 extern const char kProductIdCgiVariable[]; | |
| 60 | |
| 61 extern const char kRlzCgiVariable[]; | |
| 62 extern const char kRlzCgiSeparator[]; | |
| 63 extern const char kRlzCgiIndicator[]; | |
| 64 | |
| 65 extern const char kRlsCgiVariable[]; | |
| 66 extern const char kMachineIdCgiVariable[]; | |
| 67 extern const char kSetDccResponseVariable[]; | |
| 68 | |
| 69 // | |
| 70 // Financial ping server information. | |
| 71 // | |
| 72 | |
| 73 extern const char kFinancialPingPath[]; | |
| 74 extern const char kFinancialServer[]; | |
| 75 | |
| 76 extern const int kFinancialPort; | |
| 77 | |
| 78 extern const int64 kEventsPingInterval; | |
| 79 extern const int64 kNoEventsPingInterval; | |
| 80 | |
| 81 extern const char kFinancialPingUserAgent[]; | |
| 82 extern const char* kFinancialPingResponseObjects[]; | |
| 83 | |
| 84 // | |
| 85 // The names for AccessPoints and Events that we use MUST be the same | |
| 86 // as those used/understood by the server. | |
| 87 // | |
| 88 const char* GetAccessPointName(AccessPoint point); | |
| 89 bool GetAccessPointFromName(const char* name, AccessPoint* point); | |
| 90 | |
| 91 const char* GetEventName(Event event); | |
| 92 bool GetEventFromName(const char* name, Event* event); | |
| 93 | |
| 94 // The names for products are used only client-side. | |
| 95 const char* GetProductName(Product product); | |
| 96 | |
| 97 } // namespace rlz_lib | |
| 98 | |
| 99 #endif // RLZ_LIB_LIB_VALUES_H_ | |
| OLD | NEW |