28 #ifndef CPL_SWIFT_INCLUDED_H
29 #define CPL_SWIFT_INCLUDED_H
35 #include <curl/curl.h>
41 class VSISwiftHandleHelper final:
public IVSIS3LikeHandleHelper
49 static bool GetConfiguration(
CPLString& osStorageURL,
52 static bool GetCached(
const char* pszURLKey,
53 const char* pszUserKey,
54 const char* pszPasswordKey,
62 void RebuildURL()
override;
65 static bool CheckCredentialsV1();
66 static bool AuthV1(
CPLString& osStorageURL,
70 static bool CheckCredentialsV3();
71 static bool AuthV3(
CPLString& osStorageURL,
74 static bool GetAuthV3StorageURL(
const CPLHTTPResult *psResult,
78 VSISwiftHandleHelper(
const CPLString& osStorageURL,
82 ~VSISwiftHandleHelper();
86 static VSISwiftHandleHelper* BuildFromURI(
const char* pszURI,
87 const char* pszFSPrefix);
89 struct curl_slist* GetCurlHeaders(
const CPLString& osVerbosVerb,
90 const struct curl_slist* psExistingHeaders,
91 const void *pabyDataContent =
nullptr,
92 size_t nBytesContent = 0)
const override;
94 const CPLString& GetURL()
const override {
return m_osURL; }
96 static void CleanMutex();
97 static void ClearCache();