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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
// 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.
//
// Functions exported by the RLZ DLL.
#include "rlz/win/lib/rlz_lib.h"
#define RLZ_DLL_EXPORT extern "C" __declspec(dllexport)
RLZ_DLL_EXPORT bool RecordProductEvent(rlz_lib::Product product,
rlz_lib::AccessPoint point,
rlz_lib::Event event_id) {
return rlz_lib::RecordProductEvent(product, point, event_id);
}
RLZ_DLL_EXPORT bool GetProductEventsAsCgi(rlz_lib::Product product,
char* unescaped_cgi,
size_t unescaped_cgi_size) {
return rlz_lib::GetProductEventsAsCgi(product, unescaped_cgi,
unescaped_cgi_size);
}
RLZ_DLL_EXPORT bool ClearAllProductEvents(rlz_lib::Product product) {
return rlz_lib::ClearAllProductEvents(product);
}
RLZ_DLL_EXPORT bool ClearProductEvent(rlz_lib::Product product,
rlz_lib::AccessPoint point,
rlz_lib::Event event_id) {
return rlz_lib::ClearProductEvent(product, point, event_id);
}
RLZ_DLL_EXPORT bool GetAccessPointRlz(rlz_lib::AccessPoint point,
char* rlz,
size_t rlz_size) {
return rlz_lib::GetAccessPointRlz(point, rlz, rlz_size);
}
RLZ_DLL_EXPORT bool SetAccessPointRlz(rlz_lib::AccessPoint point,
const char* new_rlz) {
return rlz_lib::SetAccessPointRlz(point, new_rlz);
}
RLZ_DLL_EXPORT bool CreateMachineState() {
return rlz_lib::CreateMachineState();
}
RLZ_DLL_EXPORT bool SetMachineDealCode(const char* dcc) {
return rlz_lib::SetMachineDealCode(dcc);
}
RLZ_DLL_EXPORT bool GetMachineDealCodeAsCgi(char* cgi, size_t cgi_size) {
return rlz_lib::GetMachineDealCodeAsCgi(cgi, cgi_size);
}
RLZ_DLL_EXPORT bool GetMachineDealCode2(char* dcc, size_t dcc_size) {
return rlz_lib::GetMachineDealCode(dcc, dcc_size);
}
RLZ_DLL_EXPORT bool GetPingParams(rlz_lib::Product product,
const rlz_lib::AccessPoint* access_points,
char* unescaped_cgi,
size_t unescaped_cgi_size) {
return rlz_lib::GetPingParams(product, access_points, unescaped_cgi,
unescaped_cgi_size);
}
RLZ_DLL_EXPORT bool ParsePingResponse(rlz_lib::Product product,
const char* response) {
return rlz_lib::ParsePingResponse(product, response);
}
RLZ_DLL_EXPORT bool IsPingResponseValid(const char* response,
int* checksum_idx) {
return rlz_lib::IsPingResponseValid(response, checksum_idx);
}
RLZ_DLL_EXPORT bool SetMachineDealCodeFromPingResponse(const char* response) {
return rlz_lib::SetMachineDealCodeFromPingResponse(response);
}
RLZ_DLL_EXPORT bool SendFinancialPing(rlz_lib::Product product,
const rlz_lib::AccessPoint* access_points,
const char* product_signature,
const char* product_brand,
const char* product_id,
const char* product_lang,
bool exclude_machine_id) {
return rlz_lib::SendFinancialPing(product, access_points, product_signature,
product_brand, product_id, product_lang, exclude_machine_id);
}
RLZ_DLL_EXPORT bool SendFinancialPingNoDelay(
rlz_lib::Product product,
const rlz_lib::AccessPoint* access_points,
const char* product_signature,
const char* product_brand,
const char* product_id,
const char* product_lang,
bool exclude_machine_id) {
return rlz_lib::SendFinancialPing(product, access_points, product_signature,
product_brand, product_id, product_lang, exclude_machine_id, true);
}
RLZ_DLL_EXPORT void ClearProductState(
rlz_lib::Product product, const rlz_lib::AccessPoint* access_points) {
return rlz_lib::ClearProductState(product, access_points);
}
|