00001 //------------------------------------------------------------------------------ 00002 // Copyright (c) 2011-2012 by European Organization for Nuclear Research (CERN) 00003 // Author: Lukasz Janyst <ljanyst@cern.ch> 00004 //------------------------------------------------------------------------------ 00005 // XRootD is free software: you can redistribute it and/or modify 00006 // it under the terms of the GNU Lesser General Public License as published by 00007 // the Free Software Foundation, either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // XRootD is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with XRootD. If not, see <http://www.gnu.org/licenses/>. 00017 //------------------------------------------------------------------------------ 00018 00019 #ifndef __XRD_CL_THIRD_PARTY_COPY_JOB_HH__ 00020 #define __XRD_CL_THIRD_PARTY_COPY_JOB_HH__ 00021 00022 #include "XrdCl/XrdClCopyProcess.hh" 00023 #include "XrdCl/XrdClCopyJob.hh" 00024 #include "XrdCl/XrdClFile.hh" 00025 00026 namespace XrdCl 00027 { 00028 class File; 00029 00030 class ThirdPartyCopyJob: public CopyJob 00031 { 00032 public: 00033 //------------------------------------------------------------------------ 00035 //------------------------------------------------------------------------ 00036 ThirdPartyCopyJob( uint16_t jobId, 00037 PropertyList *jobProperties, 00038 PropertyList *jobResults ); 00039 00040 //------------------------------------------------------------------------ 00045 //------------------------------------------------------------------------ 00046 virtual XRootDStatus Run( CopyProgressHandler *progress = 0 ); 00047 00048 private: 00049 00050 //------------------------------------------------------------------------ 00057 //------------------------------------------------------------------------ 00058 XRootDStatus CanDo(); 00059 00060 //------------------------------------------------------------------------ 00062 //------------------------------------------------------------------------ 00063 XRootDStatus RunTPC( CopyProgressHandler *progress ); 00064 00065 //------------------------------------------------------------------------ 00067 //------------------------------------------------------------------------ 00068 XRootDStatus RunLite( CopyProgressHandler *progress ); 00069 00070 //------------------------------------------------------------------------ 00072 //------------------------------------------------------------------------ 00073 static std::string GenerateKey(); 00074 00075 XrdCl::File dstFile; 00076 URL tpcSource; 00077 URL realTarget; 00078 std::string tpcKey; 00079 00080 std::string checkSumMode; 00081 std::string checkSumType; 00082 std::string checkSumPreset; 00083 uint64_t sourceSize; 00084 uint16_t initTimeout; 00085 bool force; 00086 bool coerce; 00087 bool delegate; 00088 int nbStrm; 00089 bool tpcLite; 00090 }; 00091 } 00092 00093 #endif // __XRD_CL_THIRD_PARTY_COPY_JOB_HH__