2 bfa33dbe 2021-04-22 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
4 bfa33dbe 2021-04-22 op * Permission to use, copy, modify, and distribute this software for any
5 bfa33dbe 2021-04-22 op * purpose with or without fee is hereby granted, provided that the above
6 bfa33dbe 2021-04-22 op * copyright notice and this permission notice appear in all copies.
8 bfa33dbe 2021-04-22 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 bfa33dbe 2021-04-22 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 bfa33dbe 2021-04-22 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 bfa33dbe 2021-04-22 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 bfa33dbe 2021-04-22 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 bfa33dbe 2021-04-22 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 bfa33dbe 2021-04-22 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 bfa33dbe 2021-04-22 op /* for the time being, drop everything but the URL stuff */
19 bfa33dbe 2021-04-22 op #ifndef PHOS_H
20 bfa33dbe 2021-04-22 op #define PHOS_H
22 bfa33dbe 2021-04-22 op #ifdef __cplusplus
26 bfa33dbe 2021-04-22 op #include <stdint.h>
28 bfa33dbe 2021-04-22 op #define PHOS_URL_MAX_LEN 1024
30 bfa33dbe 2021-04-22 op struct phos_uri {
31 bfa33dbe 2021-04-22 op char scheme[32];
32 bfa33dbe 2021-04-22 op char host[1024];
34 bfa33dbe 2021-04-22 op uint16_t dec_port;
35 bfa33dbe 2021-04-22 op char path[1024];
36 bfa33dbe 2021-04-22 op char query[1024];
37 bfa33dbe 2021-04-22 op char fragment[32];
40 bfa33dbe 2021-04-22 op /* phos_uri.c */
41 bfa33dbe 2021-04-22 op int phos_parse_uri_reference(const char*, struct phos_uri*);
42 bfa33dbe 2021-04-22 op int phos_parse_absolute_uri(const char*, struct phos_uri*);
43 bfa33dbe 2021-04-22 op int phos_resolve_uri_from_str(const struct phos_uri*, const char *, struct phos_uri*);
44 bfa33dbe 2021-04-22 op void phos_uri_drop_empty_segments(struct phos_uri*);
45 4190a5c2 2021-04-24 op int phos_uri_set_query(struct phos_uri*, const char*);
46 bfa33dbe 2021-04-22 op int phos_serialize_uri(const struct phos_uri*, char*, size_t);
48 bfa33dbe 2021-04-22 op #ifdef __cplusplus
52 bfa33dbe 2021-04-22 op #endif /* PHOS_H */