00001 #ifndef __FRMTRANSFER_H__ 00002 #define __FRMTRANSFER_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d F r m T r a n s f e r . h h */ 00006 /* */ 00007 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 00011 /******************************************************************************/ 00012 00013 #include "XrdOuc/XrdOucHash.hh" 00014 #include "XrdSys/XrdSysPthread.hh" 00015 00016 class XrdFrmReqFile; 00017 class XrdFrmRequest; 00018 struct XrdFrmTranArg; 00019 struct XrdFrmTranChk; 00020 class XrdFrmXfrJob; 00021 class XrdOucProg; 00022 00023 class XrdFrmTransfer 00024 { 00025 public: 00026 00027 static 00028 const char *checkFF(const char *Path); 00029 00030 static int Init(); 00031 00032 void Start(); 00033 00034 XrdFrmTransfer(); 00035 ~XrdFrmTransfer() {} 00036 00037 private: 00038 const char *Fetch(); 00039 const char *FetchDone(char *lfnpath, int &rc, time_t lktime); 00040 const char *ffCheck(); 00041 void ffMake(int nofile=0); 00042 int SetupCmd(XrdFrmTranArg *aP); 00043 int TrackDC(char *Lfn, char *Mdp, char *Rfn); 00044 int TrackDC(char *Rfn); 00045 const char *Throw(); 00046 void Throwaway(); 00047 void ThrowDone(XrdFrmTranChk *cP, time_t endTime); 00048 const char *ThrowOK(XrdFrmTranChk *cP); 00049 00050 static XrdSysMutex pMutex; 00051 static XrdOucHash<char> pTab; 00052 00053 XrdOucProg *xfrCmd[4]; 00054 XrdFrmXfrJob *xfrP; 00055 char cmdBuff[4096]; 00056 }; 00057 #endif