XRootD
Loading...
Searching...
No Matches
XrdSfsGPFile.hh
Go to the documentation of this file.
1#ifndef __SFS_GPFILE_H__
2#define __SFS_GPFILE_H__
3/******************************************************************************/
4/* */
5/* X r d S f s G P F i l e . h h */
6/* */
7/* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Department of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
32#include <cstdint>
33
34class XrdSfsGPInfo;
35
37{
38public:
39
40uint16_t opts;
41static const uint16_t delegate = 0x0008;
42static const uint16_t keepErr = 0x0004;
43static const uint16_t mkPath = 0x0002;
44static const uint16_t replace = 0x0001;
45static const uint16_t useTLS = 0x0080;
46static const uint16_t verCKS = 0x0040;
47
48uint16_t rsvd1;
49uint8_t pingsec;
50uint8_t sources;
51uint8_t streams;
52uint8_t rsvd2;
53
54union {
55XrdSfsGPInfo *gpfInfo;
56uint32_t gpfID;
57 };
58
59const char *src;
60const char *dst;
61const char *lclCGI;
62const char *csType;
63const char *csVal;
64const char *tident;
65
66void *rsvd3;
67
68//-----------------------------------------------------------------------------
79//-----------------------------------------------------------------------------
80
81virtual void Finished(int rc, const char *emsg=0) = 0;
82
83//-----------------------------------------------------------------------------
89//-----------------------------------------------------------------------------
90
91enum GPFState {gpfPend = 0,
93 gpfCSV
94 };
95
96virtual void Status(GPFState state, uint32_t cpct, uint64_t bytes) = 0;
97
98//-----------------------------------------------------------------------------
100//-----------------------------------------------------------------------------
101
102 XrdSfsGPFile(const char *tid="")
103 : opts(0), rsvd1(0),
104 pingsec(0), sources(0), streams(0), rsvd2(0),
105 gpfInfo(0), src(0), dst(0), lclCGI(0),
106 csType(0), csVal(0), tident(tid), rsvd3(0) {}
107virtual ~XrdSfsGPFile() {}
108};
109#endif
int emsg(int rc, char *msg)
static const uint16_t verCKS
Verify checksum after transfer.
static const uint16_t useTLS
Use TLS for the data path.
virtual void Status(GPFState state, uint32_t cpct, uint64_t bytes)=0
void * rsvd3
Reserved field.
static const uint16_t replace
Replace existing file.
uint16_t opts
Options as defined below.
const char * csVal
Checksum value as a hex string.
uint8_t pingsec
Seconds between calls to Update() (0 -> no calls)
static const uint16_t delegate
Use delegation.
uint16_t rsvd1
virtual ~XrdSfsGPFile()
const char * lclCGI
The CGI, if any, for the local path.
virtual void Finished(int rc, const char *emsg=0)=0
const char * src
get: full URL, put: local path
static const uint16_t keepErr
Keep file after request failure.
const char * dst
get: local path, put: full URL
@ gpfXfr
Request is transfering data.
@ gpfPend
Request is pending.
@ gpfCSV
Request is doing checksum validation.
static const uint16_t mkPath
Create destination path.
uint8_t sources
Number of parallel sources (0 -> default)
XrdSfsGPFile(const char *tid="")
Constructor and Destructor.
uint8_t streams
Number of parallel streams (0 -> default)
const char * tident
Trace identifier.
const char * csType
Checksum type.