GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
download.h File Reference

Downloader functions. More...

#include <gpac/tools.h>
#include <gpac/config_file.h>
#include <gpac/cache.h>
+ Include dependency graph for download.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_URL_Info
 
struct  GF_NETIO_Parameter
 

Typedefs

typedef Bool(* gf_dm_get_usr_pass )(void *usr_cbk, const char *site_url, char *usr_name, char *password)
 callback function for authentication More...
 
typedef void(* gf_dm_user_io )(void *usr_cbk, GF_NETIO_Parameter *parameter)
 callback function for data reception and state signaling More...
 

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 More...
 
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 More...
 
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 More...
 
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 More...
 
void gf_dm_sess_del (GF_DownloadSession *sess)
 
void gf_dm_sess_abort (GF_DownloadSession *sess)
 aborts downloading More...
 
void gf_dm_sess_set_private (GF_DownloadSession *sess, void *private_data)
 sets private data More...
 
void * gf_dm_sess_get_private (GF_DownloadSession *sess)
 gets private data More...
 
GF_Err gf_dm_sess_last_error (GF_DownloadSession *sess)
 gets last session error More...
 
Bool gf_dm_is_thread_dead (GF_DownloadSession *sess)
 is download manager thread dead? More...
 
GF_Err gf_dm_sess_fetch_data (GF_DownloadSession *sess, char *buffer, u32 buffer_size, u32 *read_size)
 fetches data on session More...
 
const char * gf_dm_sess_mime_type (GF_DownloadSession *sess)
 get mime type as lower case More...
 
GF_Err gf_dm_sess_set_range (GF_DownloadSession *sess, u64 start_range, u64 end_range, Bool discontinue_cache)
 sets session range More...
 
const char * gf_dm_sess_get_cache_name (GF_DownloadSession *sess)
 get cache file name More...
 
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. More...
 
void gf_dm_delete_cached_file_entry_session (const GF_DownloadSession *sess, 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 More...
 
u64 gf_dm_sess_get_utc_start (GF_DownloadSession *sess)
 get start time More...
 
GF_Err gf_dm_sess_process (GF_DownloadSession *sess)
 fetch session object More...
 
GF_Err gf_dm_sess_process_headers (GF_DownloadSession *sess)
 fetch session object headers More...
 
u32 gf_dm_sess_get_status (GF_DownloadSession *sess)
 fetch session status More...
 
const char * gf_dm_sess_get_resource_name (GF_DownloadSession *sess)
 Get session resource url. More...
 
const char * gf_dm_sess_get_original_resource_name (GF_DownloadSession *sess)
 Get session original resource url. More...
 
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. More...
 
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. More...
 
GF_Err gf_dm_sess_reset (GF_DownloadSession *sess)
 Reset session. More...
 
DownloadedCacheEntry gf_dm_refresh_cache_entry (GF_DownloadSession *sess)
 forces the refresh of a cache entry The entry is still allocated in the session. More...
 
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)
 

Detailed Description

>