1#ifndef UPNPLIB_NET_URI_HPP
2#define UPNPLIB_NET_URI_HPP
23 char* in,
size_t index,
size_t* max) = 0;
29 token* in1,
const char* in2) = 0;
33 char* in,
size_t* size) = 0;
35 char* buf,
size_t size) = 0;
37 char* base_url,
char* rel_url) = 0;
39 const char *in,
size_t max,
uri_type *out) = 0;
44 virtual ~Curi()
override {}
47 return ::replace_escaped(in, index, max); }
49 return ::copy_URL_list(in, out); }
51 return ::free_URL_list(list); }
53 return ::token_string_casecmp(in1, in2); }
55 return ::token_cmp(in1, in2); }
57 return ::remove_escaped_chars(in, size); }
59 return ::remove_dots(buf, size); }
61 return ::resolve_rel_url(base_url, rel_url); }
63 return ::parse_uri(in, max, out); }
Represents a list of URLs as in the "callback" header of SUBSCRIBE message in GENA.
Represents a URI used in parse_uri and elsewhere.
Buffer used in parsinghttp messages, urls, etc. Generally this simply holds a pointer into a larger a...
Reengineered Object Oriented UPnP+ program code.
char * resolve_rel_url(char *base_url, char *rel_url)
Resolves a relative url with a base url.
int remove_dots(char *buf, size_t size)
Removes ".", and ".." from a path.
int copy_URL_list(URL_list *in, URL_list *out)
Copies one URL_list into another.
int replace_escaped(char *in, size_t index, size_t *max)
Replaces one single escaped character within a string with its unescaped version.
int token_cmp(token *in1, token *in2)
Compares two tokens.
int token_string_casecmp(token *in1, const char *in2)
Compares buffer in the token object with the buffer in in2 case insensitive.
int remove_escaped_chars(char *in, size_t *size)
Removes http escaped characters such as: "%20" and replaces them with their character representation.
int parse_uri(const char *in, size_t max, uri_type *out)
Parses a uri as defined in RFC 2396 (explaining URIs).
void free_URL_list(URL_list *list)
Frees the memory associated with a URL_list.