Back to index

nordugrid-arc-nox  1.1.0~rc6
DataPointARC.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_DATAPOINTARC_H__
00004 #define __ARC_DATAPOINTARC_H__
00005 
00006 #include <list>
00007 #include <string>
00008 
00009 #include <arc/Thread.h>
00010 #include <arc/data/DataPointDirect.h>
00011 #include <arc/data/DataHandle.h>
00012 #include <arc/data/CheckSum.h>
00013 
00014 namespace Arc {
00015 
00016   class DataPointARC
00017     : public DataPointDirect {
00018   private:
00019     static Logger logger;
00020     DataHandle *transfer;
00021     bool reading;
00022     bool writing;
00023     URL bartender_url;
00024     URL turl;
00025     MD5Sum *md5sum;
00026     int chksum_index;
00027     bool checkBartenderURL(const URL& bartender_url);
00028   public:
00029     DataPointARC(const URL& url, const UserConfig& usercfg);
00030     virtual ~DataPointARC();
00031     static Plugin* Instance(PluginArgument *arg);
00032     DataStatus Check();
00033     DataStatus Remove();
00034     DataStatus ListFiles(std::list<FileInfo>& files, bool long_list = false,
00035                          bool resolve = false, bool metadata = false);
00036     DataStatus StartReading(DataBuffer& buffer);
00037     DataStatus StartWriting(DataBuffer& buffer,
00038                             DataCallback *space_cb = NULL);
00039     DataStatus StopReading();
00040     DataStatus StopWriting();
00041   };
00042 
00043 } // namespace Arc
00044 
00045 #endif // __ARC_DATAPOINTARC_H__