xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdClient
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>
37
#include "
XrdClient/XrdClientAdmin.hh
"
38
#include "
XrdClient/XrdClient.hh
"
39
#include <stdint.h>
40
41
class
XrdSysDir
;
42
const
char
*
ServerError
(
XrdClient
*cli);
43
void
PrintLastServerError
(
XrdClient
*cli);
44
bool
PedanticOpen4Write
(
XrdClient
*cli,
kXR_unt16
mode,
kXR_unt16
options);
45
46
//------------------------------------------------------------------------------
47
// Check if the opaque data provides the file size information and add it
48
// if needed
49
//------------------------------------------------------------------------------
50
XrdOucString
AddSizeHint
(
const
char
*dst, off_t size );
51
52
class
XrdCpWorkLst
{
53
54
vecString
fWorkList
;
55
uint64_t
pSourceSize
;
// set if the source URL refers to a file
56
int
srcPathLen
;
57
int
fWorkIt
;
58
59
XrdClientAdmin
*
xrda_src
, *
xrda_dst
;
60
61
XrdOucString
fSrc
,
fDest
;
62
bool
fDestIsDir
,
fSrcIsDir
;
63
64
public
:
65
66
XrdCpWorkLst
();
67
~XrdCpWorkLst
();
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
91
int
BuildWorkList_xrd
(
XrdOucString
url,
XrdOucString
opaquedata);
92
int
BuildWorkList_loc
(
XrdSysDir
*dir,
XrdOucString
pat);
93
94
bool
GetCpJob
(
XrdOucString
&src,
XrdOucString
&dest);
95
96
};
97
#endif
Generated by
1.8.3.1