00001 #ifndef __XRDFRCPROXY__
00002 #define __XRDFRCPROXY__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "XrdFrc/XrdFrcRequest.hh"
00034
00035 class XrdFrcReqAgent;
00036 class XrdOucStream;
00037 class XrdSysLogger;
00038
00039 class XrdFrcProxy
00040 {
00041 public:
00042
00043 int Add(char Opc, const char *Lfn, const char *Opq, const char *Usr,
00044 const char *Rid, const char *Nop, const char *Pop,
00045 int Prty=1);
00046
00047 int Del(char Opc, const char *Rid);
00048
00049 static const int opGet = 1;
00050 static const int opPut = 2;
00051 static const int opMig = 4;
00052 static const int opStg = 8;
00053 static const int opAll = 15;
00054
00055 class Queues
00056 {friend class XrdFrcProxy;
00057 int Offset;
00058 char Prty;
00059 char QList;
00060 char QNow;
00061 char Active;
00062 public:
00063 Queues(int opX) : Offset(0), Prty(0), QList(opX), QNow(0), Active(0) {}
00064 ~Queues() {}
00065 };
00066
00067 int List(Queues &State, char *Buff, int Bsz);
00068
00069 int List(int qType, int qPrty, XrdFrcRequest::Item *Items, int Num);
00070
00071 int Init(int opX, const char *aPath, int aMode, const char *qPath=0);
00072
00073 XrdFrcProxy(XrdSysLogger *lP, const char *iName, int Debug=0);
00074 ~XrdFrcProxy() {}
00075
00076 private:
00077
00078 int Init2(const char *cfgFN);
00079 int qChk(XrdOucStream &cFile);
00080
00081 struct o2qMap {const char *qName; int qType; int oType;};
00082
00083 static o2qMap oqMap[];
00084 static int oqNum;
00085
00086 XrdFrcReqAgent *Agent[XrdFrcRequest::numQ];
00087 const char *insName;
00088 char *intName;
00089 char *QPath;
00090 };
00091 #endif