Back to index

nordugrid-arc-nox  1.1.0~rc6
SRM22Client.h
Go to the documentation of this file.
00001 #ifndef __HTTPSD_SRM_CLIENT_2_2_H__
00002 #define __HTTPSD_SRM_CLIENT_2_2_H__
00003 
00004 #include "SRMURL.h"
00005 #include "SRMClient.h"
00006 
00007 #include "srm2_2_soapH.h"
00008 
00009 const static SOAP_NMAC struct Namespace srm2_2_soap_namespaces[] =
00010 {
00011   {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
00012   {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
00013   {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
00014   {"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
00015   {"SRMv2", "http://srm.lbl.gov/StorageResourceManager", NULL, NULL},
00016   {NULL, NULL, NULL, NULL}
00017 };
00018 
00025 const static unsigned int max_files_list = 999;
00026 
00027 //namespace Arc {
00028   
00029   class SRM22Client: public SRMClient {
00030    private:
00031     struct soap soapobj;
00032     //static Logger logger;
00033     
00040     SRMReturnCode info(SRMClientRequest& req,
00041                        std::list<struct SRMFileMetaData>& metadata,
00042                        const int recursive,
00043                        bool report_error,
00044                        const int offset,
00045                        const int count);
00046   
00050     SRMReturnCode removeFile(SRMClientRequest& req);
00051   
00055     SRMReturnCode removeDir(SRMClientRequest& req);
00056   
00062     SRMFileMetaData fillDetails(SRMv2__TMetaDataPathDetail * details,
00063                                 bool directory);
00064   
00068     void fileStatus(SRMClientRequest& req,
00069                     SRMv2__ArrayOfTBringOnlineRequestFileStatus * file_statuses);
00070   
00071    public:
00072     SRM22Client(SRMURL url);
00073     ~SRM22Client(void);
00074   
00078     SRMReturnCode ping(std::string& version, bool report_error=true);
00079   
00083     SRMReturnCode getSpaceTokens(std::list<std::string>& tokens,
00084                                  std::string description = "");
00085   
00089     SRMReturnCode getRequestTokens(std::list<std::string>& tokens,
00090                                    std::string description = "");
00091   
00097     SRMReturnCode getTURLs(SRMClientRequest& req,
00098                            std::list<std::string>& urls);
00099   
00105     SRMReturnCode putTURLs(SRMClientRequest& req,
00106                            std::list<std::string>& urls,
00107                            unsigned long long size = 0);
00108   
00112     SRMReturnCode requestBringOnline(SRMClientRequest& req);
00113   
00117     SRMReturnCode requestBringOnlineStatus(SRMClientRequest& req);
00118   
00123     SRMReturnCode info(SRMClientRequest& req,
00124                        std::list<struct SRMFileMetaData>& metadata,
00125                        const int recursive = 0,
00126                        bool report_error = true);
00127   
00133     SRMReturnCode releaseGet(SRMClientRequest& req);
00134   
00139     SRMReturnCode releasePut(SRMClientRequest& req);
00140   
00144     SRMReturnCode release(SRMClientRequest& req) {return SRM_ERROR_NOT_SUPPORTED;};
00145   
00149     SRMReturnCode abort(SRMClientRequest& req);
00150   
00154     SRMReturnCode remove(SRMClientRequest& req);
00155   
00160     SRMReturnCode copy(SRMClientRequest& req,
00161                        const std::string& source);
00162     
00166     SRMReturnCode mkDir(SRMClientRequest& req);
00167   };
00168 //} // namespace Arc
00169 
00170 #endif // __HTTPSD_SRM_CLIENT_2_2_H__