Back to index

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