Commit b1695fb5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added API to get file size when using file body handler

parent 5048af8c
......@@ -86,9 +86,9 @@ BELLESIP_EXPORT belle_sip_user_body_handler_t *belle_sip_user_body_handler_new(
#define BELLE_SIP_FILE_BODY_HANDLER(obj) BELLE_SIP_CAST(obj, belle_sip_file_body_handler_t)
BELLESIP_EXPORT belle_sip_file_body_handler_t *belle_sip_file_body_handler_new(const char *filepath, belle_sip_body_handler_progress_callback_t progress_cb, void *data);
BELLESIP_EXPORT size_t belle_sip_file_body_handler_get_file_size(belle_sip_file_body_handler_t *file_bh);
BELLESIP_EXPORT void belle_sip_file_body_handler_set_user_body_handler(belle_sip_file_body_handler_t *file_bh, belle_sip_user_body_handler_t *user_bh);
/*
* Multipart body handler
*/
......
......@@ -637,6 +637,10 @@ belle_sip_file_body_handler_t *belle_sip_file_body_handler_new(const char *filep
return obj;
}
size_t belle_sip_file_body_handler_get_file_size(belle_sip_file_body_handler_t *file_bh) {
return file_bh->base.expected_size;
}
void belle_sip_file_body_handler_set_user_body_handler(belle_sip_file_body_handler_t *file_bh, belle_sip_user_body_handler_t *user_bh) {
if (file_bh) {
file_bh->user_bh = user_bh;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment