CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Url Class Reference

#include <url.h>

Public Member Functions

 ~Url ()
 
std::string protocol () const
 
std::string address () const
 
std::string host () const
 
std::string path () const
 
int port () const
 

Static Public Member Functions

static UrlParse (const std::string &url, const std::string &default_protocol=kDefaultProtocol, int default_port=kDefaultPort)
 
static bool ValidateHost (const std::string &host)
 

Static Public Attributes

static const int kDefaultPort = 80
 
static const char * kDefaultProtocol = "http"
 

Private Member Functions

 Url ()
 
 Url (const std::string &protocol, const std::string &host, const std::string &path, int port)
 

Private Attributes

std::string protocol_
 
std::string host_
 
std::string path_
 
int port_
 
std::string address_
 

Detailed Description

This file is part of the CernVM File System.

Definition at line 10 of file url.h.

Constructor & Destructor Documentation

Url::~Url ( )

Definition at line 105 of file url.cc.

Url::Url ( )
private

Definition at line 90 of file url.cc.

Referenced by Parse().

Here is the caller graph for this function:

Url::Url ( const std::string &  protocol,
const std::string &  host,
const std::string &  path,
int  port 
)
private

Definition at line 92 of file url.cc.

Here is the call graph for this function:

Member Function Documentation

std::string Url::address ( ) const
inline

Definition at line 42 of file url.h.

std::string Url::host ( ) const
inline

Definition at line 43 of file url.h.

Referenced by Parse().

Here is the caller graph for this function:

Url * Url::Parse ( const std::string &  url,
const std::string &  default_protocol = kDefaultProtocol,
int  default_port = kDefaultPort 
)
static

Parse an URL string

Parse an URL string and extract the protocol, host, port, and path components. The method can be called with protocol and port values that are used when the input string doesn't contain these parts. The default protocol is "http" and the default port is 80

Definition at line 14 of file url.cc.

Referenced by notify::SubscriberSSE::Subscribe().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Url::path ( ) const
inline

Definition at line 44 of file url.h.

Referenced by Parse(), and Url().

Here is the caller graph for this function:

int Url::port ( ) const
inline

Definition at line 45 of file url.h.

Referenced by Parse().

Here is the caller graph for this function:

std::string Url::protocol ( ) const
inline

Definition at line 41 of file url.h.

Referenced by Parse().

Here is the caller graph for this function:

bool Url::ValidateHost ( const std::string &  host)
static

Definition at line 76 of file url.cc.

Referenced by Parse().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::string Url::address_
private

Definition at line 56 of file url.h.

Referenced by address(), and Url().

std::string Url::host_
private

Definition at line 53 of file url.h.

Referenced by host().

const int Url::kDefaultPort = 80
static

Parse a URL string and build a Url object

A URL string is parsed and a Url object is constructed with the extracted address and port components.

Returns NULL if the URL string is not well formed

Ex: The url: <fqdn>:<port>/<path> will parse as address <fqdn>/<path> and port <port>

This file is part of the CernVM File System.

Definition at line 23 of file url.h.

Referenced by Url().

const char * Url::kDefaultProtocol = "http"
static

Definition at line 24 of file url.h.

std::string Url::path_
private

Definition at line 54 of file url.h.

Referenced by path().

int Url::port_
private

Definition at line 55 of file url.h.

Referenced by port(), and Url().

std::string Url::protocol_
private

Definition at line 52 of file url.h.

Referenced by protocol().


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