Downloader functions. More...
#include <gpac/tools.h>#include <gpac/config_file.h>#include <gpac/cache.h>Classes | |
| struct | GF_URL_Info_Struct |
| struct | GF_NETIO_Parameter |
Typedefs | |
| typedef struct __gf_download_manager | GF_DownloadManager |
| typedef struct __gf_download_session | GF_DownloadSession |
| typedef struct GF_URL_Info_Struct | GF_URL_Info |
| typedef Bool(* | gf_dm_get_usr_pass )(void *usr_cbk, const char *site_url, char *usr_name, char *password) |
| callback function for authentication | |
| typedef void(* | gf_dm_user_io )(void *usr_cbk, GF_NETIO_Parameter *parameter) |
| callback function for data reception and state signaling | |
Enumerations | |
| enum | { GF_NETIO_SETUP = 0, GF_NETIO_CONNECTED, GF_NETIO_GET_METHOD, GF_NETIO_GET_HEADER, GF_NETIO_GET_CONTENT, GF_NETIO_WAIT_FOR_REPLY, GF_NETIO_PARSE_HEADER, GF_NETIO_PARSE_REPLY, GF_NETIO_DATA_EXCHANGE, GF_NETIO_DATA_TRANSFERED, GF_NETIO_DISCONNECTED, GF_NETIO_STATE_ERROR } |
| enum | { GF_NETIO_SESSION_NOT_THREADED = 1, GF_NETIO_SESSION_NOT_CACHED = 1<<1, GF_NETIO_SESSION_PERSISTENT = 1<<2, GF_NETIO_SESSION_MEMORY_CACHE = 1<<3 } |
Functions | |
| GF_Err | gf_dm_get_url_info (const char *url, GF_URL_Info *info, const char *baseURL) |
| void | gf_dm_url_info_init (GF_URL_Info *info) |
| void | gf_dm_url_info_del (GF_URL_Info *info) |
| GF_DownloadManager * | gf_dm_new (GF_Config *cfg) |
| download manager constructor | |
| void | gf_dm_del (GF_DownloadManager *dm) |
| void | gf_dm_set_auth_callback (GF_DownloadManager *dm, gf_dm_get_usr_pass get_pass, void *usr_cbk) |
| password retrieval assignment | |
| GF_DownloadSession * | gf_dm_sess_new (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Err *error) |
| download session constructor | |
| GF_DownloadSession * | gf_dm_sess_new_simple (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Err *e) |
| download session simple constructor | |
| void | gf_dm_sess_del (GF_DownloadSession *sess) |
| void | gf_dm_sess_abort (GF_DownloadSession *sess) |
| aborts downloading | |
| void | gf_dm_sess_set_private (GF_DownloadSession *sess, void *private_data) |
| sets private data | |
| void * | gf_dm_sess_get_private (GF_DownloadSession *sess) |
| gets private data | |
| GF_Err | gf_dm_sess_last_error (GF_DownloadSession *sess) |
| gets last session error | |
| Bool | gf_dm_is_thread_dead (GF_DownloadSession *sess) |
| is download manager thread dead? | |
| GF_Err | gf_dm_sess_fetch_data (GF_DownloadSession *sess, char *buffer, u32 buffer_size, u32 *read_size) |
| fetches data on session | |
| const char * | gf_dm_sess_mime_type (GF_DownloadSession *sess) |
| get mime type as lower case | |
| GF_Err | gf_dm_sess_set_range (GF_DownloadSession *sess, u64 start_range, u64 end_range, Bool discontinue_cache) |
| sets session range | |
| const char * | gf_dm_sess_get_cache_name (GF_DownloadSession *sess) |
| get cache file name | |
| void | gf_dm_delete_cached_file_entry (const GF_DownloadManager *dm, const char *url) |
| Marks the cache file to be deleted once the file is not used anymore by any session. | |
| void | gf_dm_delete_cached_file_entry_session (const GF_DownloadSession *dm, const char *url) |
| const char * | gf_cache_get_cache_filename_range (const GF_DownloadSession *sess, u64 startOffset, u64 endOffset) |
| GF_Err | gf_dm_sess_get_stats (GF_DownloadSession *sess, const char **server, const char **path, u32 *total_size, u32 *bytes_done, u32 *bytes_per_sec, u32 *net_status) |
| get statistics | |
| GF_Err | gf_dm_sess_process (GF_DownloadSession *sess) |
| fetch session object | |
| GF_Err | gf_dm_sess_process_headers (GF_DownloadSession *sess) |
| fetch session object headers | |
| u32 | gf_dm_sess_get_status (GF_DownloadSession *sess) |
| fetch session status | |
| const char * | gf_dm_sess_get_resource_name (GF_DownloadSession *dnload) |
| Get session resource url. | |
| const char * | gf_dm_sess_get_original_resource_name (GF_DownloadSession *dnload) |
| Get session original resource url. | |
| GF_Err | gf_dm_wget_with_cache (GF_DownloadManager *dm, const char *url, const char *filename, u64 start_range, u64 end_range) |
| Download a file over the network using a download manager. | |
| GF_Err | gf_dm_wget (const char *url, const char *filename, u64 start_range, u64 end_range) |
| Same as gf_dm_wget_with_cache, but initializes the GF_DownloadManager by itself. This function is deprecated, please use gf_dm_wget_with_cache instead. | |
| GF_Err | gf_dm_sess_reset (GF_DownloadSession *sess) |
| Reset session. | |
| DownloadedCacheEntry | gf_dm_refresh_cache_entry (GF_DownloadSession *sess) |
| forces the refresh of a cache entry The entry is still allocated in the session. | |
| Bool | gf_dm_sess_can_be_cached_on_disk (const GF_DownloadSession *sess) |
| GF_Err | gf_dm_sess_reassign (GF_DownloadSession *sess, u32 flags, gf_dm_user_io user_io, void *cbk) |
| GF_Err | gf_dm_sess_setup_from_url (GF_DownloadSession *sess, const char *url) |
| const char * | gf_dm_sess_get_header (GF_DownloadSession *sess, const char *name) |
| void | gf_dm_set_data_rate (GF_DownloadManager *dm, u32 rate_in_bits_per_sec) |
| u32 | gf_dm_get_data_rate (GF_DownloadManager *dm) |
| GF_Err | gf_dm_get_file_memory (const char *url, char **out_data, u32 *out_size, char **out_mime) |
>
1.6.1