UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
uri.hpp File Reference

Manage Uniform Resource Identifier (URI) as specified with RFC 3986. More...

+ Include dependency graph for uri.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  token
 Buffer used in parsing http messages, urls, etc. Generally this simply holds a pointer into a larger array. More...
 
struct  hostport_type
 Represents a host port, e.g. "[::1]:443". More...
 
struct  uri_type
 Represents a URI used in parse_uri and elsewhere. More...
 
class  UPnPsdk::CComponent
 Base class of a component. More...
 
class  UPnPsdk::CScheme
 Scheme component of a URI. More...
 
class  UPnPsdk::CUserinfo
 Userinfo subcomponent from an authority component of a URI reference. More...
 
class  UPnPsdk::CHost
 Host subcomponent from an authority component of a URI reference. More...
 
class  UPnPsdk::CPort
 Port subcomponent from an authority component of a URI reference. More...
 
class  UPnPsdk::CAuthority
 Authority component of a URI reference. More...
 
class  UPnPsdk::CPath
 Path component of a URI reference. More...
 
class  UPnPsdk::CQuery
 Query component of a URI reference. More...
 
class  UPnPsdk::CFragment
 Fragment component of a URI reference. More...
 
class  UPnPsdk::CPrepUriStr
 Internal class to prepare the input URI string, Not publicly usable. More...
 
class  UPnPsdk::CUriRef
 This is a URI reference. More...
 
class  UPnPsdk::CUri
 Representing a URI that can be modified with a relative reference. More...
 

Namespaces

namespace  UPnPsdk
 Reengineered Object Oriented UPnP+ program code.
 

Enumerations

enum struct  uriType { Absolute , Relative }
 Type of the URI. More...
 
enum struct  pathType { ABS_PATH , REL_PATH , OPAQUE_PART }
 Type of the 'path' part of the URI. More...
 

Functions

UPnPsdk_VIS void UPnPsdk::remove_dot_segments (std::string &a_path)
 Remove dot segments from a path.
 
UPnPsdk_VIS void UPnPsdk::decode_esc_chars (std::string &a_encoded)
 Replaces http percent encoded characters with their character representation.
 
UPnPsdk_VIS int parse_uri (const char *in, size_t max, uri_type *out)
 Parses a uri as defined in RFC 3986 (Uniform Resource Identifier).
 

Variables

constexpr int HTTP_SUCCESS {1}
 Yet another success code.
 

Detailed Description

Manage Uniform Resource Identifier (URI) as specified with RFC 3986.

Definition in file uri.hpp.


Class Documentation

◆ token

struct token

Buffer used in parsing http messages, urls, etc. Generally this simply holds a pointer into a larger array.

Definition at line 48 of file uri.hpp.

Class Members
const char * buff Buffer.
size_t size Size of the buffer.

◆ hostport_type

struct hostport_type

Represents a host port, e.g. "[::1]:443".

Definition at line 56 of file uri.hpp.

+ Collaboration diagram for hostport_type:
Class Members
token text Pointing to the full host:port string representation.
sockaddr_storage IPaddress Network socket address.

◆ uri_type

struct uri_type

Represents a URI used in parse_uri and elsewhere.

Definition at line 64 of file uri.hpp.

+ Collaboration diagram for uri_type:
Class Members
uriType type Member variable.
token scheme Member variable.
pathType path_type Member variable.
token pathquery Member variable.
token fragment Member variable.
hostport_type hostport Member variable.

Enumeration Type Documentation

◆ uriType

enum struct uriType
strong

Type of the URI.

Enumerator
Absolute 

The URI is absolute, means it has a 'scheme' component.

Relative 

The URI is relative, means it hasn't a 'scheme' component.

Definition at line 25 of file uri.hpp.

◆ pathType

enum struct pathType
strong

Type of the 'path' part of the URI.

Enumerator
ABS_PATH 

The 'path' component begins with a '/'.

REL_PATH 

The 'path' component doesn't begin with a '/'.

OPAQUE_PART 

A URI is opaque if, and only if, it is absolute and its 'scheme'-specific part does not begin with a slash character ('/'). An opaque URI has a 'scheme', a 'scheme'-specific part, and possibly a 'fragment'; all other components are undefined. A typical example of an opaque uri is a mail to url "mailto:a@b.com". (source)

Definition at line 31 of file uri.hpp.

Variable Documentation

◆ HTTP_SUCCESS

constexpr int HTTP_SUCCESS {1}
inlineconstexpr

Yet another success code.

Definition at line 21 of file uri.hpp.