#include <XrdClZipListHandler.hh>
Public Member Functions | |
ZipListHandler (const URL &url, const std::string &path, DirListFlags::Flags flags, ResponseHandler *handler, uint16_t timeout=0) | |
~ZipListHandler () | |
Destructor. | |
virtual void | HandleResponse (XrdCl::XRootDStatus *statusptr, XrdCl::AnyObject *responseptr) |
Handle the server response. | |
Private Types | |
enum | Steps { STAT = 0, OPEN = 1, CLOSE = 2, DONE = 4 } |
Private Member Functions | |
void | DoDirList (time_t timeLeft) |
Do normal listing if it is a directory (and not a ZIP archive). | |
void | DoZipOpen (time_t timeLeft) |
Open the ZIP archive. | |
void | DoZipClose (time_t timeLeft) |
Close the ZIP archive. | |
Private Attributes | |
URL | pUrl |
DirListFlags::Flags | pFlags |
ResponseHandler * | pHandler |
uint16_t | pTimeout |
std::unique_ptr< DirectoryList > | pDirList |
time_t | pStartTime |
File | pFile |
ZipArchiveReader | pZip |
int | pStep |
enum XrdCl::ZipListHandler::Steps [private] |
Possible steps in ZIP listing
XrdCl::ZipListHandler::ZipListHandler | ( | const URL & | url, | |
const std::string & | path, | |||
DirListFlags::Flags | flags, | |||
ResponseHandler * | handler, | |||
uint16_t | timeout = 0 | |||
) | [inline] |
Constructor
url | : endpoint URL | |
path | : path to the ZIP | |
flags | : listing flags | |
handler | : the original response handler | |
timeout | : operation timeout |
References XrdCl::DefaultRequestTimeout, XrdCl::DefaultEnv::GetEnv(), XrdCl::Env::GetInt(), pTimeout, pUrl, and XrdCl::URL::SetPath().
XrdCl::ZipListHandler::~ZipListHandler | ( | ) | [inline] |
Destructor.
void XrdCl::ZipListHandler::DoDirList | ( | time_t | timeLeft | ) | [private] |
Do normal listing if it is a directory (and not a ZIP archive).
void XrdCl::ZipListHandler::DoZipClose | ( | time_t | timeLeft | ) | [private] |
Close the ZIP archive.
void XrdCl::ZipListHandler::DoZipOpen | ( | time_t | timeLeft | ) | [private] |
Open the ZIP archive.
virtual void XrdCl::ZipListHandler::HandleResponse | ( | XrdCl::XRootDStatus * | statusptr, | |
XrdCl::AnyObject * | responseptr | |||
) | [virtual] |
Handle the server response.
Reimplemented from XrdCl::ResponseHandler.
std::unique_ptr<DirectoryList> XrdCl::ZipListHandler::pDirList [private] |
File XrdCl::ZipListHandler::pFile [private] |
ResponseHandler* XrdCl::ZipListHandler::pHandler [private] |
time_t XrdCl::ZipListHandler::pStartTime [private] |
int XrdCl::ZipListHandler::pStep [private] |
uint16_t XrdCl::ZipListHandler::pTimeout [private] |
Referenced by ZipListHandler().
URL XrdCl::ZipListHandler::pUrl [private] |
Referenced by ZipListHandler().
ZipArchiveReader XrdCl::ZipListHandler::pZip [private] |