-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkoluri.h
48 lines (43 loc) · 1.24 KB
/
koluri.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef KOLURI_H_INCLUDED
#define KOLURI_H_INCLUDED
namespace kol
{
// Uniform Resource Identifier
// Ref: RFC 3986
class URI
{
public:
URI(const char* struri);
virtual ~URI();
URI(const URI& src);
URI& operator=(const URI& src);
const char* scheme() const { return m_scheme; }
const char* user() const { return m_user; }
const char* password() const { return m_password; }
const char* hostport() const { return m_hostport; }
const char* host() const { return m_host; }
int port() const { return m_port; }
const char* path() const { return m_path; }
const char* query() const { return m_query; }
const char* fragment() const { return m_fragment; }
private:
const char* set_scheme(const char* s);
const char* set_authority(const char* s);
const char* set_path(const char* s);
const char* set_query(const char* s);
const char* set_fragment(const char* s);
char* copy_chars(const char* s);
private:
char* m_uri;
char* m_scheme;
char* m_user;
char* m_password;
char* m_hostport;
char* m_host;
int m_port;
char* m_path;
char* m_query;
char* m_fragment;
};
}
#endif /* KOLURI_H_INCLUDED */