35 #define URI_SEP_SCHEME "://" 36 #define URI_SEP_SCHEME_LEN 3
37 #define URI_SEP_USER_PASSWORD ":"
38 #define URI_SEP_USER_PASSWORD_LEN 1
39 #define URI_SEP_USER_INFO "@"
40 #define URI_SEP_USER_INFO_LEN 1
41 #define URI_SEP_PORT ":"
42 #define URI_SEP_PORT_LEN 1
43 #define URI_SEP_PATH "/"
44 #define URI_SEP_PATH_LEN 1
45 #define URI_SEP_QUERY "?"
46 #define URI_SEP_QUERY_LEN 1
48 #define URI_PORT_MAX_LEN 5 50 #define URI_SCHEME_FILE "file" 51 #define URI_LOCAL_HOST "localhost"
52 #define URI_PORT_NONE 0
void UriSetPath(Uri_T *pUri, const char *sPath)
Set the file path.
void UriSetHostName(Uri_T *pUri, const char *sHostName)
Set the hostname.
struct uri_struct_t Uri_T
char * m_sPath
absolute file path
void UriDelete(Uri_T *pUri)
Delete the URI compenent structure.
char * m_sUserInfo
user info
#define C_DECLS_BEGIN
C declaration block begin in C.
char * UriParseHostNew(const char *sHost, char **pHostName, int *pPortNum)
Parse the host string.
RoadNarrows Robotics common configuration file.
#define C_DECLS_END
C declaration block end in C.
char * UriStrNew(const Uri_T *pUri)
Construct a new URI string from the given URI components.
void UriSetScheme(Uri_T *pUri, const char *sScheme)
Set the scheme.
void UriSetPortNum(Uri_T *pUri, int nPortNum)
Set the port number.
char * m_sHostName
host name (domain or address)
int m_nPortNum
port number
Uri_T * UriParseNew(const char *sUri)
Parse a URI string.