yuarel.h
Go to the documentation of this file.
#ifndef INC_YUAREL_H
#define INC_YUAREL_H
#ifdef __cplusplus
extern "C" {
#endif
struct yuarel {
char *scheme; /* scheme, without ":" and "//" */
char *username; /* username, default: NULL */
char *password; /* password, default: NULL */
char *host; /* hostname or IP address */
int port; /* port, default: 0 */
char *path; /* path, without leading "/", default: NULL */
char *query; /* query, default: NULL */
char *fragment; /* fragment, default: NULL */
};
/* A struct to hold the query string parameter values. */
struct yuarel_param {
char *key;
char *val;
};
extern int yuarel_parse(struct yuarel *url, char *url_str);
extern int yuarel_split_path(char *path, char **parts, int max_parts);
extern int yuarel_parse_query(char *query, char delimiter, struct yuarel_param *params, int max_params);
#ifdef __cplusplus
}
#endif
#endif /* INC_YUAREL_H */
yuarel_param
Definition yuarel.h:49
yuarel_param::key
char * key
Definition yuarel.h:50
yuarel_param::val
char * val
Definition yuarel.h:51
yuarel
Definition yuarel.h:37
yuarel::host
char * host
Definition yuarel.h:41
yuarel::password
char * password
Definition yuarel.h:40
yuarel::query
char * query
Definition yuarel.h:44
yuarel::fragment
char * fragment
Definition yuarel.h:45
yuarel::port
int port
Definition yuarel.h:42
yuarel::username
char * username
Definition yuarel.h:39
yuarel::scheme
char * scheme
Definition yuarel.h:38
yuarel::path
char * path
Definition yuarel.h:43
yuarel_parse
int yuarel_parse(struct yuarel *url, char *url_str)
Definition yuarel.c:139
yuarel_split_path
int yuarel_split_path(char *path, char **parts, int max_parts)
Definition yuarel.c:236
yuarel_parse_query
int yuarel_parse_query(char *query, char delimiter, struct yuarel_param *params, int max_params)
Definition yuarel.c:266