xrootd
XrdFrmTransfer.hh
Go to the documentation of this file.
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 struct XrdFrmTranArg;
00017 struct XrdFrmTranChk;
00018 class  XrdFrmXfrJob;
00019 class  XrdOucProg;
00020 
00021 class XrdFrmTransfer
00022 {
00023 public:
00024 
00025 static
00026 const  char *checkFF(const char *Path);
00027 
00028 static int   Init();
00029 
00030        void  Start();
00031 
00032              XrdFrmTransfer();
00033             ~XrdFrmTransfer() {}
00034 
00035 private:
00036 const char *Fetch();
00037 const char *FetchDone(char *lfnpath, struct stat &Stat, int &rc);
00038 const char *ffCheck();
00039       void  ffMake(int nofile=0);
00040       int   SetupCmd(XrdFrmTranArg *aP);
00041       int   TrackDC(char *Lfn, char *Mdp, char *Rfn);
00042       int   TrackDC(char *Rfn);
00043 const char *Throw();
00044       void  Throwaway();
00045       void  ThrowDone(XrdFrmTranChk *cP, time_t endTime);
00046 const char *ThrowOK(XrdFrmTranChk *cP);
00047 
00048 static XrdSysMutex               pMutex;
00049 static XrdOucHash<char>          pTab;
00050 
00051 XrdOucProg    *xfrCmd[4];
00052 XrdFrmXfrJob  *xfrP;
00053 char           cmdBuff[4096];
00054 };
00055 #endif