xrootd
XrdFrcProxy.hh
Go to the documentation of this file.
1 #ifndef __XRDFRCPROXY__
2 #define __XRDFRCPROXY__
3 /******************************************************************************/
4 /* */
5 /* X r d F r c P r o x y . h h */
6 /* */
7 /* (c) 2010 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 #include "XrdFrc/XrdFrcRequest.hh"
14 
15 class XrdFrcReqAgent;
16 class XrdOucStream;
17 class XrdSysLogger;
18 
20 {
21 public:
22 
23 int Add(char Opc, const char *Lfn, const char *Opq, const char *Usr,
24  const char *Rid, const char *Nop, const char *Pop,
25  int Prty=1);
26 
27 int Del(char Opc, const char *Rid);
28 
29 static const int opGet = 1;
30 static const int opPut = 2;
31 static const int opMig = 4;
32 static const int opStg = 8;
33 static const int opAll = 15;
34 
35 class Queues
36  {friend class XrdFrcProxy;
37  int Offset;
38  char Prty;
39  char QList;
40  char QNow;
41  char Active;
42  public:
43  Queues(int opX) : Offset(0), Prty(0), QList(opX), QNow(0), Active(0) {}
44  ~Queues() {}
45  };
46 
47 int List(Queues &State, char *Buff, int Bsz);
48 
49 int List(int qType, int qPrty, XrdFrcRequest::Item *Items, int Num);
50 
51 int Init(int opX, const char *aPath, int aMode, const char *qPath=0);
52 
53  XrdFrcProxy(XrdSysLogger *lP, const char *iName, int Debug=0);
55 
56 private:
57 
58 int Init2(const char *cfgFN);
59 int qChk(XrdOucStream &cFile);
60 
61 struct o2qMap {const char *qName; int qType; int oType;};
62 
63 static o2qMap oqMap[];
64 static int oqNum;
65 
67 const char *insName;
68 char *intName;
69 char *QPath;
70 };
71 #endif