![]() |
![]() |
![]() |
ZIF Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define ZIF_DOWNLOAD_ERROR ZifDownload; ZifDownloadPrivate; ZifDownloadClass; enum ZifDownloadError; GQuark zif_download_error_quark (void
); ZifDownload * zif_download_new (void
); gboolean zif_download_set_proxy (ZifDownload *download
,const gchar *http_proxy
,GError **error
); gboolean zif_download_file (ZifDownload *download
,const gchar *uri
,const gchar *filename
,ZifState *state
,GError **error
);
typedef enum { ZIF_DOWNLOAD_ERROR_FAILED, ZIF_DOWNLOAD_ERROR_LAST } ZifDownloadError;
GQuark zif_download_error_quark (void
);
Returns : |
Our personal error quark. |
Since 0.1.0
ZifDownload * zif_download_new (void
);
Returns : |
A new download class instance. |
Since 0.1.0
gboolean zif_download_set_proxy (ZifDownload *download
,const gchar *http_proxy
,GError **error
);
Sets the proxy used for downloading files.
|
the ZifDownload object |
|
the HTTP proxy, e.g. "http://10.0.0.1:8080" |
|
a GError which is used on failure, or NULL
|
Returns : |
TRUE for success, FALSE for failure
|
Since 0.1.0
gboolean zif_download_file (ZifDownload *download
,const gchar *uri
,const gchar *filename
,ZifState *state
,GError **error
);
Downloads a file.
|
the ZifDownload object |
|
the full remote URI |
|
the local filename to save to |
|
a ZifState to use for progress reporting |
|
a GError which is used on failure, or NULL
|
Returns : |
TRUE for success, FALSE for failure
|
Since 0.1.0