xrootd
XrdOssStage.hh
Go to the documentation of this file.
1 #ifndef __XRDOSS_STAGE_H__
2 #define __XRDOSS_STAGE_H__
3 /******************************************************************************/
4 /* */
5 /* X r d O s s S t a g e . h h */
6 /* */
7 /* (c) 2008 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 
13 // $Id$
14 
15 #include <time.h>
16 #include <sys/stat.h>
17 #include "XrdOuc/XrdOucDLlist.hh"
18 #include "XrdSys/XrdSysError.hh"
19 #include "XrdSys/XrdSysPthread.hh"
20 
21 /******************************************************************************/
22 /* X r d O s s S t a g e _ R e q */
23 /******************************************************************************/
24 
25 // Flag values
26 //
27 #define XRDOSS_REQ_FAIL 0x00C0
28 #define XRDOSS_REQ_ENOF 0x0040
29 #define XRDOSS_REQ_ACTV 0x0001
30 
32 {
33 public:
34 
37 
38 unsigned long hash; // Hash value for the path
39 const char *path;
40 unsigned long long size;
41 int flags;
42 time_t sigtod;
43 int prty;
44 
48 
49  XrdOssStage_Req(unsigned long xhash=0, const char *xpath=0)
50  {fullList.setItem(this); pendList.setItem(this);
51  hash = xhash; path = (xpath ? strdup(xpath) : 0);
52  flags=0; sigtod=0; size= 2ULL<<31LL; prty=0;
53  }
54 
56  {fullList.setItem(that); pendList.setItem(that);
57  hash = 0; path = 0; flags=0; sigtod=0; size= 0; prty=0;
58  }
59 
60  ~XrdOssStage_Req() {if (path) free((void *)path);
61  fullList.Remove();
62  pendList.Remove();
63  }
64 };
65 #endif