Axe the rpmsq debug code which was never getting built anyway
[platform/upstream/rpm.git] / rpmio / rpmurl.h
1 #ifndef H_RPMURL
2 #define H_RPMURL
3
4 /** \ingroup rpmio
5  * \file rpmio/rpmurl.h
6  */
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /** \ingroup rpmurl
13  * Supported URL types.
14  */
15 typedef enum urltype_e {
16     URL_IS_UNKNOWN      = 0,    /*!< unknown (aka a file) */
17     URL_IS_DASH         = 1,    /*!< stdin/stdout */
18     URL_IS_PATH         = 2,    /*!< file://... */
19     URL_IS_FTP          = 3,    /*!< ftp://... */
20     URL_IS_HTTP         = 4,    /*!< http://... */
21     URL_IS_HTTPS        = 5,    /*!< https://... */
22     URL_IS_HKP          = 6     /*!< hkp://... */
23 } urltype;
24
25 /** \ingroup rpmurl
26  * Return type of URL.
27  * @param url           url string
28  * @return              type of url
29  */
30 urltype urlIsURL(const char * url);
31
32 /** \ingroup rpmurl
33  * Return path component of URL.
34  * @param url           url string
35  * @retval pathp        pointer to path component of url
36  * @return              type of url
37  */
38 urltype urlPath(const char * url, const char ** pathp);
39
40 /** \ingroup rpmurl
41  * Copy data from URL to local file.
42  * @param url           url string of source
43  * @param dest          file name of destination
44  * @return              0 on success, otherwise FTPERR_* code
45  */
46 int urlGetFile(const char * url, const char * dest);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif  /* H_RPMURL */