28 #ifndef CPL_GOOGLE_CLOUD_INCLUDED_H
29 #define CPL_GOOGLE_CLOUD_INCLUDED_H
39 #include <curl/curl.h>
44 class VSIGSHandleHelper final :
public IVSIS3LikeHandleHelper
53 bool m_bUseAuthenticationHeader;
55 std::string m_osUserProject{};
57 static bool GetConfiguration(
const std::string &osPathForOption,
61 bool &bUseAuthenticationHeader,
64 static bool GetConfigurationFromConfigFile(
CPLString &osSecretAccessKey,
71 void RebuildURL()
override;
74 VSIGSHandleHelper(
const CPLString &osEndpoint,
77 const CPLString &osAccessKeyId,
bool bUseHeaderFile,
79 const std::string &osUserProject);
82 static VSIGSHandleHelper *BuildFromURI(
const char *pszURI,
83 const char *pszFSPrefix,
86 bool UsesHMACKey()
const;
89 GetCurlHeaders(
const CPLString &osVerbosVerb,
90 const struct curl_slist *psExistingHeaders,
91 const void *pabyDataContent =
nullptr,
92 size_t nBytesContent = 0)
const override;
99 CPLString GetCopySourceHeader()
const override
101 return "x-goog-copy-source";
103 const char *GetMetadataDirectiveREPLACE()
const override
105 return "x-goog-metadata-directive: REPLACE";
110 static void CleanMutex();
111 static void ClearCache();