Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
b1695fb5
Commit
b1695fb5
authored
Jan 18, 2017
by
Sylvain Berfini
🐮
Browse files
Added API to get file size when using file body handler
parent
5048af8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/belle-sip/bodyhandler.h
View file @
b1695fb5
...
...
@@ -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
*/
...
...
src/bodyhandler.c
View file @
b1695fb5
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment