Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Connection_libcurl.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
5
6/*
7 ********************************************************************************
8 ***************************** Implementation Details ***************************
9 ********************************************************************************
10 */
11CompileTimeFlagChecker_HEADER (Stroika::Foundation::IO::Network::Transfer, qStroika_HasComponent_libcurl, qStroika_HasComponent_libcurl);
12
13#if qStroika_HasComponent_libcurl
14namespace Stroika::Foundation::IO::Network::Transfer::LibCurl {
15
16 inline void ThrowIfError (CURLcode status)
17 {
18 if (status != CURLE_OK) [[unlikely]] {
19 Execution::Throw (Execution::SystemErrorException<>{status, error_category ()});
20 }
21 }
22
23}
24#endif
25
26#if qStroika_HasComponent_libcurl
28 [[deprecated ("Since Stroika v3.0d4")]] inline const std::error_category& LibCurl_error_category () noexcept
29 {
30 return LibCurl::error_category ();
31 }
32
33 /**
34 * throw Exception () type iff the status indicates a real exception code. This MAY not throw an exception of type LibCurlException,
35 * but MAY map to any other exception type
36 */
37 [[deprecated ("Since Stroika v3.0d4")]] inline void ThrowIfError (CURLcode status)
38 {
39 LibCurl::ThrowIfError (status);
40 }
41
42 namespace [[deprecated ("Since Stroika v3.0d4 use LibCurl::Connection")]] Connection_LibCurl {
43 using namespace Stroika::Foundation::IO::Network::Transfer::LibCurl::Connection;
44
45 };
46}
47#endif
#define CompileTimeFlagChecker_HEADER(NS_PREFIX, NAME, VALUE)
CompileTimeFlagChecker_HEADER () will generate a LINK ERROR if you ever compile a header with one val...