xrootd
XrdCpWorkLst.hh
Go to the documentation of this file.
1#ifndef XRDCPWORKLST_HH
2#define XRDCPWORKLST_HH
3/******************************************************************************/
4/* */
5/* X r d C p W o r k L s t . h h */
6/* */
7/* Author: Fabrizio Furano (INFN Padova, 2004) */
8/* */
9/* This file is part of the XRootD software suite. */
10/* */
11/* XRootD is free software: you can redistribute it and/or modify it under */
12/* the terms of the GNU Lesser General Public License as published by the */
13/* Free Software Foundation, either version 3 of the License, or (at your */
14/* option) any later version. */
15/* */
16/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
17/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
18/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
19/* License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
23/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
24/* */
25/* The copyright holder's institutional names and contributor's names may not */
26/* be used to endorse or promote products derived from this software without */
27/* specific prior written permission of the institution or contributor. */
28/******************************************************************************/
29
31// //
32// A class implementing a list of cp to do for XrdCp //
33// //
35
36#include <sys/types.h>
39#include <stdint.h>
40
41class XrdSysDir;
42const char *ServerError(XrdClient *cli);
45
46//------------------------------------------------------------------------------
47// Check if the opaque data provides the file size information and add it
48// if needed
49//------------------------------------------------------------------------------
50XrdOucString AddSizeHint( const char *dst, off_t size );
51
53
55 uint64_t pSourceSize; // set if the source URL refers to a file
58
60
63
64 public:
65
68
69
70 // Sets the source path for the file copy
71 int SetSrc(XrdClient **srccli, XrdOucString url,
72 XrdOucString urlopaquedata, bool do_recurse, int newCP=0);
73
74 // Sets the destination of the file copy
75 int SetDest(XrdClient **xrddest, const char *url,
76 const char *urlopaquedata,
77 kXR_unt16 xrdopenflags, int newCP=0);
78
79 inline void GetDest(XrdOucString &dest, bool& isdir) {
80 dest = fDest;
81 isdir = fDestIsDir;
82 }
83
84 inline void GetSrc(XrdOucString &src, bool& isdir) {
85 src = fSrc;
86 isdir = fSrcIsDir;
87 }
88
89
90 // Actually builds the worklist
93
95
96};
97#endif
unsigned short kXR_unt16
Definition: XPtypes.hh:67
void PrintLastServerError(XrdClient *cli)
const char * ServerError(XrdClient *cli)
XrdOucString AddSizeHint(const char *dst, off_t size)
bool PedanticOpen4Write(XrdClient *cli, kXR_unt16 mode, kXR_unt16 options)
Definition: XrdClientAdmin.hh:63
Definition: XrdClient.hh:121
Definition: XrdCpWorkLst.hh:52
int BuildWorkList_loc(XrdSysDir *dir, XrdOucString pat)
XrdOucString fDest
Definition: XrdCpWorkLst.hh:61
bool fSrcIsDir
Definition: XrdCpWorkLst.hh:62
uint64_t pSourceSize
Definition: XrdCpWorkLst.hh:55
int BuildWorkList_xrd(XrdOucString url, XrdOucString opaquedata)
bool GetCpJob(XrdOucString &src, XrdOucString &dest)
XrdClientAdmin * xrda_dst
Definition: XrdCpWorkLst.hh:59
void GetSrc(XrdOucString &src, bool &isdir)
Definition: XrdCpWorkLst.hh:84
void GetDest(XrdOucString &dest, bool &isdir)
Definition: XrdCpWorkLst.hh:79
int srcPathLen
Definition: XrdCpWorkLst.hh:56
XrdClientAdmin * xrda_src
Definition: XrdCpWorkLst.hh:59
int SetSrc(XrdClient **srccli, XrdOucString url, XrdOucString urlopaquedata, bool do_recurse, int newCP=0)
XrdOucString fSrc
Definition: XrdCpWorkLst.hh:61
vecString fWorkList
Definition: XrdCpWorkLst.hh:54
int SetDest(XrdClient **xrddest, const char *url, const char *urlopaquedata, kXR_unt16 xrdopenflags, int newCP=0)
bool fDestIsDir
Definition: XrdCpWorkLst.hh:62
int fWorkIt
Definition: XrdCpWorkLst.hh:57
Definition: XrdOucString.hh:254
Definition: XrdSysDir.hh:49