Back to index

nordugrid-arc-nox  1.1.0~rc6
DataPointHTTP.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_DATAPOINTHTTP_H__
00004 #define __ARC_DATAPOINTHTTP_H__
00005 
00006 #include <arc/Thread.h>
00007 #include <arc/data/DataPointDirect.h>
00008 
00009 namespace Arc {
00010 
00011   class ChunkControl;
00012 
00013   class DataPointHTTP
00014     : public DataPointDirect {
00015   public:
00016     DataPointHTTP(const URL& url, const UserConfig& usercfg);
00017     virtual ~DataPointHTTP();
00018     static Plugin* Instance(PluginArgument *arg);
00019     DataStatus Check();
00020     DataStatus Remove();
00021     DataStatus ListFiles(std::list<FileInfo>& files, bool long_list = false,
00022                          bool resolve = false, bool metadata = false);
00023     DataStatus StartReading(DataBuffer& buffer);
00024     DataStatus StartWriting(DataBuffer& buffer, DataCallback *space_cb = NULL);
00025     DataStatus StopReading();
00026     DataStatus StopWriting();
00027   private:
00028     static void read_thread(void *arg);
00029     static void write_thread(void *arg);
00030     static Logger logger;
00031     ChunkControl *chunks;
00032     int transfers_started;
00033     int transfers_finished;
00034     Glib::Mutex transfer_lock;
00035   };
00036 
00037 } // namespace Arc
00038 
00039 #endif // __ARC_DATAPOINTHTTP_H__