31 #ifndef CPL_ALIBABA_OSS_INCLUDED_H 32 #define CPL_ALIBABA_OSS_INCLUDED_H 42 #include <curl/curl.h> 46 class VSIOSSHandleHelper final:
public IVSIS3LikeHandleHelper
56 bool m_bUseHTTPS =
false;
57 bool m_bUseVirtualHosting =
false;
59 void RebuildURL()
override;
68 VSIOSSHandleHelper(
const CPLString& osSecretAccessKey,
73 bool bUseHTTPS,
bool bUseVirtualHosting);
74 ~VSIOSSHandleHelper();
76 static VSIOSSHandleHelper* BuildFromURI(
const char* pszURI,
77 const char* pszFSPrefix,
83 bool bUseHTTPS,
bool bUseVirtualHosting);
85 struct curl_slist* GetCurlHeaders(
87 const struct curl_slist* psExistingHeaders,
88 const void *pabyDataContent =
nullptr,
89 size_t nBytesContent = 0 )
const override;
91 bool CanRestartOnError(
const char*,
const char* pszHeaders,
93 bool* pbUpdateMap =
nullptr)
override;
95 const CPLString& GetURL()
const override {
return m_osURL; }
96 const CPLString& GetBucket()
const {
return m_osBucket; }
97 const CPLString& GetObjectKey()
const {
return m_osObjectKey; }
98 const CPLString& GetEndpoint()
const {
return m_osEndpoint; }
99 bool GetVirtualHosting()
const {
return m_bUseVirtualHosting; }
100 void SetEndpoint(
const CPLString &osStr);
101 void SetVirtualHosting(
bool b);
106 class VSIOSSUpdateParams
111 VSIOSSUpdateParams() =
default;
113 explicit VSIOSSUpdateParams(
const VSIOSSHandleHelper* poHelper) :
114 m_osEndpoint(poHelper->GetEndpoint()) {}
116 void UpdateHandlerHelper(VSIOSSHandleHelper* poHelper) {
117 poHelper->SetEndpoint(m_osEndpoint);
Convenient string class based on std::string.
Definition: cpl_string.h:329
Various convenience functions for working with strings and string lists.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1186
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:989