From 4a01960cba446e046d5687279c024fa60b576d85 Mon Sep 17 00:00:00 2001 From: damitha Date: Wed, 7 Jul 2010 16:34:18 +0000 Subject: Patch in AXIS2C-1417 applied git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@961429 13f79535-47bb-0310-9956-ffa450edef68 --- axiom/include/axiom_data_handler.h | 13 +++++++++++++ axiom/include/axiom_mime_part.h | 13 +++++++++++++ axiom/include/axiom_mtom_sending_callback.h | 8 ++++++++ 3 files changed, 34 insertions(+) (limited to 'axiom/include') diff --git a/axiom/include/axiom_data_handler.h b/axiom/include/axiom_data_handler.h index 0cf65c9..5442a2f 100644 --- a/axiom/include/axiom_data_handler.h +++ b/axiom/include/axiom_data_handler.h @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" @@ -41,6 +42,7 @@ extern "C" { AXIOM_DATA_HANDLER_TYPE_FILE, AXIOM_DATA_HANDLER_TYPE_BUFFER, + AXIOM_DATA_HANDLER_TYPE_HANDLER, AXIOM_DATA_HANDLER_TYPE_CALLBACK } axiom_data_handler_type_t; @@ -240,6 +242,17 @@ extern "C" const axutil_env_t *env, axiom_data_handler_type_t data_handler_type); + AXIS2_EXTERN void AXIS2_CALL + axiom_data_handler_set_read_handler( + axiom_data_handler_t *data_handler, + const axutil_env_t *env, + int (* handler_create)( + axiom_mtom_sending_callback_t **, + const axutil_env_t *), + int (* handler_remove)( + axiom_mtom_sending_callback_t *, + const axutil_env_t *)); + AXIS2_EXTERN void *AXIS2_CALL axiom_data_handler_get_user_param( axiom_data_handler_t *data_handler, diff --git a/axiom/include/axiom_mime_part.h b/axiom/include/axiom_mime_part.h index e4cfc36..c56f50a 100644 --- a/axiom/include/axiom_mime_part.h +++ b/axiom/include/axiom_mime_part.h @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" @@ -53,6 +54,9 @@ extern "C" /* User specified callback */ AXIOM_MIME_PART_CALLBACK, + /* User specified handler functions */ + AXIOM_MIME_PART_HANDLER, + /* unknown type*/ AXIOM_MIME_PART_UNKNOWN @@ -78,6 +82,15 @@ extern "C" /* This is required in the case of the callback */ void *user_param; + + /* Required for type AXIOM_MIME_PART_HANDLER, specify + * functions for reading data */ + int (* read_handler_create)( + axiom_mtom_sending_callback_t ** inst, + const axutil_env_t * env); + int (* read_handler_remove)( + axiom_mtom_sending_callback_t * inst, + const axutil_env_t * env); }; diff --git a/axiom/include/axiom_mtom_sending_callback.h b/axiom/include/axiom_mtom_sending_callback.h index ce2587e..fb97d5e 100644 --- a/axiom/include/axiom_mtom_sending_callback.h +++ b/axiom/include/axiom_mtom_sending_callback.h @@ -73,6 +73,11 @@ extern "C" void *handler, axis2_char_t **buffer); + int (AXIS2_CALL* + data_size)(axiom_mtom_sending_callback_t *mtom_sending_callback, + const axutil_env_t* env, + void *handler); + axis2_status_t (AXIS2_CALL* close_handler)(axiom_mtom_sending_callback_t *mtom_sending_callback, const axutil_env_t* env, @@ -96,6 +101,9 @@ extern "C" #define AXIOM_MTOM_SENDING_CALLBACK_LOAD_DATA(mtom_sending_callback, env, handler, buffer) \ ((mtom_sending_callback)->ops->load_data(mtom_sending_callback, env, handler, buffer)) +#define AXIOM_MTOM_SENDING_CALLBACK_DATA_SIZE(mtom_sending_callback, env, handler) \ + ((mtom_sending_callback)->ops->data_size(mtom_sending_callback, env, handler)) + #define AXIOM_MTOM_SENDING_CALLBACK_CLOSE_HANDLER(mtom_sending_callback, env, handler) \ ((mtom_sending_callback)->ops->close_handler(mtom_sending_callback, env, handler)) -- cgit v1.1-32-gdbae