uriparser.h   uriparser.h 
#ifndef _URI_PARSER_H_ #ifndef _URI_PARSER_H_
#define _URI_PARSER_H_ #define _URI_PARSER_H_
/* /*
* this program is designed based on RFC3986 * this program is designed based on RFC3986
*/ */
enum URIType{URIURI, URIRelativeRef};
enum HOSTType{
IPv4Address,
IPv6Address,
IPvFuture,
RegName};
enum PathType{
PathNoScheme,
PathAbsolute,
PathRootless,
PathAbEmpty};
typedef struct uri_struct typedef struct uri_struct
{ {
enum URIType utype;
enum HOSTType htype;
enum PathType ptype;
int hasPort;
#define DEFAULT_MAX_LEN (64) #define DEFAULT_MAX_LEN (64)
#define MAX_URI_SCHEME DEFAULT_MAX_LEN #define MAX_URI_SCHEME DEFAULT_MAX_LEN
char * scheme; char * scheme;
#define MAX_URI_USERINFO (256) #define MAX_URI_USERINFO (256)
char * userinfo; char * userinfo;
#define MAX_URI_HOST (256) #define MAX_URI_HOST (256)
char * host; char * host;
unsigned short port; unsigned short port;
#define MAX_URI_PATH (1024) #define MAX_URI_PATH (1024)
char * path; char * path;
skipping to change at line 68 skipping to change at line 85
/** DESCRIPTION: /** DESCRIPTION:
** parse uri from file ** parse uri from file
** PARAMTER: ** PARAMTER:
** uri - output parameter, need custom free ** uri - output parameter, need custom free
** filename - input file ** filename - input file
** RETURN VALUE: ** RETURN VALUE:
** 0 for succeed ** 0 for succeed
** other value for failed. ** other value for failed.
**/ **/
/* deprecated
int URIParseFile( int URIParseFile(
URI * uri, // for out put URI * uri, // for out put
const char * filename); //input file const char * filename); //input file
*/
/** DESCRIPTION: /** DESCRIPTION:
** free uri ** free uri
** PARAMETER: ** PARAMETER:
** uri - for free ** uri - for free
**/ **/
void URIFree(URI *uri); void URIFree(URI *uri);
#endif #endif
 End of changes. 4 change blocks. 
0 lines changed or deleted 19 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/