25 #ifndef SRC_XRDCL_XRDCLXCPSRC_HH_
26 #define SRC_XRDCL_XRDCLXCPSRC_HH_
55 XCpSrc( uint32_t chunkSize, uint8_t parallel, int64_t fileSize,
XCpCtx *ctx );
94 if( !pRefCount )
return nullptr;
114 return pCurrentOffset < pBlkEnd || !pRecovered.empty() || !pOngoing.empty();
135 delete[]
static_cast<char*
>( chunk->
GetBuffer() );
153 static void* Run(
void* arg );
159 void StartDownloading();
210 void Steal(
XCpSrc *src );
236 static void DeletePtr( T *&obj )
248 static bool FilesEqual(
File *f1,
File *f2 )
250 if( !f1 || !f2 )
return false;
252 const std::string lastURL =
"LastURL";
253 std::string url1, url2;
255 f1->GetProperty( lastURL, url1 );
256 f2->GetProperty( lastURL, url2 );
259 size_t pos = url1.find(
'?' );
260 if( pos != std::string::npos )
261 url1 = url1.substr( 0 , pos );
262 pos = url2.find(
'?' );
263 if( pos != std::string::npos )
264 url2 = url2.substr( 0 , pos );
304 std::map<File*, uint8_t> pFailed;
309 uint64_t pCurrentOffset;
319 std::atomic<uint64_t> pDataTransfered;
325 std::map<uint64_t, uint64_t> pOngoing;
331 std::map<uint64_t, uint64_t> pRecovered;
339 SyncQueue<XRootDStatus*> pReports;
356 std::atomic<bool> pRunning;
367 time_t pTransferTime;
static void DeleteChunk(PageInfo *&chunk)
XCpSrc(uint32_t chunkSize, uint8_t parallel, int64_t fileSize, XCpCtx *ctx)
void * GetBuffer()
Get the buffer.