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()
override;
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;
78 struct curl_slist *GetCurlHeaders(
const std::string &osVerbosVerb,
79 struct curl_slist *psHeaders,
80 const void *pabyDataContent =
nullptr,
81 size_t nBytesContent = 0)
const override;
83 bool CanRestartOnError(
const char *,
const char *pszHeaders,
84 bool bSetError)
override;
86 const std::string &GetURL()
const override
93 static void ClearCache();
95 std::string GetSASQueryString()
const;
97 const std::string &GetStorageAccount()
const
99 return m_osStorageAccount;
102 const std::string &GetBucket()
const
107 static std::string GetSAS(
const char *pszFilename);
109 static bool IsNoSignRequest(
const char *pszFilename);
114int GetAzureAppendBufferSize();
Interface for downloading HTTP, FTP documents.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087