library: libCore
#include "TUrl.h"

TUrl


class description - header file - source file - inheritance tree (.pdf)

class TUrl : public TObject

Inheritance Chart:
TObject
<-
TUrl
    private:
void FindFile(char* u, Bool_t stripDoubleSlash = kTRUE) public:
TUrl() TUrl(const char* url, Bool_t defaultIsFile = kFALSE) TUrl(const TUrl& url) virtual ~TUrl() static TClass* Class() virtual Int_t Compare(const TObject* obj) const const char* GetAnchor() const const char* GetFile() const const char* GetFileAndOptions() const const char* GetHost() const const char* GetHostFQDN() const const char* GetOptions() const const char* GetPasswd() const Int_t GetPort() const const char* GetProtocol() const static TObjArray* GetSpecialProtocols() const char* GetUrl(Bool_t withDeflt = kFALSE) const char* GetUser() const virtual TClass* IsA() const virtual Bool_t IsSortable() const Bool_t IsValid() const TUrl& operator=(const TUrl& rhs) virtual void Print(Option_t* option = "") const void SetAnchor(const char* anchor) void SetFile(const char* file) void SetHost(const char* host) void SetOptions(const char* opt) void SetPasswd(const char* pw) void SetPort(Int_t port) void SetProtocol(const char* proto, Bool_t setDefaultPort = kFALSE) void SetUrl(const char* url, Bool_t defaultIsFile = kFALSE) void SetUser(const char* user) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TString fUrl full URL TString fProtocol protocol: http, ftp, news, root, proof, ... TString fUser user name TString fPasswd password TString fHost remote host TString fFile remote object TString fAnchor anchor in object (after #) TString fOptions options/search (after ?) TString fFileOA !file with option and anchor TString fHostFQ !fully qualified host name Int_t fPort port through which to contact remote server static TObjArray* fgSpecialProtocols list of special protocols

Class Description

                                                                      
 TUrl                                                                 
                                                                      
 This class represents a WWW compatible URL.                          
 It provides member functions to return the different parts of        
 an URL. The supported url format is:                                 
  [proto://][user[:passwd]@]host[:port]/file.ext[#anchor][?options]   
                                                                      

TUrl(const char *url, Bool_t defaultIsFile)
 Parse url character string and split in its different subcomponents.
 Use IsValid() to check if URL is legal.

 url: [proto://][user[:passwd]@]host[:port]/file.ext[?options][#anchor]

 Known protocols: http, root, proof, ftp, news and any special protocols
 defined in the rootrc Url.Special key.
 The default protocol is "http", unless defaultIsFile is true in which
 case the url is assumed to be of type "file".
 If a passwd contains a @ it must be escaped by a \\, e.g.
 "pip@" becomes "pip\\@".

 Default ports: http=80, root=1094, proof=1093, ftp=20, news=119.
 Port #1093 has been assigned by IANA (www.iana.org) to proofd.
 Port #1094 has been assigned by IANA (www.iana.org) to rootd.
void SetUrl(const char *url, Bool_t defaultIsFile)
 Parse url character string and split in its different subcomponents.
 Use IsValid() to check if URL is legal.

 url: [proto://][user[:passwd]@]host[:port]/file.ext[?options][#anchor]

 Known protocols: http, root, proof, ftp, news and any special protocols
 defined in the rootrc Url.Special key.
 The default protocol is "http", unless defaultIsFile is true in which
 case the url is assumed to be of type "file".
 If a passwd contains a @ it must be escaped by a \\, e.g.
 "pip@" becomes "pip\\@".

 Default ports: http=80, root=1094, proof=1093, ftp=20, news=119.
 Port #1093 has been assigned by IANA (www.iana.org) to proofd.
 Port #1094 has been assigned by IANA (www.iana.org) to rootd.
void FindFile(char *u, Bool_t stripDoubleSlash)
 Find file and optionally anchor and options.
TUrl(const TUrl &url)
 TUrl copt ctor.
TUrl & operator=(const TUrl &rhs)
 TUrl assignment operator.
const char * GetUrl(Bool_t withDeflt)
 Return full URL. If withDflt is kTRUE, explicitly add the port even
 if it matches the default value for the URL protocol.
const char * GetHostFQDN()
 Return fully qualified domain name of url host. If host cannot be
 resolved or not valid return the host name as originally specified.
const char * GetFileAndOptions()
 Return the file and its options (the string specified behind the ?).
 Convenience function useful when the option is used to pass
 authetication/access information for the specified file.
void SetProtocol(const char *proto, Bool_t setDefaultPort)
 Set protocol and, optionally, change the port accordingly.
Int_t Compare(const TObject *obj)
 Compare two urls as strings.
void Print(Option_t *)
 Print URL on stdout.
TObjArray * GetSpecialProtocols()
 Read the list of special protocols from the rootrc files.
 These protocols will be parsed in a protocol and a file part,
 no host or other info will be determined. This is typically
 used for legacy file descriptions like: rfio:host:/path/file.root.
TUrl()
virtual ~TUrl()
Int_t GetPort()
Bool_t IsValid()
void SetUser(const char *user)
void SetPasswd(const char *pw)
void SetHost(const char *host)
void SetFile(const char *file)
void SetAnchor(const char *anchor)
void SetOptions(const char *opt)
void SetPort(Int_t port)
Bool_t IsSortable()

Author: Fons Rademakers 17/01/97
Last update: root/net:$Name: $:$Id: TUrl.cxx,v 1.32 2006/06/21 13:09:26 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.