28#ifndef CPL_AZURE_INCLUDED_H
29#define CPL_AZURE_INCLUDED_H
40class 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,
88 void SetIncludeMSVersion(
bool bInclude)
90 m_bIncludeMSVersion = bInclude;
94 GetCurlHeaders(
const std::string &osVerbosVerb,
95 const struct curl_slist *psExistingHeaders,
96 const void *pabyDataContent =
nullptr,
97 size_t nBytesContent = 0)
const override;
99 const std::string &GetURL()
const override
106 static void ClearCache();
108 std::string GetSASQueryString()
const;
110 const std::string &GetStorageAccount()
const
112 return m_osStorageAccount;
115 const std::string &GetBucket()
const
123int GetAzureBufferSize();
Interface for downloading HTTP, FTP documents.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1183