summaryrefslogtreecommitdiffstats
path: root/axiom/include
diff options
context:
space:
mode:
authorGravatar damitha2010-07-07 16:34:18 +0000
committerGravatar damitha2010-07-07 16:34:18 +0000
commit4a01960cba446e046d5687279c024fa60b576d85 (patch)
treee0461698d7d9cff78dd0bf3c74f60f8893aacff5 /axiom/include
parentf0fa69a1c2a56aa4ead152afd875bdfe1f92d253 (diff)
downloadaxis2c-4a01960cba446e046d5687279c024fa60b576d85.tar.gz
axis2c-4a01960cba446e046d5687279c024fa60b576d85.tar.bz2
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
Diffstat (limited to 'axiom/include')
-rw-r--r--axiom/include/axiom_data_handler.h13
-rw-r--r--axiom/include/axiom_mime_part.h13
-rw-r--r--axiom/include/axiom_mtom_sending_callback.h8
3 files changed, 34 insertions, 0 deletions
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 <axutil_allocator.h>
#include <axutil_string.h>
#include <axutil_array_list.h>
+#include <axiom_mtom_sending_callback.h>
#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 <axutil_allocator.h>
#include <axutil_string.h>
#include <axutil_array_list.h>
+#include <axiom_mtom_sending_callback.h>
#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))