GNUnet
0.22.2
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. */
48
struct
GNUNET_UriParam
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 */
GNUNET_uri_parse
int GNUNET_uri_parse(struct GNUNET_Uri *url, char *url_str)
Parse a URL to a struct.
Definition:
uri.c:160
GNUNET_uri_parse_query
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
GNUNET_uri_split_path
int GNUNET_uri_split_path(char *path, char **parts, int max_parts)
Split a path into several strings.
Definition:
uri.c:261
GNUNET_UriParam
Definition:
gnunet_uri_lib.h:49
GNUNET_UriParam::val
char * val
Definition:
gnunet_uri_lib.h:51
GNUNET_UriParam::key
char * key
Definition:
gnunet_uri_lib.h:50
GNUNET_Uri
Copyright (C) 2016 Jack Engqvist Johansson.
Definition:
gnunet_uri_lib.h:35
GNUNET_Uri::scheme
char * scheme
Definition:
gnunet_uri_lib.h:36
GNUNET_Uri::path
char * path
Definition:
gnunet_uri_lib.h:41
GNUNET_Uri::username
char * username
Definition:
gnunet_uri_lib.h:37
GNUNET_Uri::query
char * query
Definition:
gnunet_uri_lib.h:42
GNUNET_Uri::password
char * password
Definition:
gnunet_uri_lib.h:38
GNUNET_Uri::port
int port
Definition:
gnunet_uri_lib.h:40
GNUNET_Uri::host
char * host
Definition:
gnunet_uri_lib.h:39
GNUNET_Uri::fragment
char * fragment
Definition:
gnunet_uri_lib.h:43
src
include
gnunet_uri_lib.h
Generated by
1.9.4