-
Notifications
You must be signed in to change notification settings - Fork 1
/
url_parser.h
49 lines (41 loc) · 939 Bytes
/
url_parser.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
49
/*_
* Copyright 2010 Scyphus Solutions Co. Ltd. All rights reserved.
*
* Authors:
* Hirochika Asai
*/
#ifndef _URL_PARSER_H
#define _URL_PARSER_H
/*
* URL storage
*/
struct parsed_url {
char *scheme; /* mandatory */
char *host; /* mandatory */
char *port; /* optional */
char *path; /* optional */
char *query; /* optional */
char *fragment; /* optional */
char *username; /* optional */
char *password; /* optional */
};
#ifdef __cplusplus
extern "C" {
#endif
/*
* Declaration of function prototypes
*/
struct parsed_url *parse_url(const char *);
void parsed_url_free(struct parsed_url *);
#ifdef __cplusplus
}
#endif
#endif /* _URL_PARSER_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/