rpm  4.17.0
Typedefs | Enumerations | Functions
URL Manipulation API.

A couple utils for URL Manipulation. More...

Collaboration diagram for URL Manipulation API.:

Typedefs

typedef enum urltype_e urltype
 Supported URL types. More...
 

Enumerations

enum  urltype_e {
  URL_IS_UNKNOWN = 0 , URL_IS_DASH = 1 , URL_IS_PATH = 2 , URL_IS_FTP = 3 ,
  URL_IS_HTTP = 4 , URL_IS_HTTPS = 5 , URL_IS_HKP = 6
}
 Supported URL types. More...
 

Functions

urltype urlIsURL (const char *url)
 Return type of URL. More...
 
urltype urlPath (const char *url, const char **pathp)
 Return path component of URL. More...
 
int urlGetFile (const char *url, const char *dest)
 Copy data from URL to local file. More...
 

Detailed Description

A couple utils for URL Manipulation.

Typedef Documentation

◆ urltype

typedef enum urltype_e urltype

Supported URL types.

Enumeration Type Documentation

◆ urltype_e

enum urltype_e

Supported URL types.

Enumerator
URL_IS_UNKNOWN 

unknown (aka a file)

URL_IS_DASH 

stdin/stdout

URL_IS_PATH 

file://...

URL_IS_FTP 

ftp://...

URL_IS_HTTP 

http://...

URL_IS_HTTPS 

https://...

URL_IS_HKP 

hkp://...

Definition at line 17 of file rpmurl.h.

Function Documentation

◆ urlGetFile()

int urlGetFile ( const char *  url,
const char *  dest 
)

Copy data from URL to local file.

Parameters
urlurl string of source
destfile name of destination
Returns
0 on success, -1 on error

◆ urlIsURL()

urltype urlIsURL ( const char *  url)

Return type of URL.

Parameters
urlurl string
Returns
type of url

◆ urlPath()

urltype urlPath ( const char *  url,
const char **  pathp 
)

Return path component of URL.

Parameters
urlurl string
[out]pathppointer to path component of url
Returns
type of url