XrdCl::URL Class Reference

URL representation. More...

#include <XrdClURL.hh>

List of all members.

Public Types

typedef std::map< std::string,
std::string > 
ParamsMap

Public Member Functions

 URL ()
 Default constructor.
 URL (const std::string &url)
bool IsValid () const
 Is the url valid.
std::string GetURL () const
 Get the URL.
std::string GetHostId () const
 Get the host part of the URL (user:password@host:port).
std::string GetLocation () const
 Get protocol://host:port/path.
const std::string & GetProtocol () const
 Get the protocol.
void SetProtocol (const std::string &protocol)
 Set protocol.
const std::string & GetUserName () const
 Get the username.
void SetUserName (const std::string &userName)
 Set the username.
const std::string & GetPassword () const
 Get the password.
void SetPassword (const std::string &password)
 Set the password.
const std::string & GetHostName () const
 Get the name of the target host.
void SetHostName (const std::string &hostName)
 Set the host name.
int GetPort () const
 Get the target port.
void SetPort (int port)
const std::string & GetPath () const
 Get the path.
void SetPath (const std::string &path)
 Set the path.
std::string GetPathWithParams () const
 Get the path with params.
const ParamsMapGetParams () const
 Get the URL params.
std::string GetParamsAsString () const
 Get the URL params as string.
void SetParams (const std::string &params)
 Set params.
void SetParams (const ParamsMap &params)
 Set params.
bool FromString (const std::string &url)
 Parse a string and fill the URL fields.
void Clear ()
 Clear the url.

Private Member Functions

bool ParseHostInfo (const std::string hhostInfo)
bool ParsePath (const std::string &path)
void ComputeHostId ()
void ComputeURL ()

Private Attributes

std::string pHostId
std::string pProtocol
std::string pUserName
std::string pPassword
std::string pHostName
int pPort
std::string pPath
ParamsMap pParams
std::string pURL


Detailed Description

URL representation.


Member Typedef Documentation

typedef std::map<std::string, std::string> XrdCl::URL::ParamsMap

Map of get params


Constructor & Destructor Documentation

XrdCl::URL::URL (  ) 

Default constructor.

XrdCl::URL::URL ( const std::string &  url  ) 

Constructor

Parameters:
url an url in format: protocol://user:password@host:port/path?param1=x&param2=y


Member Function Documentation

void XrdCl::URL::Clear (  ) 

Clear the url.

void XrdCl::URL::ComputeHostId (  )  [private]

void XrdCl::URL::ComputeURL (  )  [private]

bool XrdCl::URL::FromString ( const std::string &  url  ) 

Parse a string and fill the URL fields.

std::string XrdCl::URL::GetHostId (  )  const [inline]

Get the host part of the URL (user:password@host:port).

const std::string& XrdCl::URL::GetHostName (  )  const [inline]

Get the name of the target host.

std::string XrdCl::URL::GetLocation (  )  const

Get protocol://host:port/path.

const ParamsMap& XrdCl::URL::GetParams (  )  const [inline]

Get the URL params.

std::string XrdCl::URL::GetParamsAsString (  )  const

Get the URL params as string.

const std::string& XrdCl::URL::GetPassword (  )  const [inline]

Get the password.

const std::string& XrdCl::URL::GetPath (  )  const [inline]

Get the path.

std::string XrdCl::URL::GetPathWithParams (  )  const

Get the path with params.

int XrdCl::URL::GetPort (  )  const [inline]

Get the target port.

const std::string& XrdCl::URL::GetProtocol (  )  const [inline]

Get the protocol.

std::string XrdCl::URL::GetURL (  )  const [inline]

Get the URL.

const std::string& XrdCl::URL::GetUserName (  )  const [inline]

Get the username.

bool XrdCl::URL::IsValid (  )  const

Is the url valid.

bool XrdCl::URL::ParseHostInfo ( const std::string  hhostInfo  )  [private]

bool XrdCl::URL::ParsePath ( const std::string &  path  )  [private]

void XrdCl::URL::SetHostName ( const std::string &  hostName  )  [inline]

Set the host name.

void XrdCl::URL::SetParams ( const ParamsMap params  )  [inline]

Set params.

void XrdCl::URL::SetParams ( const std::string &  params  ) 

Set params.

void XrdCl::URL::SetPassword ( const std::string &  password  )  [inline]

Set the password.

void XrdCl::URL::SetPath ( const std::string &  path  )  [inline]

Set the path.

void XrdCl::URL::SetPort ( int  port  )  [inline]

void XrdCl::URL::SetProtocol ( const std::string &  protocol  )  [inline]

Set protocol.

void XrdCl::URL::SetUserName ( const std::string &  userName  )  [inline]

Set the username.


Member Data Documentation

std::string XrdCl::URL::pHostId [private]

std::string XrdCl::URL::pHostName [private]

ParamsMap XrdCl::URL::pParams [private]

std::string XrdCl::URL::pPassword [private]

std::string XrdCl::URL::pPath [private]

int XrdCl::URL::pPort [private]

std::string XrdCl::URL::pProtocol [private]

std::string XrdCl::URL::pURL [private]

std::string XrdCl::URL::pUserName [private]


The documentation for this class was generated from the following file:
Generated on 16 Jan 2014 for xrootd by  doxygen 1.4.7