GNUnet  0.20.0
gnunet_uri_lib.h
Go to the documentation of this file.
1 
22 #ifndef GNUNET_URI_LIB_H
23 #define GNUNET_URI_LIB_H
24 
25 
34 struct GNUNET_Uri
35 {
36  char *scheme; /* scheme, without ":" and "//" */
37  char *username; /* username, default: NULL */
38  char *password; /* password, default: NULL */
39  char *host; /* hostname or IP address */
40  int port; /* port, default: 0 */
41  char *path; /* path, without leading "/", default: NULL */
42  char *query; /* query, default: NULL */
43  char *fragment; /* fragment, default: NULL */
44 };
45 
46 
47 /* A struct to hold the query string parameter values. */
49 {
50  char *key;
51  char *val;
52 };
53 
54 
74 int
75 GNUNET_uri_parse (struct GNUNET_Uri *url,
76  char *url_str);
77 
78 
92 int
93 GNUNET_uri_split_path (char *path,
94  char **parts,
95  int max_parts);
96 
97 
117 int
118 GNUNET_uri_parse_query (char *query,
119  char delimiter,
120  struct GNUNET_UriParam *params,
121  int max_params);
122 
123 
124 #endif /* GNUNET_URI_LIB_H */
int GNUNET_uri_parse(struct GNUNET_Uri *url, char *url_str)
Parse a URL to a struct.
Definition: uri.c:160
int GNUNET_uri_parse_query(char *query, char delimiter, struct GNUNET_UriParam *params, int max_params)
Parse a query string into a key/value struct.
Definition: uri.c:313
int GNUNET_uri_split_path(char *path, char **parts, int max_parts)
Split a path into several strings.
Definition: uri.c:261
Copyright (C) 2016 Jack Engqvist Johansson.
char * scheme
char * username
char * query
char * password
char * fragment