28 #ifndef CPL_AZURE_INCLUDED_H
29 #define CPL_AZURE_INCLUDED_H
35 #include <curl/curl.h>
40 class VSIAzureBlobHandleHelper final :
public IVSIS3LikeHandleHelper
42 std::string m_osPathForOption;
44 std::string m_osEndpoint;
45 std::string m_osBucket;
46 std::string m_osObjectKey;
47 std::string m_osStorageAccount;
48 std::string m_osStorageKey;
50 std::string m_osAccessToken;
51 bool m_bFromManagedIdentities;
52 bool m_bIncludeMSVersion =
true;
60 static bool GetConfiguration(
const std::string &osPathForOption,
62 bool &bUseHTTPS, std::string &osEndpoint,
63 std::string &osStorageAccount,
64 std::string &osStorageKey, std::string &osSAS,
65 std::string &osAccessToken,
66 bool &bFromManagedIdentities);
68 static std::string BuildURL(
const std::string &osEndpoint,
69 const std::string &osBucket,
70 const std::string &osObjectKey,
71 const std::string &osSAS);
73 void RebuildURL()
override;
76 VSIAzureBlobHandleHelper(
77 const std::string &osPathForOption,
const std::string &osEndpoint,
78 const std::string &osBucket,
const std::string &osObjectKey,
79 const std::string &osStorageAccount,
const std::string &osStorageKey,
80 const std::string &osSAS,
const std::string &osAccessToken,
81 bool bFromManagedIdentities);
82 ~VSIAzureBlobHandleHelper();
84 static VSIAzureBlobHandleHelper *
85 BuildFromURI(
const char *pszURI,
const char *pszFSPrefix,
86 const char *pszURIForPathSpecificOption =
nullptr,
89 void SetIncludeMSVersion(
bool bInclude)
91 m_bIncludeMSVersion = bInclude;
95 GetCurlHeaders(
const std::string &osVerbosVerb,
96 const struct curl_slist *psExistingHeaders,
97 const void *pabyDataContent =
nullptr,
98 size_t nBytesContent = 0)
const override;
100 const std::string &GetURL()
const override
107 static void ClearCache();
109 std::string GetSASQueryString()
const;
111 const std::string &GetStorageAccount()
const
113 return m_osStorageAccount;
116 const std::string &GetBucket()
const
124 int GetAzureAppendBufferSize();
Interface for downloading HTTP, FTP documents.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1183