XRootD
XrdClS3 Namespace Reference

Classes

class  Factory
 
class  File
 
class  Filesystem
 

Functions

XrdCl::XRootDStatus DownloadUrl (const std::string &url, XrdClHttp::HeaderCallout *header_callout, XrdCl::ResponseHandler *handler, time_t timeout)
 

Variables

const uint64_t kLogXrdClS3 = 73174
 

Function Documentation

◆ DownloadUrl()

XrdCl::XRootDStatus XrdClS3::DownloadUrl ( const std::string &  url,
XrdClHttp::HeaderCallout header_callout,
XrdCl::ResponseHandler handler,
time_t  timeout 
)

Definition at line 251 of file XrdClS3DownloadHandler.cc.

252 {
253  std::unique_ptr<XrdCl::File> http_file(new XrdCl::File(url));
254 
255  if (header_callout) {
256  auto callout_loc = reinterpret_cast<long long>(header_callout);
257  size_t buf_size = 16;
258  char callout_buf[buf_size];
259  std::to_chars_result result = std::to_chars(callout_buf, callout_buf + buf_size - 1, callout_loc, 16);
260  if (result.ec == std::errc{}) {
261  std::string callout_str(callout_buf, result.ptr - callout_buf);
262  http_file->SetProperty("XrdClHttpHeaderCallout", callout_str);
263  }
264  }
265  http_file->SetProperty("XrdClHttpFullDownload", "true");
266 
267  auto http_file_raw = http_file.get();
268  S3DownloadHandler *downloadHandler = new S3DownloadHandler(std::move(http_file), handler, timeout);
269 
270  return http_file_raw->Open(url, XrdCl::OpenFlags::Read, XrdCl::Access::None, downloadHandler, timeout);
271 }
A file.
Definition: XrdClFile.hh:52
@ Read
Open only for reading.

References XrdCl::Access::None, and XrdCl::OpenFlags::Read.

Referenced by XrdClS3::Filesystem::DirList().

+ Here is the caller graph for this function:

Variable Documentation

◆ kLogXrdClS3

const uint64_t XrdClS3::kLogXrdClS3 = 73174

Definition at line 37 of file XrdClS3Factory.hh.

Referenced by XrdClS3::Factory::Factory(), and XrdClS3::Filesystem::Filesystem().