12#ifndef CPL_AZURE_INCLUDED_H
13#define CPL_AZURE_INCLUDED_H
24class VSIAzureBlobHandleHelper final :
public IVSIS3LikeHandleHelper
26 std::string m_osPathForOption;
28 std::string m_osEndpoint;
29 std::string m_osBucket;
30 std::string m_osObjectKey;
31 std::string m_osStorageAccount;
32 std::string m_osStorageKey;
34 std::string m_osAccessToken;
35 bool m_bFromManagedIdentities;
36 bool m_bIncludeMSVersion =
true;
44 static bool GetConfiguration(
const std::string &osPathForOption,
46 bool &bUseHTTPS, std::string &osEndpoint,
47 std::string &osStorageAccount,
48 std::string &osStorageKey, std::string &osSAS,
49 std::string &osAccessToken,
50 bool &bFromManagedIdentities);
52 static std::string BuildURL(
const std::string &osEndpoint,
53 const std::string &osBucket,
54 const std::string &osObjectKey,
55 const std::string &osSAS);
57 void RebuildURL()
override;
60 VSIAzureBlobHandleHelper(
61 const std::string &osPathForOption,
const std::string &osEndpoint,
62 const std::string &osBucket,
const std::string &osObjectKey,
63 const std::string &osStorageAccount,
const std::string &osStorageKey,
64 const std::string &osSAS,
const std::string &osAccessToken,
65 bool bFromManagedIdentities);
66 ~VSIAzureBlobHandleHelper();
68 static VSIAzureBlobHandleHelper *
69 BuildFromURI(
const char *pszURI,
const char *pszFSPrefix,
70 const char *pszURIForPathSpecificOption =
nullptr,
73 void SetIncludeMSVersion(
bool bInclude)
75 m_bIncludeMSVersion = bInclude;
79 GetCurlHeaders(
const std::string &osVerbosVerb,
80 const struct curl_slist *psExistingHeaders,
81 const void *pabyDataContent =
nullptr,
82 size_t nBytesContent = 0)
const override;
84 const std::string &GetURL()
const override
91 static void ClearCache();
93 std::string GetSASQueryString()
const;
95 const std::string &GetStorageAccount()
const
97 return m_osStorageAccount;
100 const std::string &GetBucket()
const
108int GetAzureAppendBufferSize();
Interface for downloading HTTP, FTP documents.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1179