xrootd
Loading...
Searching...
No Matches
XrdXrootdGPFile.hh
Go to the documentation of this file.
1#ifndef __XRDXROOTDGPFILE_H__
2#define __XRDXROOTDGPFILE_H__
3/******************************************************************************/
4/* */
5/* X r d X r o o t d G P F i l e . h h */
6/* */
7/* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
35
36class XrdOucEnv;
37class XrdOucErrInfo;
38class XrdSecEntity;
39class XrdSfs;
40class XrdXrootdGPFAgent;
41
42/******************************************************************************/
43/* C l a s s X r d X r o o t d G P F i l e I n f o */
44/******************************************************************************/
45
46//------------------------------------------------------------------------------
50//------------------------------------------------------------------------------
51
53{
54public:
55
56const char *cksType;
57const char *cksValue;
58const char *src;
59const char *srcCgi;
60const char *dst;
61const char *srcCgi;
62uint16_t pingsec;
63uint16_t streams;
64
65//------------------------------------------------------------------------------
76//------------------------------------------------------------------------------
77
78bool Completed(const char *eMsg=0, int eNum=0);
79
80//------------------------------------------------------------------------------
89//------------------------------------------------------------------------------
90
91enum Status {isPending = 0,
93 isProving = 2
94 }
95
96bool Update(uint64_t xfrsz, Status stat);
97
98/******************************************************************************/
99/* C o n s t r u c t o r & D e s t r u c t o r */
100/******************************************************************************/
101
102 XrdXrootdGPFileInfo(XrdXrootdGPFAgent &gpf)
103 : cksType(0), cksValue(0),
104 src(0), srcCgi(0), dst(0), dstCgi(0),
105 pingSec(0), streams(0),
106 gpfAgent(gpf) {}
107
109
110private:
111
112XrdXrootdGPFAgent &gpfAgent;
113};
114
115/******************************************************************************/
116/* c l a s s X r d X r o o t d G P F i l e */
117/******************************************************************************/
118
120{
121public:
122
123//------------------------------------------------------------------------------
132//-----------------------------------------------------------------------------
133
134virtual void getFile(const XrdXrootdGPFileInfo &gargs,
135 const XrdSecEntity *client=0) = 0;
136
137//------------------------------------------------------------------------------
146//-----------------------------------------------------------------------------
147
148virtual void putFile(const XrdXrootdGPFileInfo &pargs,
149 const XrdSecEntity *client=0) = 0;
150
151//------------------------------------------------------------------------------
153//------------------------------------------------------------------------------
154
156
157//------------------------------------------------------------------------------
159//------------------------------------------------------------------------------
160
162};
163
164/******************************************************************************/
165/* X r d X r o o t d g e t G P F i l e */
166/******************************************************************************/
167
168//------------------------------------------------------------------------------
186//------------------------------------------------------------------------------
187
188class XrdSysError;
189
190typedef XrdXrootdGPFile *(*XrdOfsgetPrepare_t)(XrdSysError *eDest,
191 const char *confg,
192 const char *parms,
193 XrdSfs *theSfs,
194 XrdOucEnv *envP
195 );
196
197#define XrdOfsgetPrepareArguments XrdSysError *eDest,\
198 const char *confg,\
199 const char *parms,\
200 XrdSfs *theSfs,\
201 XrdOucEnv *envP
202/*
203extern "C" XrdXrootdGPFile_t *XrdXrootdgetGPFile;
204*/
205
206//------------------------------------------------------------------------------
212//------------------------------------------------------------------------------
213
219#endif
#define stat(a, b)
Definition XrdPosix.hh:96
Definition XrdOucEnv.hh:42
Definition XrdOucErrInfo.hh:101
Definition XrdSecEntity.hh:65
Definition XrdSysError.hh:90
Definition XrdXrootdGPFile.hh:53
enum XrdXrootdGPFileInfo::Status Update(uint64_t xfrsz, Status stat)
XrdXrootdGPFAgent & gpfAgent
Definition XrdXrootdGPFile.hh:112
const char * srcCgi
Source cgi or nil if none.
Definition XrdXrootdGPFile.hh:59
uint16_t pingsec
Seconds between ping call to Update()
Definition XrdXrootdGPFile.hh:62
const char * cksType
Checksum type or nil if none wanted.
Definition XrdXrootdGPFile.hh:56
uint16_t streams
Number of parallel streams (0 -> default)
Definition XrdXrootdGPFile.hh:63
XrdXrootdGPFileInfo(XrdXrootdGPFAgent &gpf)
Definition XrdXrootdGPFile.hh:102
const char * src
Source specification (path or URL)
Definition XrdXrootdGPFile.hh:58
bool Completed(const char *eMsg=0, int eNum=0)
const char * dst
Destination specification (path or URL)
Definition XrdXrootdGPFile.hh:60
~XrdXrootdGPFileInfo()
Definition XrdXrootdGPFile.hh:108
Status
Definition XrdXrootdGPFile.hh:91
@ isPending
Copy operation is pending.
Definition XrdXrootdGPFile.hh:91
@ isProving
Copy operation verifiying checksum.
Definition XrdXrootdGPFile.hh:93
@ isCopying
Copy operation in progress.
Definition XrdXrootdGPFile.hh:92
const char * cksValue
Checksum value or nil if none wanted.
Definition XrdXrootdGPFile.hh:57
Definition XrdXrootdGPFile.hh:120
virtual void getFile(const XrdXrootdGPFileInfo &gargs, const XrdSecEntity *client=0)=0
virtual void putFile(const XrdXrootdGPFileInfo &pargs, const XrdSecEntity *client=0)=0
virtual ~XrdXrootdGPFile()
Destructor.
Definition XrdXrootdGPFile.hh:161
XrdXrootdGPFile()
Constructor.
Definition XrdXrootdGPFile.hh:155
Definition XrdSfsFlags.hh:42