10Duke Scale C++ Client
Loading...
Searching...
No Matches
ClientProperties.h
1#ifndef TENDUKE_SE_CLIENTPROPERTIES_H
2#define TENDUKE_SE_CLIENTPROPERTIES_H
3
4#include <string>
5#include <utility>
6
7namespace tenduke { namespace se {
8
21{
22public:
44 std::string cliCountry,
45 std::string cliHostName,
46 std::string cliHwArch,
47 std::string cliHwId,
48 std::string cliHwLabel,
49 std::string cliInstallationId,
50 std::string cliLang,
51 std::string cliProcessId,
52 std::string cliVersion,
53 std::string licenseConsumerId
54 ) : cliCountry(std::move(cliCountry))
55 , cliHostName(std::move(cliHostName))
56 , cliHwArch(std::move(cliHwArch))
57 , cliHwId(std::move(cliHwId))
58 , cliHwLabel(std::move(cliHwLabel))
60 , cliLang(std::move(cliLang))
61 , cliProcessId(std::move(cliProcessId))
62 , cliVersion(std::move(cliVersion))
64 ))
65 {}
66
68 const std::string cliCountry;
70 const std::string cliHostName;
72 const std::string cliHwArch;
75 const std::string cliHwId;
77 const std::string cliHwLabel;
79 const std::string cliInstallationId;
81 const std::string cliLang;
84 const std::string cliProcessId;
90 const std::string cliVersion;
93 const std::string licenseConsumerId;
94};
95
100{
101public:
107 ClientPropertiesBuilder & country(const std::string &pCountry)
108 {
109 this->cliCountry = pCountry;
110 return *this;
111 }
112
118 ClientPropertiesBuilder & hostName(const std::string &pHostName)
119 {
120 this->cliHostName = pHostName;
121 return *this;
122 }
123
129 ClientPropertiesBuilder & hwArch(const std::string &pHwArch)
130 {
131 this->cliHwArch = pHwArch;
132 return *this;
133 }
134
140 ClientPropertiesBuilder & hwId(const std::string &pHwId)
141 {
142 this->cliHwId = pHwId;
143 return *this;
144 }
145
151 ClientPropertiesBuilder & hwLabel(const std::string &pHwLabel)
152 {
153 this->cliHwLabel = pHwLabel;
154 return *this;
155 }
156
162 ClientPropertiesBuilder & installationId(const std::string &pInstallationId)
163 {
164 this->cliInstallationId = pInstallationId;
165 return *this;
166 }
167
173 ClientPropertiesBuilder & lang(const std::string &pLang)
174 {
175 this->cliLang = pLang;
176 return *this;
177 }
178
184 ClientPropertiesBuilder & processId(const std::string &pProcessId)
185 {
186 this->cliProcessId = pProcessId;
187 return *this;
188 }
189
195 ClientPropertiesBuilder & version(const std::string &pVersion)
196 {
197 this->cliVersion = pVersion;
198 return *this;
199 }
200
206 ClientPropertiesBuilder & licenseConsumerId(const std::string &pLicenseConsumerId)
207 {
208 this->cliLicenseConsumerId = pLicenseConsumerId;
209 return *this;
210 }
211
217 {
218 return {
219 cliCountry,
220 cliHostName,
221 cliHwArch,
222 cliHwId,
223 cliHwLabel,
224 cliInstallationId,
225 cliLang,
226 cliProcessId,
227 cliVersion,
228 cliLicenseConsumerId
229 };
230 }
231
232private:
233 std::string cliCountry;
234 std::string cliHostName;
235 std::string cliHwArch;
236 std::string cliHwId;
237 std::string cliHwLabel;
238 std::string cliInstallationId;
239 std::string cliLang;
240 std::string cliProcessId;
241 std::string cliVersion;
242 std::string cliLicenseConsumerId;
243};
244
245}}
246
247#endif //TENDUKE_SE_CLIENTPROPERTIES_H
For building the client properties fluently.
Definition ClientProperties.h:100
ClientPropertiesBuilder & lang(const std::string &pLang)
Sets language.
Definition ClientProperties.h:173
ClientPropertiesBuilder & hwLabel(const std::string &pHwLabel)
Sets hardware label.
Definition ClientProperties.h:151
ClientPropertiesBuilder & installationId(const std::string &pInstallationId)
Sets installation id.
Definition ClientProperties.h:162
ClientPropertiesBuilder & country(const std::string &pCountry)
Sets country.
Definition ClientProperties.h:107
ClientPropertiesBuilder & version(const std::string &pVersion)
Sets version.
Definition ClientProperties.h:195
ClientPropertiesBuilder & hwId(const std::string &pHwId)
Sets hardware id.
Definition ClientProperties.h:140
ClientProperties build()
Builds the properties.
Definition ClientProperties.h:216
ClientPropertiesBuilder & licenseConsumerId(const std::string &pLicenseConsumerId)
Sets license consumer id.
Definition ClientProperties.h:206
ClientPropertiesBuilder & processId(const std::string &pProcessId)
Sets processId.
Definition ClientProperties.h:184
ClientPropertiesBuilder & hwArch(const std::string &pHwArch)
Sets hardware architecture.
Definition ClientProperties.h:129
ClientPropertiesBuilder & hostName(const std::string &pHostName)
Sets hostname.
Definition ClientProperties.h:118
Properties of the client ("Client application claims")
Definition ClientProperties.h:21
const std::string licenseConsumerId
Identifier of the license consumer that the license checkout is for.
Definition ClientProperties.h:93
const std::string cliHostName
Hostname of device that the client app runs on.
Definition ClientProperties.h:70
const std::string cliVersion
Client app version.
Definition ClientProperties.h:90
const std::string cliHwId
Hardware id of device that the client app runs on.
Definition ClientProperties.h:75
const std::string cliHwArch
Architecture of of device / platform that the client app runs on.
Definition ClientProperties.h:72
const std::string cliCountry
Country code of OS environment that the client app runs on.
Definition ClientProperties.h:68
ClientProperties(std::string cliCountry, std::string cliHostName, std::string cliHwArch, std::string cliHwId, std::string cliHwLabel, std::string cliInstallationId, std::string cliLang, std::string cliProcessId, std::string cliVersion, std::string licenseConsumerId)
Constructs new instance.
Definition ClientProperties.h:43
const std::string cliHwLabel
Hardware label of device that the client app runs on.
Definition ClientProperties.h:77
const std::string cliProcessId
Process id of client app process in OS environment that the client app runs on.
Definition ClientProperties.h:84
const std::string cliInstallationId
Installation id the client app.
Definition ClientProperties.h:79
const std::string cliLang
Language code of the OS environment that the client app runs on.
Definition ClientProperties.h:81
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7