libmp/include/url.h

18 lines
351 B
C
Raw Normal View History

2024-06-20 00:34:32 +00:00
#pragma once
#include <stdbool.h>
#include <stdint.h>
#define URL_PROTOCOL_MAX 20
2024-06-20 22:36:56 +00:00
#define URL_PATH_MAX 2000
#define URL_HOST_MAX 260
2024-06-20 00:34:32 +00:00
typedef struct lm_url {
uint16_t port;
2024-06-20 22:36:56 +00:00
char protocol[URL_PROTOCOL_MAX + 1];
char *host;
char *path;
2024-06-20 00:34:32 +00:00
} lm_url_t;
2024-06-22 04:03:17 +00:00
bool lm_url_init(lm_url_t *url, char *str);
2024-06-20 00:34:32 +00:00
void lm_url_free(lm_url_t *url);