OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp} Namespace Reference

Classes

class  InterProcessRefreshTokenLock

Functions

std::string get_json_string_field (const json &j, const std::string &key)
long long get_json_int64_field (const json &j, const std::string &key)
std::string resolve_display_name (const std::string &display_name, const std::string &nickname, const std::string &full_name, const std::string &name, const std::string &username)
std::string base64url_encode (const std::vector< unsigned char > &data)
bool base64url_decode (const std::string &input, std::vector< unsigned char > &out)
std::vector< unsigned char > random_bytes (size_t len)
std::string generate_code_verifier ()
std::string generate_state_token ()
std::string sha256_base64url (const std::string &input)
std::string os_machine_id ()
std::string get_encryption_key ()
std::vector< unsigned char > sha256_bytes (const std::string &input)
std::string hmac_sha256_hex (const std::string &data, const std::vector< unsigned char > &key)
bool is_port_available (int port)
int choose_loopback_port ()
bool aes256gcm_encrypt (const std::string &plaintext, const std::vector< unsigned char > &key, std::string &out_b64)
bool aes256gcm_decrypt (const std::string &b64_payload, const std::vector< unsigned char > &key, std::string &plaintext)

Variables

constexpr const char * ORCA_DEFAULT_API_URL = "https://api.orcaslicer.com"
constexpr const char * ORCA_DEFAULT_AUTH_URL = "https://auth.orcaslicer.com"
constexpr const char * ORCA_DEFAULT_CLOUD_URL = "https://cloud.orcaslicer.com"
constexpr const char * ORCA_DEFAULT_PUB_KEY = "sb_publishable_lvVe_whOi80SU9BPSxM1kA_tbt9AbR_"
constexpr const char * ORCA_HEALTH_PATH = "/api/v1/health"
constexpr const char * ORCA_SYNC_PULL_PATH = "/api/v1/sync/pull"
constexpr const char * ORCA_SYNC_PUSH_PATH = "/api/v1/sync/push"
constexpr const char * ORCA_SYNC_FORCE_PUSH_PATH = "/api/v1/sync/force-push"
constexpr const char * ORCA_SYNC_DELETE_PATH = "/api/v1/sync/delete"
constexpr const char * ORCA_PROFILES_PATH = "/api/v1/sync/profiles"
constexpr const char * ORCA_SUBSCRIPTIONS_PATH = "/api/v1/subscriptions"
constexpr const char * ORCA_SYNC_STATE_FILE = "sync_state"
constexpr const char * ORCA_SYNC_PROFILE_TABLE = "profiles"
constexpr size_t ORCA_SYNC_MAX_PAYLOAD_SIZE = 1048576
constexpr const char * ORCA_SUBSCRIBED_PLUGINS = "/api/v1/plugins/subscriptions"
constexpr const char * ORCA_UNSUBSCRIBE_PLUGINS = "/api/v1/plugins/subscriptions"
constexpr const char * ORCA_PLUGINS_MINE = "/api/v1/plugins/mine"
constexpr const char * ORCA_PLUGINS_BASE = "/api/v1/plugins"
constexpr const char * ORCA_PLUGIN_DOWNLOAD_URL = "/api/v1/plugins/download"
constexpr const char * ORCA_CLOUD_PRINTER = "/api/v1/printers"
constexpr const char * ORCA_CLOUD_LOGIN_PATH = "/orcaslicer-login"
constexpr const char * ORCA_WEB_SESSION_HANDOFF_PATH = "/api/v1/account/web-session-handoff"
constexpr const char * CONFIG_ORCA_API_URL = "orca_api_url"
constexpr const char * CONFIG_ORCA_AUTH_URL = "orca_auth_url"
constexpr const char * CONFIG_ORCA_CLOUD_URL = "orca_cloud_url"
constexpr const char * CONFIG_ORCA_PUB_KEY = "orca_pub_key"
constexpr const char * SECRET_STORE_SERVICE = "OrcaSlicer/Auth"
constexpr const char * SECRET_STORE_USER = "orca_refresh_token"
constexpr std::chrono::seconds TOKEN_REFRESH_SKEW {900}

Function Documentation

◆ aes256gcm_decrypt()

bool Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::aes256gcm_decrypt ( const std::string & b64_payload,
const std::vector< unsigned char > & key,
std::string & plaintext )
465{
466 std::vector<unsigned char> payload;
467 if (!base64url_decode(b64_payload, payload))
468 return false;
469 if (payload.size() < 12 + 16)
470 return false;
471
472 const size_t iv_len = 12;
473 const size_t tag_len = 16;
474 std::vector<unsigned char> iv(payload.begin(), payload.begin() + iv_len);
475 std::vector<unsigned char> tag(payload.begin() + iv_len, payload.begin() + iv_len + tag_len);
476 std::vector<unsigned char> ciphertext(payload.begin() + iv_len + tag_len, payload.end());
477
478 EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
479 if (!ctx)
480 return false;
481
482 bool ok = true;
483 int len = 0;
484 std::vector<unsigned char> plain(ciphertext.size());
485
486 if (EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), nullptr, nullptr, nullptr) != 1)
487 ok = false;
488 if (ok && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, nullptr) != 1)
489 ok = false;
490 if (ok && EVP_DecryptInit_ex(ctx, nullptr, nullptr, key.data(), iv.data()) != 1)
491 ok = false;
492 if (ok && EVP_DecryptUpdate(ctx, plain.data(), &len, ciphertext.data(), ciphertext.size()) != 1)
493 ok = false;
494 int plain_len = len;
495 if (ok && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size(), tag.data()) != 1)
496 ok = false;
497 if (ok && EVP_DecryptFinal_ex(ctx, plain.data() + len, &len) != 1)
498 ok = false;
499 plain_len += len;
500
501 EVP_CIPHER_CTX_free(ctx);
502
503 if (!ok)
504 return false;
505 plain.resize(plain_len);
506 plaintext.assign(reinterpret_cast<char*>(plain.data()), plain.size());
507 return true;
508}
bool base64url_decode(const std::string &input, std::vector< unsigned char > &out)
Definition OrcaCloudServiceAgent.cpp:233

References aes256gcm_decrypt(), and base64url_decode().

Referenced by aes256gcm_decrypt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aes256gcm_encrypt()

bool Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::aes256gcm_encrypt ( const std::string & plaintext,
const std::vector< unsigned char > & key,
std::string & out_b64 )
419{
420 const int iv_len = 12;
421 auto iv = random_bytes(iv_len);
422
423 EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
424 if (!ctx)
425 return false;
426
427 bool ok = true;
428 int len = 0;
429 std::vector<unsigned char> ciphertext(plaintext.size());
430 std::vector<unsigned char> tag(16);
431
432 if (EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), nullptr, nullptr, nullptr) != 1)
433 ok = false;
434 if (ok && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv_len, nullptr) != 1)
435 ok = false;
436 if (ok && EVP_EncryptInit_ex(ctx, nullptr, nullptr, key.data(), iv.data()) != 1)
437 ok = false;
438 if (ok &&
439 EVP_EncryptUpdate(ctx, ciphertext.data(), &len, reinterpret_cast<const unsigned char*>(plaintext.data()), plaintext.size()) != 1)
440 ok = false;
441 int ciphertext_len = len;
442 if (ok && EVP_EncryptFinal_ex(ctx, ciphertext.data() + len, &len) != 1)
443 ok = false;
444 ciphertext_len += len;
445 if (ok && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, tag.size(), tag.data()) != 1)
446 ok = false;
447
448 EVP_CIPHER_CTX_free(ctx);
449
450 if (!ok)
451 return false;
452 ciphertext.resize(ciphertext_len);
453
454 std::vector<unsigned char> payload;
455 payload.reserve(iv.size() + tag.size() + ciphertext.size());
456 payload.insert(payload.end(), iv.begin(), iv.end());
457 payload.insert(payload.end(), tag.begin(), tag.end());
458 payload.insert(payload.end(), ciphertext.begin(), ciphertext.end());
459
460 out_b64 = base64url_encode(payload);
461 return true;
462}
std::vector< unsigned char > random_bytes(size_t len)
Definition OrcaCloudServiceAgent.cpp:250
std::string base64url_encode(const std::vector< unsigned char > &data)
Definition OrcaCloudServiceAgent.cpp:221

References aes256gcm_encrypt(), base64url_encode(), and random_bytes().

Referenced by aes256gcm_encrypt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ base64url_decode()

bool Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::base64url_decode ( const std::string & input,
std::vector< unsigned char > & out )
234{
235 std::string padded = input;
236 while (padded.size() % 4 != 0)
237 padded.push_back('=');
238 std::string normalized = padded;
239 std::replace(normalized.begin(), normalized.end(), '-', '+');
240 std::replace(normalized.begin(), normalized.end(), '_', '/');
241
242 out.resize(boost::beast::detail::base64::decoded_size(normalized.size()));
243 auto res = boost::beast::detail::base64::decode(out.data(), normalized.data(), normalized.size());
244 if (!res.second)
245 return false;
246 out.resize(res.first);
247 return true;
248}

References base64url_decode().

Referenced by aes256gcm_decrypt(), and base64url_decode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ base64url_encode()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::base64url_encode ( const std::vector< unsigned char > & data)
222{
223 std::string out;
224 out.resize(boost::beast::detail::base64::encoded_size(data.size()));
225 out.resize(boost::beast::detail::base64::encode(out.data(), data.data(), data.size()));
226
227 std::replace(out.begin(), out.end(), '+', '-');
228 std::replace(out.begin(), out.end(), '/', '_');
229 out.erase(std::remove(out.begin(), out.end(), '='), out.end());
230 return out;
231}

References base64url_encode().

Referenced by aes256gcm_encrypt(), base64url_encode(), generate_code_verifier(), and sha256_base64url().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ choose_loopback_port()

int Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::choose_loopback_port ( )
395{
396 int base_port = auth_constants::LOOPBACK_PORT;
397
398 if (const char* env_port = std::getenv("ORCA_LOOPBACK_PORT")) {
399 try {
400 int parsed = std::stoi(env_port);
401 if (parsed > 0 && parsed <= 65535) {
402 base_port = parsed;
403 }
404 } catch (...) {
405 BOOST_LOG_TRIVIAL(warning) << "OrcaCloudServiceAgent: invalid ORCA_LOOPBACK_PORT value, falling back to default";
406 }
407 }
408
409 std::vector<int> candidates = {base_port, base_port + 1, base_port + 2};
410 for (int port : candidates) {
411 if (is_port_available(port))
412 return port;
413 }
414
415 return base_port;
416}
bool is_port_available(int port)
Definition OrcaCloudServiceAgent.cpp:369
constexpr int LOOPBACK_PORT
Definition OrcaCloudServiceAgent.hpp:57

References choose_loopback_port(), is_port_available(), and Slic3r::auth_constants::LOOPBACK_PORT.

Referenced by choose_loopback_port().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_code_verifier()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::generate_code_verifier ( )
264{
265 constexpr int PKCE_VERIFIER_BYTES = 32;
266 auto bytes = random_bytes(PKCE_VERIFIER_BYTES);
267 return base64url_encode(bytes);
268}

References base64url_encode(), generate_code_verifier(), and random_bytes().

Referenced by generate_code_verifier().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_state_token()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::generate_state_token ( )
271{
272 auto bytes = random_bytes(16);
273 std::stringstream ss;
274 for (auto b : bytes) {
275 ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(b);
276 }
277 return ss.str();
278}

References generate_state_token(), and random_bytes().

Referenced by generate_state_token().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_encryption_key()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::get_encryption_key ( )
337{
338 // Bind the encryption key to both the machine and the OS user. A data_dir
339 // copied to another machine changes the machine half; a data_dir shared
340 // between OS users on the same machine changes the user half. Either
341 // difference makes the stored token fail to decrypt and forces a sign-in.
342 return os_machine_id() + ":" + wxGetUserId().ToStdString();
343}
std::string os_machine_id()
Definition OrcaCloudServiceAgent.cpp:288

References get_encryption_key(), and os_machine_id().

Referenced by get_encryption_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_json_int64_field()

long long Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::get_json_int64_field ( const json & j,
const std::string & key )
189{
190 if (!j.contains(key))
191 return 0;
192
193 const auto& value = j[key];
194 if (value.is_number_integer())
195 return value.get<long long>();
196 if (value.is_number_unsigned())
197 return static_cast<long long>(value.get<unsigned long long>());
198 return 0;
199}

References get_json_int64_field().

Referenced by get_json_int64_field().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_json_string_field()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::get_json_string_field ( const json & j,
const std::string & key )
181{
182 if (j.contains(key) && j[key].is_string()) {
183 return j[key].get<std::string>();
184 }
185 return "";
186}

References get_json_string_field().

Referenced by get_json_string_field().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hmac_sha256_hex()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::hmac_sha256_hex ( const std::string & data,
const std::vector< unsigned char > & key )
353{
354 unsigned int len = 0;
355 unsigned char result[EVP_MAX_MD_SIZE];
356 if (HMAC(EVP_sha256(), key.data(), static_cast<int>(key.size()), reinterpret_cast<const unsigned char*>(data.data()), data.size(),
357 result, &len) == nullptr) {
358 return {};
359 }
360
361 std::ostringstream oss;
362 oss << std::hex << std::setfill('0');
363 for (unsigned int i = 0; i < len; ++i) {
364 oss << std::setw(2) << static_cast<int>(result[i]);
365 }
366 return oss.str();
367}

References hmac_sha256_hex().

Referenced by hmac_sha256_hex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_port_available()

bool Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::is_port_available ( int port)
370{
371 if (port <= 0 || port > 65535)
372 return false;
373
374 using boost::asio::ip::tcp;
375 boost::asio::io_context ctx;
376 boost::system::error_code ec;
377
378 tcp::acceptor acceptor(ctx);
379 tcp::endpoint endpoint(tcp::v4(), static_cast<unsigned short>(port));
380
381 acceptor.open(endpoint.protocol(), ec);
382 if (ec)
383 return false;
384 acceptor.set_option(tcp::acceptor::reuse_address(true), ec);
385 if (ec)
386 return false;
387 acceptor.bind(endpoint, ec);
388 if (ec)
389 return false;
390 acceptor.close(ec);
391 return true;
392}

References is_port_available().

Referenced by choose_loopback_port(), and is_port_available().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ os_machine_id()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::os_machine_id ( )
289{
290 // Orca: OS-level identifiers that live outside data_dir, so a copied data_dir
291 // on another machine yields a different key and the stored refresh
292 // token silently fails to decrypt (forcing a normal sign-in).
293#if defined(__linux__)
294 std::ifstream f("/etc/machine-id");
295 std::string id;
296 if (f.good()) {
297 std::getline(f, id);
298 }
299 if (!id.empty())
300 return id;
301#elif defined(_WIN32)
302 // HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid is a per-install
303 // identifier that isn't copied along with the user's data_dir.
304 HKEY hkey = nullptr;
305 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Cryptography", 0, KEY_READ | KEY_WOW64_64KEY, &hkey) == ERROR_SUCCESS) {
306 wchar_t buffer[128] = {0};
307 DWORD buffer_bytes = sizeof(buffer);
308 DWORD type = 0;
309 LONG status = RegQueryValueExW(hkey, L"MachineGuid", nullptr, &type, reinterpret_cast<LPBYTE>(buffer), &buffer_bytes);
310 RegCloseKey(hkey);
311 if (status == ERROR_SUCCESS && type == REG_SZ && buffer_bytes > sizeof(wchar_t)) {
312 const size_t wlen = (buffer_bytes / sizeof(wchar_t)) - 1; // strip trailing NUL
313 return wxString(buffer, wlen).ToStdString();
314 }
315 }
316#elif defined(__APPLE__)
317 // gethostuuid() returns the hardware-tied host UUID (same value as
318 // "Hardware UUID" in System Information). It persists across OS
319 // reinstalls and kernel updates. Do NOT use sysctl kern.uuid — that
320 // is the running kernel image's build UUID (from kernel_uuid_string
321 // in XNU), which rotates on every macOS/kernel update and would
322 // sign users out on every OS update.
323 uuid_t host_id;
324 struct timespec wait = {0, 0};
325 if (gethostuuid(host_id, &wait) == 0) {
326 uuid_string_t str;
327 uuid_unparse(host_id, str);
328 return std::string(str);
329 }
330#endif
331
332 // Last resort: OS hostname.
333 return wxGetHostName().ToStdString();
334}
#define L(s)
Definition ExtrusionEntity.cpp:25
static double f(double x, double z_sin, double z_cos, bool vertical, bool flip)
Definition FillGyroid.cpp:124
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:273

References Slic3r::empty(), Slic3r::f(), L, and os_machine_id().

Referenced by get_encryption_key(), and os_machine_id().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ random_bytes()

std::vector< unsigned char > Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::random_bytes ( size_t len)
251{
252 std::vector<unsigned char> bytes(len);
253 if (RAND_bytes(bytes.data(), static_cast<int>(len)) != 1) {
254 std::random_device rd;
255 std::mt19937 gen(rd());
256 std::uniform_int_distribution<int> dist(0, 255);
257 for (auto& b : bytes)
258 b = static_cast<unsigned char>(dist(gen));
259 }
260 return bytes;
261}
T dist(const boost::polygon::point_data< T > &p1, const boost::polygon::point_data< T > &p2)
Definition Geometry.cpp:298

References Slic3r::Geometry::dist(), and random_bytes().

Referenced by aes256gcm_encrypt(), generate_code_verifier(), generate_state_token(), and random_bytes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_display_name()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::resolve_display_name ( const std::string & display_name,
const std::string & nickname,
const std::string & full_name,
const std::string & name,
const std::string & username )
207{
208 // Providers and payload shapes do not all use the same display-name field.
209 // Fallback sequence: display_name -> nickname -> full_name -> name
210 if (!display_name.empty())
211 return display_name;
212 if (!nickname.empty())
213 return nickname;
214 if (!full_name.empty())
215 return full_name;
216 if (!name.empty())
217 return name;
218 return username;
219}

References resolve_display_name().

Referenced by resolve_display_name().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sha256_base64url()

std::string Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::sha256_base64url ( const std::string & input)
281{
282 unsigned char hash[SHA256_DIGEST_LENGTH];
283 SHA256(reinterpret_cast<const unsigned char*>(input.data()), input.size(), hash);
284 std::vector<unsigned char> hash_vec(hash, hash + sizeof(hash));
285 return base64url_encode(hash_vec);
286}

References base64url_encode(), and sha256_base64url().

Referenced by sha256_base64url().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sha256_bytes()

std::vector< unsigned char > Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::sha256_bytes ( const std::string & input)
346{
347 std::vector<unsigned char> out(SHA256_DIGEST_LENGTH, 0);
348 SHA256(reinterpret_cast<const unsigned char*>(input.data()), input.size(), out.data());
349 return out;
350}

References sha256_bytes().

Referenced by sha256_bytes().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CONFIG_ORCA_API_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::CONFIG_ORCA_API_URL = "orca_api_url"
constexpr

◆ CONFIG_ORCA_AUTH_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::CONFIG_ORCA_AUTH_URL = "orca_auth_url"
constexpr

◆ CONFIG_ORCA_CLOUD_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::CONFIG_ORCA_CLOUD_URL = "orca_cloud_url"
constexpr

◆ CONFIG_ORCA_PUB_KEY

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::CONFIG_ORCA_PUB_KEY = "orca_pub_key"
constexpr

◆ ORCA_CLOUD_LOGIN_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_CLOUD_LOGIN_PATH = "/orcaslicer-login"
constexpr

◆ ORCA_CLOUD_PRINTER

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_CLOUD_PRINTER = "/api/v1/printers"
constexpr

◆ ORCA_DEFAULT_API_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_DEFAULT_API_URL = "https://api.orcaslicer.com"
constexpr

◆ ORCA_DEFAULT_AUTH_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_DEFAULT_AUTH_URL = "https://auth.orcaslicer.com"
constexpr

◆ ORCA_DEFAULT_CLOUD_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_DEFAULT_CLOUD_URL = "https://cloud.orcaslicer.com"
constexpr

◆ ORCA_DEFAULT_PUB_KEY

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_DEFAULT_PUB_KEY = "sb_publishable_lvVe_whOi80SU9BPSxM1kA_tbt9AbR_"
constexpr

◆ ORCA_HEALTH_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_HEALTH_PATH = "/api/v1/health"
constexpr

◆ ORCA_PLUGIN_DOWNLOAD_URL

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_PLUGIN_DOWNLOAD_URL = "/api/v1/plugins/download"
constexpr

◆ ORCA_PLUGINS_BASE

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_PLUGINS_BASE = "/api/v1/plugins"
constexpr

◆ ORCA_PLUGINS_MINE

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_PLUGINS_MINE = "/api/v1/plugins/mine"
constexpr

◆ ORCA_PROFILES_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_PROFILES_PATH = "/api/v1/sync/profiles"
constexpr

◆ ORCA_SUBSCRIBED_PLUGINS

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SUBSCRIBED_PLUGINS = "/api/v1/plugins/subscriptions"
constexpr

◆ ORCA_SUBSCRIPTIONS_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SUBSCRIPTIONS_PATH = "/api/v1/subscriptions"
constexpr

◆ ORCA_SYNC_DELETE_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_DELETE_PATH = "/api/v1/sync/delete"
constexpr

◆ ORCA_SYNC_FORCE_PUSH_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_FORCE_PUSH_PATH = "/api/v1/sync/force-push"
constexpr

◆ ORCA_SYNC_MAX_PAYLOAD_SIZE

size_t Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_MAX_PAYLOAD_SIZE = 1048576
constexpr

◆ ORCA_SYNC_PROFILE_TABLE

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_PROFILE_TABLE = "profiles"
constexpr

◆ ORCA_SYNC_PULL_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_PULL_PATH = "/api/v1/sync/pull"
constexpr

◆ ORCA_SYNC_PUSH_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_PUSH_PATH = "/api/v1/sync/push"
constexpr

◆ ORCA_SYNC_STATE_FILE

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_SYNC_STATE_FILE = "sync_state"
constexpr

◆ ORCA_UNSUBSCRIBE_PLUGINS

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_UNSUBSCRIBE_PLUGINS = "/api/v1/plugins/subscriptions"
constexpr

◆ ORCA_WEB_SESSION_HANDOFF_PATH

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::ORCA_WEB_SESSION_HANDOFF_PATH = "/api/v1/account/web-session-handoff"
constexpr

◆ SECRET_STORE_SERVICE

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::SECRET_STORE_SERVICE = "OrcaSlicer/Auth"
constexpr

◆ SECRET_STORE_USER

const char* Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::SECRET_STORE_USER = "orca_refresh_token"
constexpr

◆ TOKEN_REFRESH_SKEW

std::chrono::seconds Slic3r::anonymous_namespace{OrcaCloudServiceAgent.cpp}::TOKEN_REFRESH_SKEW {900}
constexpr
124{900}; // 15 minutes