#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | urlinfo_s |
URL control structure. More... | |
Defines | |
#define | URLMAGIC 0xd00b1ed0 |
#define | URLSANE(u) assert(u && u->magic == URLMAGIC) |
#define | RPMURL_IOBUF_SIZE 4096 |
#define | RPMURL_DEBUG_IO 0x40000000 |
#define | RPMURL_DEBUG_REFS 0x20000000 |
#define | urlNew(_msg) XurlNew(_msg, __FILE__, __LINE__) |
#define | urlLink(_u, _msg) XurlLink(_u, _msg, __FILE__, __LINE__) |
#define | urlFree(_u, _msg) XurlFree(_u, _msg, __FILE__, __LINE__) |
Typedefs | |
typedef enum urltype_e | urltype |
Supported URL types. | |
typedef struct urlinfo_s * | urlinfo |
Enumerations | |
enum | urltype_e { URL_IS_UNKNOWN = 0, URL_IS_DASH = 1, URL_IS_PATH = 2, URL_IS_FTP = 3, URL_IS_HTTP = 4 } |
Supported URL types. More... | |
Functions | |
urlinfo | urlNew (const char *msg) |
Create a URL control structure instance. | |
urlinfo | XurlNew (const char *msg, const char *file, unsigned line) |
urlinfo | urlLink (urlinfo u, const char *msg) |
Reference a URL control structure instance. | |
urlinfo | XurlLink (urlinfo u, const char *msg, const char *file, unsigned line) |
urlinfo | urlFree (urlinfo u, const char *msg) |
Dereference a URL control structure instance. | |
urlinfo | XurlFree (urlinfo u, const char *msg, const char *file, unsigned line) |
void | urlFreeCache (void) |
Free cached URL control structures. | |
urltype | urlIsURL (const char *url) |
Return type of URL. | |
urltype | urlPath (const char *url, const char **pathp) |
Return path component of URL. | |
int | urlSplit (const char *url, urlinfo *uret) |
Parse URL string into a control structure. | |
int | urlGetFile (const char *url, const char *dest) |
Copy data from URL to local file. | |
Variables | |
int | _url_count |
urlinfo * | _url_cache |
int | _url_iobuf_size |
int | _url_debug |
Definition in file rpmurl.h.
#define urlFree | ( | _u, | |||
_msg | ) | XurlFree(_u, _msg, __FILE__, __LINE__) |
#define urlLink | ( | _u, | |||
_msg | ) | XurlLink(_u, _msg, __FILE__, __LINE__) |
enum urltype_e |
Supported URL types.
URL_IS_UNKNOWN | unknown (aka a file) |
URL_IS_DASH | stdin/stdout |
URL_IS_PATH | file://... |
URL_IS_FTP | ftp://... |
URL_IS_HTTP | http://... |
Dereference a URL control structure instance.
u | URL control structure | |
msg | debugging identifier (unused) |
void urlFreeCache | ( | void | ) |
int urlGetFile | ( | const char * | url, | |
const char * | dest | |||
) |
urltype urlIsURL | ( | const char * | url | ) |
Reference a URL control structure instance.
u | URL control structure | |
msg | debugging identifier (unused) |
urlinfo urlNew | ( | const char * | msg | ) |
Create a URL control structure instance.
msg | debugging identifier (unused) |
urltype urlPath | ( | const char * | url, | |
const char ** | pathp | |||
) |
int urlSplit | ( | const char * | url, | |
urlinfo * | uret | |||
) |
urlinfo XurlNew | ( | const char * | msg, | |
const char * | file, | |||
unsigned | line | |||
) |
int _url_count |
int _url_debug |
int _url_iobuf_size |