# class URI | Encapsulation for an URI. More...
Full name | `TelEngine::URI`
Definition | `#include <yateclass.h>`
Inherits | TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- URI ()
- URI (const URI& uri)
- explicit URI (const String& uri)
- explicit URI (const char* uri)
- URI (const char* proto, const char* user, const char* host, int port = 0, const char* desc = 0)
- void parse () const
- inline URI& operator= (const URI& value)
- inline URI& operator= (const String& value)
- inline URI& operator= (const char* value)
- inline const String& getDescription () const
- inline const String& getProtocol () const
- inline const String& getUser () const
- inline const String& getHost () const
- inline int getPort () const
- inline const String& getExtra () const

#### Protected Methods

- virtual void changed ()

#### Protected Members

- mutable bool m_parsed
- mutable String m_desc
- mutable String m_proto
- mutable String m_user
- mutable String m_host
- mutable String m_extra
- mutable int m_port

## Detailed Description

Uniform Resource Identifier encapsulation and parser. For efficiency reason the parsing is delayed as long as possible

URI () | ### URI

Empty URI constructor

URI (const URI& uri) | ### URI

Copy constructor

Parameters:

uri | Original URI to copy

explicit URI (const String& uri) | ### URI

Constructor from a String that gets parsed later

Parameters:

uri | String form of the URI

explicit URI (const char* uri) | ### URI

Constructor from a C string that gets parsed later

Parameters:

uri | String form of the URI

URI (const char* proto, const char* user, const char* host, int port = 0, const char* desc = 0) | ### URI

Constructor from URI components

Parameters:

proto | Protocol - something like "http", "sip", etc.
user | User component of the URI
host | Hostname component of the URI
port | Port part of the URI (optional)
desc | Description part in front of the URI (optional)

void parse () | ### parse

[const]

Calling this method ensures the string URI is parsed into components

inline URI& operator= (const URI& value) | ### operator=

Assignment operator from URI

Parameters:

value | New URI value to assign

Reimplemented from String.

inline URI& operator= (const String& value) | ### operator=

Assignment operator from String

Parameters:

value | New URI value to assign

Reimplemented from String.

inline URI& operator= (const char* value) | ### operator=

Assignment operator from C string

Parameters:

value | New URI value to assign

Reimplemented from String.

inline const String& getDescription () | ### getDescription

[const]

Access method to the description part of the URI

Returns: Description part of the URI

inline const String& getProtocol () | ### getProtocol

[const]

Access method to the protocol part of the URI

Returns: Protocol part of the URI

inline const String& getUser () | ### getUser

[const]

Access method to the user part of the URI

Returns: User component of the URI

inline const String& getHost () | ### getHost

[const]

Access method to the host part of the URI

Returns: Hostname part of the URI

inline int getPort () | ### getPort

[const]

Access method to the port part of the URI

Returns: Port of the URI, zero if not set

inline const String& getExtra () | ### getExtra

[const]

Access method to the additional text part of the URI

Returns: Additional text of the URI including the separator

void changed () | ### changed

[protected virtual]

Notification method called whenever the string URI has changed. The default behaviour is to invalidate the parsed flag and cal the method inherited from String.

Reimplemented from String.

mutable bool m_parsed | ### m_parsed

[protected]

mutable String m_desc | ### m_desc

[protected]

mutable String m_proto | ### m_proto

[protected]

mutable String m_user | ### m_user

[protected]

mutable String m_host | ### m_host

[protected]

mutable String m_extra | ### m_extra

[protected]

mutable int m_port | ### m_port

[protected]

Generated by: paulc on bussard on Fri May 8 12:37:22 2015, using kdoc 2.0a54.