URL Manipulation API.


Data Structures

struct  urlinfo_s
 URL control structure. More...

Typedefs

typedef enum urltype_e urltype
 Supported URL types.

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

urlinfo urlNew (void)
 Create a URL info structure instance.
urlinfo urlFree (urlinfo u)
 Free a URL info structure instance.
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.

Typedef Documentation

typedef enum urltype_e urltype

Supported URL types.


Enumeration Type Documentation

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 15 of file rpmurl.h.


Function Documentation

urlinfo urlFree ( urlinfo  u  ) 

Free a URL info structure instance.

Parameters:
u URL control structure
Returns:
dereferenced instance (NULL if freed)

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

Copy data from URL to local file.

Parameters:
url url string of source
dest file name of destination
Returns:
0 on success, otherwise FTPERR_* code

urltype urlIsURL ( const char *  url  ) 

Return type of URL.

Parameters:
url url string
Returns:
type of url

Referenced by main().

urlinfo urlNew ( void   ) 

Create a URL info structure instance.

Returns:
new instance

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

Return path component of URL.

Parameters:
url url string
Return values:
pathp pointer to path component of url
Returns:
type of url

int urlSplit ( const char *  url,
urlinfo uret 
)

Parse URL string into a control structure.

Parameters:
url url string
Return values:
uret address of new control instance pointer
Returns:
0 on success, -1 on error


Generated on Sat Apr 18 17:12:59 2009 for rpm by  doxygen 1.5.7.1