Back to index

nordugrid-arc-nox  1.1.0~rc6
SRMURL.h
Go to the documentation of this file.
00001 #ifndef __HTTPSD_SRM_URL_H__
00002 #define __HTTPSD_SRM_URL_H__
00003 
00004 #include <arc/URL.h>
00005 
00006 //namespace Arc {
00007   
00008   class SRMURL:public Arc::URL {
00009    public:
00010    
00011     enum SRM_URL_VERSION {
00012       SRM_URL_VERSION_1,
00013       SRM_URL_VERSION_2_2,
00014       SRM_URL_VERSION_UNKNOWN
00015     };
00016    
00021     SRMURL(std::string url);
00022   
00026     const std::string& Endpoint(void) const { return Path(); };
00027   
00031     void SetSRMVersion(const std::string version);
00032   
00036     const std::string& FileName(void) const { if(!valid) return empty; return filename; };
00037   
00041     std::string ContactURL(void) const ;
00042   
00046     std::string BaseURL(void) const;
00047   
00051     std::string ShortURL(void) const;
00052   
00056     std::string FullURL(void) const;
00057   
00058     enum SRM_URL_VERSION SRMVersion() { return srm_version; };
00059     bool Short(void) const { return isshort; };
00060     void GSSAPI(bool gssapi);
00061     bool GSSAPI(void) const;
00062     void SetPort(int portno) { port = portno; };
00064     bool PortDefined() { return portdefined; };
00065     operator bool(void) { return valid; };
00066     bool operator!(void) { return !valid; };
00067 
00068    private:
00069     static std::string empty;
00070     std::string filename;
00071     bool isshort;
00072     bool valid;
00073     bool portdefined;
00074     enum SRM_URL_VERSION srm_version;
00075     
00076 
00077   };
00078 
00079 //} // namespace Arc
00080 
00081 #endif // __HTTPSD_SRM_URL_H__