url-parser.h (960B)
1 /*_ 2 * Copyright 2010 Scyphus Solutions Co. Ltd. All rights reserved. 3 * 4 * Authors: 5 * Hirochika Asai 6 */ 7 8 #ifndef _URL_PARSER_H 9 #define _URL_PARSER_H 10 11 /* 12 * URL storage 13 */ 14 struct parsed_url { 15 char *scheme; /* mandatory */ 16 char *host; /* mandatory */ 17 char *port; /* optional */ 18 char *path; /* optional */ 19 char *query; /* optional */ 20 char *fragment; /* optional */ 21 char *username; /* optional */ 22 char *password; /* optional */ 23 }; 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /* 30 * Declaration of function prototypes 31 */ 32 struct parsed_url * parse_url(const char *); 33 void parsed_url_free(struct parsed_url *); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif /* _URL_PARSER_H */ 40 41 /* 42 * Local variables: 43 * tab-width: 4 44 * c-basic-offset: 4 45 * End: 46 * vim600: sw=4 ts=4 fdm=marker 47 * vim<600: sw=4 ts=4 48 */