LibreOffice Module cppuhelper (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
cppu::UnoUrl Class Reference

Parse UNO URLs into their components. More...

#include <unourl.hxx>

Collaboration diagram for cppu::UnoUrl:
[legend]

Classes

class  Impl
 

Public Member Functions

 UnoUrl (rtl::OUString const &rUrl)
 Construct a UNO URL from a string representation. More...
 
 UnoUrl (UnoUrl const &rOther)
 
 ~UnoUrl ()
 
UnoUrloperator= (UnoUrl const &rOther)
 
UnoUrlDescriptor const & getConnection () const
 Return the connection descriptor component of the URL. More...
 
UnoUrlDescriptor const & getProtocol () const
 Return the protocol descriptor component of the URL. More...
 
rtl::OUString const & getObjectName () const
 Return the object-name component of the URL. More...
 

Private Attributes

Implm_pImpl
 

Detailed Description

Parse UNO URLs into their components.

The ABNF for UNO URLs is as follows (see RFCs 2234, 2396, also see http://udk.openoffice.org/common/man/spec/uno-url.html):

uno-url = "UNO:" connection ";" protocol ";" object-name connection = descriptor protocol = descriptor descriptor = name *("," parameter) name = 1*alphanum parameter = key "=" value key = 1*alphanum value = *vchar valchar = unreserved / escaped / "$" / "&" / "+" / "/" / ":" / "?" / "@" object-name = 1*ochar ochar = unreserved / "$" / "&" / "+" / "," / "/" / ":" / "=" / "?" / "@"

Within a descriptor, the name and the keys are case insensitive, and within the parameter list all keys must be distinct.

Parameter values are encoded using UTF-8. Note that parsing of parameter values as done by UnoUrl and UnoUrlDescriptor is not strict: Invalid UTF-16 entities in the input, as well as broken escape sequences ("%" not followed by two hex digits) are copied verbatim to the output, invalid bytes in the converted UTF-8 data are considered individual Unicode characters, and invalid UTF-16 entities in the resulting output (e.g., a high surrogate not followed by a low surrogate) are not detected.

Definition at line 136 of file unourl.hxx.

Constructor & Destructor Documentation

◆ UnoUrl() [1/2]

cppu::UnoUrl::UnoUrl ( rtl::OUString const &  rUrl)
explicit

Construct a UNO URL from a string representation.

Parameters
rUrlThe string representation of a UNO URL.
Exceptions
rtl::MalformedUriExceptionThrown when the given string representation is invalid.

References getConnection().

◆ UnoUrl() [2/2]

UnoUrl::UnoUrl ( UnoUrl const &  rOther)

Definition at line 233 of file unourl.cxx.

References clone(), and m_pImpl.

◆ ~UnoUrl()

UnoUrl::~UnoUrl ( )

Definition at line 236 of file unourl.cxx.

References m_pImpl.

Member Function Documentation

◆ getConnection()

UnoUrlDescriptor const & UnoUrl::getConnection ( ) const

Return the connection descriptor component of the URL.

Returns
A reference to the connection descriptor. The reference is valid for the lifetime of this URL object.

Definition at line 252 of file unourl.cxx.

References cppu::UnoUrl::Impl::m_aConnection, and m_pImpl.

◆ getObjectName()

OUString const & UnoUrl::getObjectName ( ) const

Return the object-name component of the URL.

Returns
A reference to the (case sensitive) object-name. The reference is valid for the lifetime of this URL object.

Definition at line 262 of file unourl.cxx.

References cppu::UnoUrl::Impl::m_aObjectName, and m_pImpl.

◆ getProtocol()

UnoUrlDescriptor const & UnoUrl::getProtocol ( ) const

Return the protocol descriptor component of the URL.

Returns
A reference to the protocol descriptor. The reference is valid for the lifetime of this URL object.

Definition at line 257 of file unourl.cxx.

References cppu::UnoUrl::Impl::m_aProtocol, and m_pImpl.

◆ operator=()

UnoUrl & UnoUrl::operator= ( UnoUrl const &  rOther)

Definition at line 241 of file unourl.cxx.

References cppu::UnoUrl::Impl::clone(), and m_pImpl.

Member Data Documentation

◆ m_pImpl

Impl* cppu::UnoUrl::m_pImpl
private

Definition at line 182 of file unourl.hxx.

Referenced by getConnection(), getObjectName(), getProtocol(), operator=(), and ~UnoUrl().


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