rpm  4.8.1
rpmurl.h
Go to the documentation of this file.
00001 #ifndef H_RPMURL
00002 #define H_RPMURL
00003 
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011 
00015 typedef enum urltype_e {
00016     URL_IS_UNKNOWN      = 0,    
00017     URL_IS_DASH         = 1,    
00018     URL_IS_PATH         = 2,    
00019     URL_IS_FTP          = 3,    
00020     URL_IS_HTTP         = 4,    
00021     URL_IS_HTTPS        = 5,    
00022     URL_IS_HKP          = 6     
00023 } urltype;
00024 
00025 typedef struct urlinfo_s * urlinfo;
00026 
00030 struct urlinfo_s {
00031     char * url;                 
00032     char * scheme;              
00033     char * user;                
00034     char * password;            
00035     char * host;                
00036     char * portstr;             
00037     char * proxyu;              
00038     char * proxyh;              
00039     int proxyp;                 
00040     int port;                   
00041     int urltype;                
00042     int openError;              
00043     int magic;
00044 };
00045 
00046 extern int _url_debug;          
00052 urlinfo urlNew(void);
00053 
00059 urlinfo urlFree(urlinfo u);
00060 
00066 urltype urlIsURL(const char * url);
00067 
00074 urltype urlPath(const char * url, const char ** pathp);
00075 
00082 int urlSplit(const char * url, urlinfo * uret);
00083 
00090 int urlGetFile(const char * url, const char * dest);
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif
00095 
00096 #endif  /* H_RPMURL */