GNUnet  0.11.x
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  char *scheme; /* scheme, without ":" and "//" */
36  char *username; /* username, default: NULL */
37  char *password; /* password, default: NULL */
38  char *host; /* hostname or IP address */
39  int port; /* port, default: 0 */
40  char *path; /* path, without leading "/", default: NULL */
41  char *query; /* query, default: NULL */
42  char *fragment; /* fragment, default: NULL */
43 };
44 
45 
46 /* A struct to hold the query string parameter values. */
48  char *key;
49  char *val;
50 };
51 
52 
72 int
73 GNUNET_uri_parse (struct GNUNET_Uri *url,
74  char *url_str);
75 
76 
90 int
92  char **parts,
93  int max_parts);
94 
95 
115 int
117  char delimiter,
118  struct GNUNET_UriParam *params,
119  int max_params);
120 
121 
122 #endif /* GNUNET_URI_LIB_H */
char * query
char * scheme
char * fragment
int GNUNET_uri_split_path(char *path, char **parts, int max_parts)
Split a path into several strings.
Definition: uri.c:260
char * password
char * username
int GNUNET_uri_parse(struct GNUNET_Uri *url, char *url_str)
Parse a URL to a struct.
Definition: uri.c:159
Copyright (C) 2016 Jack Engqvist Johansson.
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:312