libmp/include/url.h

18 lines
351 B
C
Raw Normal View History

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