Back to index

nordugrid-arc-nox  1.1.0~rc6
DataPointRLS.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_DATAPOINTRLS_H__
00004 #define __ARC_DATAPOINTRLS_H__
00005 
00006 #include <list>
00007 #include <string>
00008 
00009 extern "C" {
00010 #include <globus_rls_client.h>
00011 }
00012 
00013 #include <arc/data/DataPointIndex.h>
00014 
00015 namespace Arc {
00016   class Logger;
00017   class URL;
00018 
00019   class DataPointRLS
00020     : public DataPointIndex {
00021   public:
00022     DataPointRLS(const URL& url, const UserConfig& usercfg);
00023     ~DataPointRLS();
00024     static Plugin* Instance(PluginArgument *arg);
00025     virtual DataStatus Resolve(bool source);
00026     virtual DataStatus PreRegister(bool replication, bool force = false);
00027     virtual DataStatus PostRegister(bool replication);
00028     virtual DataStatus PreUnregister(bool replication);
00029     virtual DataStatus Unregister(bool all);
00030     virtual DataStatus ListFiles(std::list<FileInfo>& files,
00031                                  bool long_list = false, bool resolve = false,
00032                                  bool metadata = false);
00033     bool ResolveCallback(globus_rls_handle_t *h, const URL& url, void *arg);
00034     bool ListFilesCallback(globus_rls_handle_t *h, const URL& url, void *arg);
00035     bool UnregisterCallback(globus_rls_handle_t *h, const URL& url, void *arg);
00036   private:
00037     static Logger logger;
00038     bool guid_enabled;
00039     std::string pfn_path;
00040     URL AddPFN(const URL& url, bool source);
00041   };
00042 
00043 } // namespace Arc
00044 
00045 #endif // __ARC_DATAPOINTRLS_H__