Data Structures |
struct | GF_URL_Info |
struct | GF_NETIO_Parameter |
Typedefs |
typedef struct
__DownloadedCacheEntryStruct * | DownloadedCacheEntry |
typedef struct
__CacheReaderStruct * | GF_CacheReader |
typedef struct
__gf_download_manager | GF_DownloadManager |
typedef struct
__gf_download_session | GF_DownloadSession |
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_NetIOStatus {
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_cache_delete_entry (const DownloadedCacheEntry entry) |
const char * | gf_cache_get_etag_on_server (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_set_etag_on_disk (const DownloadedCacheEntry entry, const char *eTag) |
const char * | gf_cache_get_etag_on_disk (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_set_etag_on_server (const DownloadedCacheEntry entry, const char *eTag) |
const char * | gf_cache_get_mime_type (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_set_mime_type (const DownloadedCacheEntry entry, const char *mime_type) |
const char * | gf_cache_get_url (const DownloadedCacheEntry entry) |
const char * | gf_cache_get_hash (const DownloadedCacheEntry entry) |
Bool | gf_cache_can_be_cached (const DownloadedCacheEntry entry) |
const char * | gf_cache_get_last_modified_on_disk (const DownloadedCacheEntry entry) |
const char * | gf_cache_get_last_modified_on_server (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_set_last_modified_on_disk (const DownloadedCacheEntry entry, const char *newLastModified) |
GF_Err | gf_cache_set_last_modified_on_server (const DownloadedCacheEntry entry, const char *newLastModified) |
const char * | gf_cache_get_cache_filename (const DownloadedCacheEntry entry) |
u32 | gf_cache_get_cache_filesize (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_flush_disk_cache (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_set_content_length (const DownloadedCacheEntry entry, u32 length) |
u32 | gf_cache_get_content_length (const DownloadedCacheEntry entry) |
GF_Err | appendHttpCacheHeaders (const DownloadedCacheEntry entry, char *httpRequest) |
| append cache directives to an HTTP GET request
|
GF_Err | gf_cache_delete_all_cached_files (const char *directory) |
GF_CacheReader | gf_cache_reader_new (const DownloadedCacheEntry entry) |
GF_Err | gf_cache_reader_del (GF_CacheReader handle) |
s64 | gf_cache_reader_seek_at (GF_CacheReader reader, u64 seekPosition) |
s64 | gf_cache_reader_get_position (const GF_CacheReader reader) |
s64 | gf_cache_reader_get_currentSize (GF_CacheReader reader) |
s64 | gf_cache_reader_get_full_size (GF_CacheReader reader) |
s32 | gf_cache_reader_read (GF_CacheReader reader, char *buff, s32 length) |
Bool | gf_cache_check_if_cache_file_is_corrupted (const DownloadedCacheEntry entry) |
void | gf_cache_entry_set_delete_files_when_deleted (const DownloadedCacheEntry entry) |
Bool | gf_cache_entry_is_delete_files_when_deleted (const DownloadedCacheEntry entry) |
u32 | gf_cache_get_sessions_count_for_cache_entry (const DownloadedCacheEntry entry) |
u64 | gf_cache_get_start_range (const DownloadedCacheEntry entry) |
u64 | gf_cache_get_end_range (const DownloadedCacheEntry entry) |
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 *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, GF_NetIOStatus *net_status) |
| get statistics
|
u64 | gf_dm_sess_get_utc_start (GF_DownloadSession *sess) |
| get start time
|
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 *sess) |
| Get session resource url.
|
const char * | gf_dm_sess_get_original_resource_name (GF_DownloadSession *sess) |
| 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) |
u32 | gf_dm_get_global_rate (GF_DownloadManager *dm) |
GF_Err | gf_dm_get_file_memory (const char *url, char **out_data, u32 *out_size, char **out_mime) |
File Downloader objects.
This section documents the file caching tools the GPAC framework.
This section documents the file downloading tools the GPAC framework. Currently HTTP is supported, HTTPS is under testing but may not be supported depending on GPAC compilation options (HTTPS in GPAC needs OpenSSL installed on the system).