Davix::Uri Class Reference

Uri parser convenience class for uri parsing. More...

#include <davixuri.hpp>

Public Member Functions

 Uri ()
 Construct an empty invalid Uri.
 Uri (const std::string &uri_string)
 construct a new Davix Uri from a string URL
 Uri (const Uri &uri)
 Copy constructor.
Urioperator= (const Uri &orig)
const std::string & getString () const
int getPort () const
const std::string & getProtocol () const
const std::string & getHost () const
const std::string & getPath () const
const std::string & getPathAndQuery () const
const std::string & getQuery () const
StatusCode::Code getStatus () const

Protected Member Functions

void _init ()

Protected Attributes

std::string uri_string
UriPrivate * d_ptr

Detailed Description

Uri parser convenience class for uri parsing.


Member Function Documentation

const std::string& Davix::Uri::getHost (  )  const

get the host name

Returns:
return the hostname or an empty string if error
const std::string& Davix::Uri::getPath (  )  const

get the path part of the Uri

Returns:
return the path of the Uri or an empty string if error
const std::string& Davix::Uri::getPathAndQuery (  )  const

get a concatenation of the path and the query argument of the URI

Returns:
return a path + query arguments concatenation or an empty string if error
int Davix::Uri::getPort (  )  const

get the port number

Returns:
return the port number of 0 if error
const std::string& Davix::Uri::getProtocol (  )  const

get the protocol scheme

Returns:
return the protocol scheme or an empty string if error
const std::string& Davix::Uri::getQuery (  )  const

get the query argument part of the uri

Returns:
return the query path string or an empty string if not exist or if error
StatusCode::Code Davix::Uri::getStatus (  )  const

Status of the Uri see StatusCode::Code

Returns:
StatusCode::OK if success or StatusCode::UriParsingError if error
const std::string& Davix::Uri::getString (  )  const

get a string representation of the full uri

Returns:
return the path or an empty string if error

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

Generated on 8 Mar 2013 for davix by  doxygen 1.6.1