|
static void | gf_dm_data_received (GF_DownloadSession *sess, u8 *payload, u32 payload_size, Bool store_in_init, u32 *rewrite_size, u8 *original_payload) |
|
static GF_Err | gf_dm_read_data (GF_DownloadSession *sess, char *data, u32 data_size, u32 *out_read) |
|
static void | gf_dm_connect (GF_DownloadSession *sess) |
|
GF_Err | gf_dm_sess_send (GF_DownloadSession *sess, u8 *data, u32 size) |
|
GF_Err | gf_dm_sess_flush_async (GF_DownloadSession *sess, Bool no_select) |
|
static GF_Err | dm_sess_write (GF_DownloadSession *sess, const u8 *buffer, u32 size) |
|
void | dm_sess_sk_del (GF_DownloadSession *sess) |
|
static void | sess_connection_closed (GF_DownloadSession *sess) |
|
GF_Err | gf_cache_write_to_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess, const char *data, const u32 size, GF_Mutex *mx) |
|
GF_Err | gf_cache_close_write_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess, Bool success) |
| Close the write file pointer of cache This function also flushes all buffers, so cache will always be consistent after.
|
|
GF_Err | gf_cache_open_write_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess) |
| Open the write file pointer of cache This function prepares calls for gf_cache_write_to_cache.
|
|
void | gf_cache_set_end_range (DownloadedCacheEntry entry, u64 range_end) |
|
Bool | gf_cache_is_in_progress (const DownloadedCacheEntry entry) |
|
static GF_Err | gf_user_credentials_save_digest (GF_DownloadManager *dm, GF_UserCredentials *creds, const char *password, Bool store_info) |
| Saves the digest for authentication of password and username.
|
|
GF_UserCredentials * | gf_user_credentials_find_for_site (GF_DownloadManager *dm, const char *server_name, const char *user_name) |
|
static void | on_user_pass (void *udta, const char *user, const char *pass, Bool store_info) |
|
static GF_Err | gf_user_credentials_ask_password (GF_DownloadManager *dm, GF_UserCredentials *creds, Bool secure) |
| Asks the user for credentials for given site.
|
|
GF_UserCredentials * | gf_user_credentials_register (GF_DownloadManager *dm, Bool secure, const char *server_name, const char *username, const char *password, Bool valid) |
|
static Bool | gf_dm_is_local (GF_DownloadManager *dm, const char *url) |
|
static Bool | gf_dm_can_handle_url (GF_DownloadManager *dm, const char *url) |
|
DownloadedCacheEntry | gf_dm_find_cached_entry_by_url (GF_DownloadSession *sess) |
|
DownloadedCacheEntry | gf_cache_create_entry (GF_DownloadManager *dm, const char *cache_directory, const char *url, u64 start_range, u64 end_range, Bool mem_storage, GF_Mutex *mx) |
|
s32 | gf_cache_remove_session_from_cache_entry (DownloadedCacheEntry entry, GF_DownloadSession *sess) |
|
Bool | gf_cache_set_mime (const DownloadedCacheEntry entry, const char *mime) |
|
Bool | gf_cache_set_range (const DownloadedCacheEntry entry, u64 size, u64 start_range, u64 end_range) |
|
Bool | gf_cache_set_content (const DownloadedCacheEntry entry, GF_Blob *blob, Bool copy, GF_Mutex *mx) |
|
Bool | gf_cache_set_headers (const DownloadedCacheEntry entry, const char *headers) |
|
Bool | gf_cache_set_downtime (const DownloadedCacheEntry entry, u32 download_time_ms) |
|
static void | gf_dm_remove_cache_entry_from_session (GF_DownloadSession *sess) |
|
s32 | gf_cache_add_session_to_cache_entry (DownloadedCacheEntry entry, GF_DownloadSession *sess) |
|
Bool | gf_cache_entry_persistent (const DownloadedCacheEntry entry) |
|
void | gf_cache_entry_set_persistent (const DownloadedCacheEntry entry) |
|
static void | gf_dm_sess_notify_state (GF_DownloadSession *sess, GF_NetIOStatus dnload_status, GF_Err error) |
|
static void | gf_dm_configure_cache (GF_DownloadSession *sess) |
|
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.
|
|
GF_EXPORT void | gf_dm_delete_cached_file_entry_session (const GF_DownloadSession *sess, const char *url) |
|
void | gf_dm_sess_set_header (GF_DownloadSession *sess, const char *name, const char *value) |
|
GF_Err | gf_dm_sess_send_reply (GF_DownloadSession *sess, u32 reply_code, const char *response_body, Bool no_body) |
|
void | gf_dm_sess_clear_headers (GF_DownloadSession *sess) |
|
static void | gf_dm_disconnect (GF_DownloadSession *sess, HTTPCloseType close_type) |
|
GF_EXPORT void | gf_dm_sess_del (GF_DownloadSession *sess) |
| downloader session destructor
|
|
void | http_do_requests (GF_DownloadSession *sess) |
|
static void | gf_dm_sess_user_io (GF_DownloadSession *sess, GF_NETIO_Parameter *par) |
|
GF_EXPORT GF_Err | gf_dm_sess_last_error (GF_DownloadSession *sess) |
| gets last session error
|
|
GF_EXPORT void | gf_dm_url_info_init (GF_URL_Info *info) |
|
GF_EXPORT void | gf_dm_url_info_del (GF_URL_Info *info) |
|
static s32 | gf_dm_parse_protocol (const char *url, GF_URL_Info *info) |
|
GF_EXPORT GF_Err | gf_dm_get_url_info (const char *url, GF_URL_Info *info, const char *baseURL) |
|
char * | gf_cache_get_forced_headers (const DownloadedCacheEntry entry) |
|
u32 | gf_cache_get_downtime (const DownloadedCacheEntry entry) |
|
Bool | gf_cache_is_done (const DownloadedCacheEntry entry) |
|
Bool | gf_cache_is_deleted (const DownloadedCacheEntry entry) |
|
static void | gf_dm_sess_reload_cached_headers (GF_DownloadSession *sess) |
|
GF_EXPORT GF_Err | gf_dm_sess_setup_from_url (GF_DownloadSession *sess, const char *url, Bool allow_direct_reuse) |
|
Bool | gf_dm_session_do_task (GF_DownloadSession *sess) |
|
Bool | gf_dm_session_task (GF_FilterSession *fsess, void *callback, u32 *reschedule_ms) |
|
static u32 | gf_dm_session_thread (void *par) |
|
static GF_DownloadSession * | gf_dm_sess_new_internal (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Socket *server, GF_Err *e) |
|
GF_EXPORT GF_DownloadSession * | gf_dm_sess_new_server (GF_DownloadManager *dm, GF_Socket *server, void *ssl_sock_ctx, gf_dm_user_io user_io, void *usr_cbk, Bool async, GF_Err *e) |
|
GF_DownloadSession * | gf_dm_sess_new_subsession (GF_DownloadSession *sess, u32 stream_id, void *usr_cbk, GF_Err *e) |
|
u32 | gf_dm_sess_subsession_count (GF_DownloadSession *sess) |
|
void | gf_dm_sess_server_reset (GF_DownloadSession *sess) |
|
GF_EXPORT 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
|
|
GF_EXPORT 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 *e) |
| download session constructor
|
|
DownloadedCacheEntry | gf_dm_refresh_cache_entry (GF_DownloadSession *sess) |
|
GF_EXPORT const char * | gf_dm_sess_mime_type (GF_DownloadSession *sess) |
| get mime type as lower case
|
|
GF_EXPORT GF_Err | gf_dm_sess_set_range (GF_DownloadSession *sess, u64 start_range, u64 end_range, Bool discontinue_cache) |
| sets session range
|
|
GF_EXPORT GF_Err | gf_dm_sess_process (GF_DownloadSession *sess) |
| fetch session object
|
|
GF_EXPORT GF_Err | gf_dm_sess_process_headers (GF_DownloadSession *sess) |
| fetch session object headers
|
|
static Bool | gf_dm_needs_to_delete_cache (GF_DownloadManager *dm) |
|
static void | gf_dm_clean_cache (GF_DownloadManager *dm) |
|
GF_EXPORT GF_DownloadManager * | gf_dm_new (GF_FilterSession *fsess) |
|
GF_EXPORT void | gf_dm_set_auth_callback (GF_DownloadManager *dm, gf_dm_get_usr_pass get_user_password, void *usr_cbk) |
| password retrieval assignment
|
|
GF_EXPORT void | gf_dm_del (GF_DownloadManager *dm) |
| download manager destructor
|
|
static void | gf_icy_skip_data (GF_DownloadSession *sess, const char *data, u32 nbBytes) |
|
static char * | gf_dm_get_chunk_data (GF_DownloadSession *sess, Bool first_chunk_in_payload, char *body_start, u32 *payload_size, u32 *header_size) |
|
static void | dm_sess_update_download_rate (GF_DownloadSession *sess) |
|
static Bool | dm_exceeds_cap_rate (GF_DownloadManager *dm) |
|
static void | gf_dm_sess_estimate_chunk_rate (GF_DownloadSession *sess, u32 nb_bytes) |
|
const u8 * | gf_cache_get_content (const DownloadedCacheEntry entry, u32 *size) |
|
void | gf_cache_release_content (const DownloadedCacheEntry entry) |
|
GF_EXPORT GF_Err | gf_dm_sess_fetch_data (GF_DownloadSession *sess, char *buffer, u32 buffer_size, u32 *read_size) |
| fetches data on session
|
|
GF_EXPORT GF_Err | gf_dm_sess_get_stats (GF_DownloadSession *sess, const char **server, const char **path, u64 *total_size, u64 *bytes_done, u32 *bytes_per_sec, GF_NetIOStatus *net_status) |
| get statistics
|
|
GF_EXPORT u64 | gf_dm_sess_get_utc_start (GF_DownloadSession *sess) |
| get start time
|
|
GF_EXPORT const char * | gf_dm_sess_get_cache_name (GF_DownloadSession *sess) |
| get cache file name
|
|
GF_EXPORT void | gf_dm_sess_abort (GF_DownloadSession *sess) |
| aborts downloading
|
|
static GF_Err | http_send_headers (GF_DownloadSession *sess, char *sHTTP) |
|
static GF_Err | http_parse_remaining_body (GF_DownloadSession *sess, char *sHTTP) |
|
static void | notify_headers (GF_DownloadSession *sess, char *sHTTP, s32 bytesRead, s32 BodyStart) |
|
static u32 | http_parse_method (const char *comp) |
|
static GF_Err | wait_for_header_and_parse (GF_DownloadSession *sess, char *sHTTP) |
|
static void | wget_NetIO (void *cbk, GF_NETIO_Parameter *param) |
|
GF_EXPORT GF_Err | gf_dm_wget (const char *url, const char *filename, u64 start_range, u64 end_range, char **redirected_url) |
| Same as gf_dm_wget_with_cache, but initializes the GF_DownloadManager by itself.
|
|
GF_EXPORT GF_Err | gf_dm_wget_with_cache (GF_DownloadManager *dm, const char *url, const char *filename, u64 start_range, u64 end_range, char **redirected_url) |
|
GF_EXPORT const char * | gf_dm_sess_get_resource_name (GF_DownloadSession *dnload) |
| Get session resource url.
|
|
GF_EXPORT void | gf_dm_set_data_rate (GF_DownloadManager *dm, u32 rate_in_bits_per_sec) |
| sets download manager max rate per session
|
|
GF_EXPORT u32 | gf_dm_get_data_rate (GF_DownloadManager *dm) |
| gets download manager max rate per session
|
|
GF_EXPORT u32 | gf_dm_get_global_rate (GF_DownloadManager *dm) |
| gets cumultaed download rate for all sessions
|
|
Bool | gf_dm_sess_is_h2 (GF_DownloadSession *sess) |
|
GF_EXPORT const char * | gf_dm_sess_get_header (GF_DownloadSession *sess, const char *name) |
| retrieves the HTTP header value for the given name
|
|
GF_EXPORT GF_Err | gf_dm_sess_enum_headers (GF_DownloadSession *sess, u32 *idx, const char **hdr_name, const char **hdr_val) |
| enumerates the HTTP headers for a session
|
|
GF_EXPORT GF_Err | gf_dm_sess_get_header_sizes_and_times (GF_DownloadSession *sess, u32 *req_hdr_size, u32 *rsp_hdr_size, u32 *connect_time, u32 *reply_time, u32 *download_time) |
| Get header sizes and times stats for the session.
|
|
GF_EXPORT void | gf_dm_sess_force_memory_mode (GF_DownloadSession *sess, u32 force_keep) |
| Forces session to use memory storage.
|
|
GF_EXPORT GF_Err | gf_dm_set_localcache_provider (GF_DownloadManager *dm, Bool(*local_cache_url_provider_cbk)(void *udta, char *url, Bool is_cache_destroy), void *lc_udta) |
|
GF_EXPORT DownloadedCacheEntry | gf_dm_add_cache_entry (GF_DownloadManager *dm, const char *szURL, GF_Blob *blob, u64 start_range, u64 end_range, const char *mime, Bool clone_memory, u32 download_time_ms) |
|
GF_EXPORT GF_Err | gf_dm_force_headers (GF_DownloadManager *dm, const DownloadedCacheEntry entry, const char *headers) |
|
u32 | gf_dm_sess_async_pending (GF_DownloadSession *sess) |
|
void | gf_dm_sess_flush_h2 (GF_DownloadSession *sess) |
|
GF_Socket * | gf_dm_sess_get_socket (GF_DownloadSession *sess) |
|
void | gf_dm_sess_set_sock_group (GF_DownloadSession *sess, GF_SockGroup *sg) |
|
void | gf_dm_sess_force_blocking (GF_DownloadSession *sess) |
|