ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TUrl Class Reference

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]

Definition at line 41 of file TUrl.h.

Public Member Functions

 TUrl ()
 
 TUrl (const char *url, Bool_t defaultIsFile=kFALSE)
 
 TUrl (const TUrl &url)
 TUrl copy ctor. More...
 
TUrloperator= (const TUrl &rhs)
 TUrl assignment operator. More...
 
virtual ~TUrl ()
 Cleanup. More...
 
const char * GetUrl (Bool_t withDeflt=kFALSE) const
 Return full URL. More...
 
const char * GetProtocol () const
 
const char * GetUser () const
 
const char * GetPasswd () const
 
const char * GetHost () const
 
const char * GetHostFQDN () const
 Return fully qualified domain name of url host. More...
 
const char * GetFile () const
 
const char * GetAnchor () const
 
const char * GetOptions () const
 
const char * GetValueFromOptions (const char *key) const
 Return a value for a given key from the URL options. More...
 
Int_t GetIntValueFromOptions (const char *key) const
 Return a value for a given key from the URL options as an Int_t, a missing key returns -1. More...
 
Bool_t HasOption (const char *key) const
 Returns true if the given key appears in the URL options list. More...
 
void ParseOptions () const
 Parse URL options into a key/value map. More...
 
void CleanRelativePath ()
 Recompute the path removing all relative directory jumps via '..'. More...
 
const char * GetFileAndOptions () const
 Return the file and its options (the string specified behind the ?). More...
 
Int_t GetPort () const
 
Bool_t IsValid () const
 
void SetProtocol (const char *proto, Bool_t setDefaultPort=kFALSE)
 Set protocol and, optionally, change the port accordingly. More...
 
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)
 
void SetUrl (const char *url, Bool_t defaultIsFile=kFALSE)
 Parse url character string and split in its different subcomponents. More...
 
Bool_t IsSortable () const
 
Int_t Compare (const TObject *obj) const
 Compare two urls as strings. More...
 
void Print (Option_t *option="") const
 Print URL on stdout. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Static Public Member Functions

static TObjArrayGetSpecialProtocols ()
 Read the list of special protocols from the rootrc files. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Private Types

enum  EStatusBits { kUrlWithDefaultPort = BIT(14), kUrlHasDefaultPort = BIT(15) }
 

Private Member Functions

void FindFile (char *u, Bool_t stripDoubleSlash=kTRUE)
 Find file and optionally anchor and options. More...
 

Private Attributes

TString fUrl
 
TString fProtocol
 
TString fUser
 
TString fPasswd
 
TString fHost
 
TString fFile
 
TString fAnchor
 
TString fOptions
 
TString fFileOA
 
TString fHostFQ
 file with option and anchor More...
 
Int_t fPort
 fully qualified host name More...
 
TMapfOptionsMap
 

Static Private Attributes

static TObjArrayfgSpecialProtocols = 0
 map containing options key/value pairs More...
 
static THashListfgHostFQDNs = 0
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

#include <TUrl.h>

+ Inheritance diagram for TUrl:
+ Collaboration diagram for TUrl:

Member Enumeration Documentation

enum TUrl::EStatusBits
private
Enumerator
kUrlWithDefaultPort 
kUrlHasDefaultPort 

Definition at line 62 of file TUrl.h.

Constructor & Destructor Documentation

TUrl::TUrl ( )
inline

Definition at line 65 of file TUrl.h.

TUrl::TUrl ( const char *  url,
Bool_t  defaultIsFile = kFALSE 
)
TUrl::TUrl ( const TUrl url)

TUrl copy ctor.

Definition at line 342 of file TUrl.cxx.

TUrl::~TUrl ( )
virtual

Cleanup.

Definition at line 86 of file TUrl.cxx.

Member Function Documentation

void TUrl::CleanRelativePath ( )

Recompute the path removing all relative directory jumps via '..'.

Definition at line 683 of file TUrl.cxx.

Referenced by TAlienSystem::AccessPathName(), TAlienSystem::AlienFilestat(), TAlienSystem::ChangeDirectory(), TAlienSystem::Chmod(), TAlienSystem::MakeDirectory(), and TAlienSystem::OpenDirectory().

Int_t TUrl::Compare ( const TObject obj) const
virtual

Compare two urls as strings.

Reimplemented from TObject.

Definition at line 545 of file TUrl.cxx.

Referenced by TFileInfo::Compare().

void TUrl::FindFile ( char *  u,
Bool_t  stripDoubleSlash = kTRUE 
)
private

Find file and optionally anchor and options.

Definition at line 284 of file TUrl.cxx.

Referenced by SetUrl().

const char* TUrl::GetAnchor ( ) const
inline
const char* TUrl::GetFile ( ) const
inline

Definition at line 78 of file TUrl.h.

Referenced by TChirpSystem::AccessPathName(), TNetSystem::AccessPathName(), TProofOutputFile::AdoptFile(), TDataSetManagerAliEn::AliEnWhereIs(), TChirpSystem::Chmod(), ClassImp(), TProof::ClearData(), TNetFile::ConnectServer(), TProofBench::CopyDataSet(), TProofPerfAnalysis::FillFileInfo(), TProofServ::FilterLocalroot(), TCastorFile::FindServerAndPath(), TDCacheFile::GetDcapPath(), THDFSSystem::GetDirEntry(), TEntryList::GetFileName(), TChirpSystem::GetFsInfo(), TApplication::GetOptions(), TChirpSystem::GetPathInfo(), TXNetSystem::GetPathInfo(), TNetSystem::GetPathInfo(), TProofPerfAnalysis::GetWrkFileList(), TDataSetManagerFile::Init(), TProofOutputFile::Init(), TChirpSystem::Link(), TXNetSystem::Locate(), TProofBench::MakeDataSet(), TChirpSystem::MakeDirectory(), TNetSystem::MakeDirectory(), TNetFile::Matches(), TFile::Matches(), TFileOpenHandle::Matches(), TProofPlayerRemote::MergeOutput(), TAlienFile::Open(), TChirpSystem::OpenDirectory(), TXNetSystem::OpenDirectory(), TNetSystem::OpenDirectory(), TFile::OpenFromCache(), TArchiveFile::ParseUrl(), TNetFile::Print(), TProofMgrLite::ReadBuffer(), ReadRemote(), ReadRemoteImage(), ReadSize(), TChirpSystem::Rename(), TProofMgr::Rm(), TEntryList::ScanPaths(), TWebFile::SetMsgReadBuffer10(), TApplicationServer::Setup(), TSelEventGen::SlaveBegin(), TAlienFile::SUrl(), TChirpSystem::Symlink(), TChirpFile::SysOpen(), THDFSFile::SysOpen(), TNetFile::SysOpen(), TApplicationRemote::TApplicationRemote(), TFile::TFile(), TOracleServer::TOracleServer(), TChirpSystem::Unlink(), TXNetSystem::Unlink(), TNetSystem::Unlink(), TProofMgr::UploadFiles(), and TChirpSystem::Utime().

const char * TUrl::GetFileAndOptions ( ) const

Return the file and its options (the string specified behind the ?).

Convenience function useful when the option is used to pass authentication/access information for the specified file.

Definition at line 499 of file TUrl.cxx.

Referenced by TGFALSystem::AccessPathName(), TRFIOSystem::AccessPathName(), TDSet::Add(), TDataSetManager::CheckDataSetSrvMaps(), TXProofMgr::Cp(), TGFALSystem::GetPathInfo(), TRFIOSystem::GetPathInfo(), TFile::GetType(), TGFALSystem::MakeDirectory(), TRFIOSystem::MakeDirectory(), TFile::Open(), TGFALSystem::OpenDirectory(), TRFIOSystem::OpenDirectory(), TXNetSystem::Prepare(), TRFIOSystem::Unlink(), and TDSetElement::Validate().

const char* TUrl::GetHost ( ) const
inline

Definition at line 76 of file TUrl.h.

Referenced by TChirpSystem::AccessPathName(), TDataSetManager::CheckDataSetSrvMaps(), TChirpSystem::Chmod(), ClassImp(), TProof::ClearData(), TParallelMergingFile::Close(), TNetFile::ConnectServer(), TProofMgr::Create(), do_anadist_getkey(), TXProofMgr::Exec(), TXNetFile::FormUrl(), TDCacheFile::GetDcapPath(), TWebFile::GetFromWeb(), TWebFile::GetFromWeb10(), TChirpSystem::GetFsInfo(), TWebFile::GetHead(), TApplicationServer::GetHost(), TWebFile::GetHunk(), TXNetSystem::GetKey(), TWebFile::GetLine(), TChirpSystem::GetPathInfo(), TNetFileStager::GetPrefix(), TXNetFileStager::GetPrefix(), TFTP::Init(), TSystem::IsPathLocal(), TChirpSystem::Link(), TChirpSystem::MakeDirectory(), TProof::MarkBad(), TXProofMgr::MatchUrl(), TApplication::Open(), TChirpSystem::OpenDirectory(), TDataSetManager::ParseDataSetSrvMaps(), TProofMgr::Ping(), pingXproofdAt(), pingXrootdAt(), TProofPlayer::Process(), TProofResourcesStatic::ReadConfigFile(), ReadRemote(), ReadRemoteImage(), ReadSize(), TPacketizerAdaptive::ReassignPacket(), TChirpSystem::Rename(), TDataSetManager::ScanFile(), TApplicationRemote::SendFile(), TMonaLisaWriter::SendFileCloseEvent(), TMonaLisaWriter::SendFileOpenProgress(), TWebFile::SetMsgReadBuffer10(), TChirpSystem::Symlink(), TChirpFile::SysOpen(), TApplicationRemote::TApplicationRemote(), TOracleServer::TOracleServer(), TProof::TProof(), TProofBench::TProofBench(), TProofMgr::TProofMgr(), TSecContext::TSecContext(), TXSocket::TXSocket(), TChirpSystem::Unlink(), TParallelMergingFile::UploadAndReset(), TChirpSystem::Utime(), and TDocOutput::WriteSearch().

const char * TUrl::GetHostFQDN ( ) const
Int_t TUrl::GetIntValueFromOptions ( const char *  key) const

Return a value for a given key from the URL options as an Int_t, a missing key returns -1.

Definition at line 659 of file TUrl.cxx.

Referenced by TCivetweb::Create(), TRootSniffer::ProduceExe(), TRootSniffer::ProduceImage(), TRootSniffer::ProduceJson(), and TRootSniffer::ProduceMulti().

const char* TUrl::GetOptions ( ) const
inline
const char* TUrl::GetPasswd ( ) const
inline

Definition at line 75 of file TUrl.h.

Referenced by TWebFile::BasicAuthentication(), ClassImp(), and TXSlave::Init().

Int_t TUrl::GetPort ( ) const
inline
const char* TUrl::GetProtocol ( ) const
inline

Definition at line 73 of file TUrl.h.

Referenced by TAlienSystem::AccessPathName(), TDSet::Add(), TProofOutputFile::AdoptFile(), TAlienSystem::AlienFilestat(), TSocket::Authenticate(), TAlienSystem::ChangeDirectory(), TDataSetManager::CheckDataSetSrvMaps(), TWebFile::CheckProxy(), checkUrl(), TAlienSystem::Chmod(), ClassImp(), TProof::ClearData(), TNetFile::ConnectServer(), TSystem::ConsistentWith(), TXProofMgr::Cp(), TFile::Cp(), THostAuth::Create(), TNetSystem::Create(), TProofMgr::Create(), do_anadist_getkey(), TWinNTSystem::ExpandPathName(), TProofServ::FilterLocalroot(), TSystem::FindHelper(), TCastorFile::FindServerAndPath(), TProofServ::GetDataSetNodeMap(), TDCacheFile::GetDcapPath(), TEntryList::GetFileName(), TFileCollection::GetFilesPerServer(), TWebFile::GetFromWeb(), TWebFile::GetHead(), TApplication::GetOptions(), TNetFileStager::GetPrefix(), TXNetFileStager::GetPrefix(), TXSlave::Init(), TDataSetManagerFile::Init(), TFTP::Init(), TSlave::Init(), TProofBench::MakeDataSet(), TAlienSystem::MakeDirectory(), TXProofMgr::MatchUrl(), TProofMgr::MatchUrl(), TProofPlayerRemote::MergeOutput(), TAlienSystem::OpenDirectory(), TFile::OpenFromCache(), TDataSetManager::ParseDataSetSrvMaps(), TChain::ParseTreeFilename(), TProofMgr::Ping(), ReadRemote(), ReadRemoteImage(), ReadSize(), TPacketizerAdaptive::ReassignPacket(), TProofMgr::Rm(), TDataSetManager::ScanFile(), TWebFile::SetMsgReadBuffer10(), TWebFile::SetProxy(), TSelEventGen::SlaveBegin(), TFileCacheRead::TFileCacheRead(), TOracleServer::TOracleServer(), TProofBench::TProofBench(), and TProofMgr::TProofMgr().

TObjArray * TUrl::GetSpecialProtocols ( )
static

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.

Definition at line 569 of file TUrl.cxx.

Referenced by GetUrl(), and SetUrl().

const char * TUrl::GetUrl ( Bool_t  withDeflt = kFALSE) const

Return full URL.

If withDflt is kTRUE, explicitly add the port even if it matches the default value for the URL protocol.

Definition at line 385 of file TUrl.cxx.

Referenced by TAlienSystem::AccessPathName(), TFileCollection::Add(), TDSet::Add(), TChain::AddFileInfoList(), TProof::AddWorkers(), TProofOutputFile::AdoptFile(), TAlienSystem::AlienFilestat(), TDataSetManagerAliEn::AliEnWhereIs(), TFile::AsyncOpen(), TXProofMgr::AttachSession(), TAlienSystem::ChangeDirectory(), TDataSetManager::CheckDataSetSrvMaps(), TWebFile::CheckProxy(), TDataSetManager::CheckStagedStatus(), TAlienSystem::Chmod(), ClassImp(), Compare(), TXProofMgr::Cp(), TFile::Cp(), TNetFile::Create(), TProofMgr::Create(), TProofMgr::CreateSession(), TXNetFile::CreateXClient(), do_anadist_ds(), do_anadist_getkey(), TAlienCollection::ExportXML(), TProofPerfAnalysis::FillFileInfo(), TFileInfo::FindByUrl(), TCastorFile::FindServerAndPath(), TDataSetManagerAliEn::GetDataSet(), TDCacheFile::GetDcapPath(), THDFSSystem::GetDirEntry(), getDSMgr(), TAlienResult::GetFileInfoList(), TGLiteResult::GetFileInfoList(), TFileCollection::GetFilesOnServer(), TFileCollection::GetFilesPerServer(), TPacketizerFile::GetNextPacket(), TXNetSystem::GetPathInfo(), TFileStager::GetPathName(), getProof(), TWebFile::GetProxy(), TBranch::GetRealFileName(), TDavixFile::GetSize(), TProofMgr::GetUrl(), TProof::GetUrl(), TProofPerfAnalysis::GetWrkFileList(), TXProofMgr::HandleError(), TProof::HandleOutputOptions(), TXSlave::Init(), TXProofMgr::Init(), TProofOutputFile::Init(), TSlave::Init(), TProofPlayerRemote::InitPacketizer(), TFileStager::IsStaged(), TNetXNGSystem::Locate(), TXNetSystem::Locate(), TNetXNGFileStager::LocateCollection(), TXNetFileStager::LocateCollection(), TFileStager::LocateCollection(), TDSetElement::Lookup(), TAlienSystem::MakeDirectory(), TProofOutputFile::Merge(), TAlienFile::Open(), TXNetFile::Open(), TDavixFileInternal::Open(), TApplication::Open(), TFile::Open(), TProof::Open(), TAlienSystem::OpenDirectory(), TFile::OpenFromCache(), pingServerAt(), Print(), TFileInfo::Print(), TFileCollection::PrintDetailed(), TSelVerifyDataSet::Process(), TProofPlayer::Process(), TProof::Process(), TDataSetManager::ProcessFile(), TDataSetManager::ScanDataSet(), TDataSetManager::ScanFile(), TProofMonSenderML::SendDataSetInfo(), TProofMonSenderSQL::SendDataSetInfo(), TProofMonSenderML::SendFileInfo(), TProofMonSenderSQL::SendFileInfo(), TProof::ShowMissingFiles(), TProof::StartSlaves(), TNetFile::SysOpen(), TXNetFile::SysOpen(), TFile::TFile(), TFileInfo::TFileInfo(), TNetXNGFile::TNetXNGFile(), TProofMgr::TProofMgr(), TXNetFile::TXNetFile(), TSessionFrame::UpdateListOfDataSets(), and TProofMgr::UploadFiles().

const char* TUrl::GetUser ( ) const
inline
const char * TUrl::GetValueFromOptions ( const char *  key) const

Return a value for a given key from the URL options.

Returns 0 in case key is not found.

Definition at line 647 of file TUrl.cxx.

Referenced by TRootSniffer::CheckRestriction(), TCivetweb::Create(), TFastCgi::Create(), TRootSniffer::ExecuteCmd(), TRootSniffer::ProduceExe(), TRootSniffer::ProduceImage(), TRootSniffer::ProduceJson(), and TRootSniffer::ProduceMulti().

Bool_t TUrl::HasOption ( const char *  key) const

Returns true if the given key appears in the URL options list.

Definition at line 670 of file TUrl.cxx.

Referenced by TCivetweb::Create(), and TRootSniffer::ProduceExe().

Bool_t TUrl::IsSortable ( ) const
inlinevirtual

Reimplemented from TObject.

Definition at line 100 of file TUrl.h.

Bool_t TUrl::IsValid ( ) const
inline
TUrl & TUrl::operator= ( const TUrl rhs)

TUrl assignment operator.

Definition at line 361 of file TUrl.cxx.

void TUrl::ParseOptions ( ) const
void TUrl::Print ( Option_t option = "") const
virtual

Print URL on stdout.

Reimplemented from TObject.

Definition at line 555 of file TUrl.cxx.

void TUrl::SetAnchor ( const char *  anchor)
inline
void TUrl::SetFile ( const char *  file)
inline
void TUrl::SetHost ( const char *  host)
inline
void TUrl::SetOptions ( const char *  opt)
inline
void TUrl::SetPasswd ( const char *  pw)
inline

Definition at line 92 of file TUrl.h.

Referenced by TProof::AddWorkers().

void TUrl::SetPort ( Int_t  port)
inline
void TUrl::SetProtocol ( const char *  proto,
Bool_t  setDefaultPort = kFALSE 
)
void TUrl::SetUrl ( const char *  url,
Bool_t  defaultIsFile = kFALSE 
)

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.

Definition at line 108 of file TUrl.cxx.

Referenced by checkUrl(), TProofMgr::Create(), THDFSSystem::GetDirEntry(), TApplicationServer::GetOptions(), TDSetElement::Lookup(), TXNetSystem::Prepare(), TDataSetManager::ProcessFile(), and TWebFile::SetMsgReadBuffer10().

void TUrl::SetUser ( const char *  user)
inline

Definition at line 91 of file TUrl.h.

Referenced by TProof::AddWorkers(), TProof::HandleInputMessage(), and TProof::TProof().

Member Data Documentation

TString TUrl::fAnchor
private

Definition at line 50 of file TUrl.h.

Referenced by FindFile(), GetAnchor(), GetFileAndOptions(), GetUrl(), operator=(), SetUrl(), and TUrl().

TString TUrl::fFile
private
TString TUrl::fFileOA
mutableprivate

Definition at line 52 of file TUrl.h.

Referenced by GetFileAndOptions(), operator=(), SetUrl(), and TUrl().

THashList * TUrl::fgHostFQDNs = 0
staticprivate

Definition at line 58 of file TUrl.h.

Referenced by GetHostFQDN().

TObjArray * TUrl::fgSpecialProtocols = 0
staticprivate

map containing options key/value pairs

Definition at line 57 of file TUrl.h.

Referenced by GetSpecialProtocols().

TString TUrl::fHost
private

Definition at line 48 of file TUrl.h.

Referenced by GetHost(), GetHostFQDN(), GetUrl(), operator=(), SetUrl(), and TUrl().

TString TUrl::fHostFQ
mutableprivate

file with option and anchor

Definition at line 53 of file TUrl.h.

Referenced by GetHostFQDN(), operator=(), SetUrl(), and TUrl().

TString TUrl::fOptions
private

Definition at line 51 of file TUrl.h.

Referenced by FindFile(), GetFileAndOptions(), GetOptions(), GetUrl(), operator=(), SetUrl(), and TUrl().

TMap* TUrl::fOptionsMap
mutableprivate
TString TUrl::fPasswd
private

Definition at line 47 of file TUrl.h.

Referenced by GetPasswd(), GetUrl(), operator=(), SetUrl(), and TUrl().

Int_t TUrl::fPort
private

fully qualified host name

Definition at line 54 of file TUrl.h.

Referenced by FindFile(), GetPort(), GetUrl(), operator=(), Print(), SetProtocol(), SetUrl(), and TUrl().

TString TUrl::fProtocol
private

Definition at line 45 of file TUrl.h.

Referenced by GetProtocol(), GetUrl(), operator=(), SetProtocol(), SetUrl(), and TUrl().

TString TUrl::fUrl
mutableprivate

Definition at line 44 of file TUrl.h.

Referenced by GetUrl(), operator=(), SetProtocol(), SetUrl(), and TUrl().

TString TUrl::fUser
private

Definition at line 46 of file TUrl.h.

Referenced by GetUrl(), GetUser(), operator=(), SetUrl(), and TUrl().


The documentation for this class was generated from the following files: