libmp/include/url.h
2024-06-21 01:36:56 +03:00

18 lines
352 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
#define URL_PROTOCOL_MAX 20
#define URL_PATH_MAX 2000
#define URL_HOST_MAX 260
typedef struct lm_url {
uint16_t port;
char protocol[URL_PROTOCOL_MAX + 1];
char *host;
char *path;
} lm_url_t;
bool lm_url_parse(lm_url_t *url, char *str);
void lm_url_free(lm_url_t *url);