axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r722420 - in /webservices/axis2/trunk/c/axiom/include: axiom_caching_callback.h axiom_data_handler.h axiom_mime_parser.h axiom_mime_part.h axiom_mtom_caching_callback.h
Date Tue, 02 Dec 2008 10:48:15 GMT
Author: manjula
Date: Tue Dec  2 02:48:14 2008
New Revision: 722420

URL: http://svn.apache.org/viewvc?rev=722420&view=rev
Log:
Fixes for Axis2C-1302 and Axis2C-1301

Added:
    webservices/axis2/trunk/c/axiom/include/axiom_mtom_caching_callback.h
Removed:
    webservices/axis2/trunk/c/axiom/include/axiom_caching_callback.h
Modified:
    webservices/axis2/trunk/c/axiom/include/axiom_data_handler.h
    webservices/axis2/trunk/c/axiom/include/axiom_mime_parser.h
    webservices/axis2/trunk/c/axiom/include/axiom_mime_part.h

Modified: webservices/axis2/trunk/c/axiom/include/axiom_data_handler.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_data_handler.h?rev=722420&r1=722419&r2=722420&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_data_handler.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_data_handler.h Tue Dec  2 02:48:14 2008
@@ -40,7 +40,8 @@
     typedef enum axiom_data_handler_type
     {
         AXIOM_DATA_HANDLER_TYPE_FILE,
-        AXIOM_DATA_HANDLER_TYPE_BUFFER
+        AXIOM_DATA_HANDLER_TYPE_BUFFER,
+        AXIOM_DATA_HANDLER_TYPE_CALLBACK
     } axiom_data_handler_type_t;
 
     typedef struct axiom_data_handler axiom_data_handler_t;
@@ -207,6 +208,49 @@
         axiom_data_handler_t *data_handler,
         const axutil_env_t *env,
         axutil_array_list_t *list);
+   
+ 
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    axiom_data_handler_get_mime_id(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env);
+
+     /**
+     * @param data_handler, a pointer to data handler struct
+     * @param env environment, MUST NOT be NULL.
+     * @param mime id, 
+     * @return status code, AXIS2_SUCCESS on success and AXIS2_FAILURE on error.
+     */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_data_handler_set_mime_id(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env,
+        const axis2_char_t *mime_id);
+
+
+    AXIS2_EXTERN axiom_data_handler_type_t AXIS2_CALL
+    axiom_data_handler_get_data_handler_type(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN void AXIS2_CALL
+    axiom_data_handler_set_data_handler_type(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env,
+        axiom_data_handler_type_t data_handler_type);
+
+    AXIS2_EXTERN void *AXIS2_CALL
+    axiom_data_handler_get_user_param(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN void AXIS2_CALL
+    axiom_data_handler_set_user_param(
+        axiom_data_handler_t *data_handler,
+        const axutil_env_t *env,
+        void *user_param);
+
     
     /** @} */
 

Modified: webservices/axis2/trunk/c/axiom/include/axiom_mime_parser.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_mime_parser.h?rev=722420&r1=722419&r2=722420&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_mime_parser.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_mime_parser.h Tue Dec  2 02:48:14 2008
@@ -162,6 +162,22 @@
         axis2_char_t *attachment_dir);
 
 
+    /**
+      * Set Caching callback name specified in the axis2.xml
+      * @param mime_parser the pointer for the mime parser struct 
+      * @param env Environment. MUST NOT be NULL.
+      * @param callback_name is string containg the dll path
+      * @return VOID
+      */
+
+
+    AXIS2_EXTERN void AXIS2_CALL
+    axiom_mime_parser_set_caching_callback_name(
+        axiom_mime_parser_t *mime_parser,
+        const axutil_env_t *env,
+        axis2_char_t *callback_name);
+
+
 
 
     /** @} */

Modified: webservices/axis2/trunk/c/axiom/include/axiom_mime_part.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_mime_part.h?rev=722420&r1=722419&r2=722420&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_mime_part.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_mime_part.h Tue Dec  2 02:48:14 2008
@@ -49,6 +49,9 @@
         
         /* A file */
         AXIOM_MIME_PART_FILE,
+
+        /* User specified callback */
+        AXIOM_MIME_PART_CALLBACK,
         
         /* unknown type*/
         AXIOM_MIME_PART_UNKNOWN
@@ -72,6 +75,9 @@
 
         /* This is one from the above defined enum */
         axiom_mime_part_type_t type;
+
+        /* This is required in the case of the callback */
+        void *user_param;
     };
 
 

Added: webservices/axis2/trunk/c/axiom/include/axiom_mtom_caching_callback.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_mtom_caching_callback.h?rev=722420&view=auto
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_mtom_caching_callback.h (added)
+++ webservices/axis2/trunk/c/axiom/include/axiom_mtom_caching_callback.h Tue Dec  2 02:48:14
2008
@@ -0,0 +1,113 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef AXIOM_MTOM_CACHING_CALLBACK_H 
+#define AXIOM_MTOM_CACHING_CALLBACK_H
+
+/**
+  * @file axiom_mtom_caching_callback.h
+  * @brief Caching callback for mime parser 
+  */
+
+/**
+* @defgroup caching_callback 
+* @ingroup axiom
+* @{
+*/
+
+#include <axutil_env.h>
+#include <axutil_param.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**
+     * Type name for struct axiom_mtom_caching_callback_ops 
+     */
+    typedef struct axiom_mtom_caching_callback_ops axiom_mtom_caching_callback_ops_t;
+
+    /**
+     * Type name for struct axiom_mtom_caching_callback
+     */
+    typedef struct axiom_mtom_caching_callback axiom_mtom_caching_callback_t;
+
+
+    /**
+     * init_handler will init the caching storage
+     */
+
+    /**
+     * cache will write the data to the storage
+     */
+
+    /**
+     * close_handler will close the storage
+     */
+
+    struct axiom_mtom_caching_callback_ops
+    {
+        void* (AXIS2_CALL*
+            init_handler)(axiom_mtom_caching_callback_t *mtom_caching_callback,
+            const axutil_env_t* env,
+            axis2_char_t *key);
+
+        axis2_status_t (AXIS2_CALL*
+            cache)(axiom_mtom_caching_callback_t *mtom_caching_callback,
+            const axutil_env_t* env,
+            axis2_char_t *data,
+            int length,
+            void *handler);
+
+        axis2_status_t (AXIS2_CALL*
+            close_handler)(axiom_mtom_caching_callback_t *mtom_caching_callback,
+            const axutil_env_t* env,
+            void *handler);
+
+        axis2_status_t (AXIS2_CALL*
+            free)(axiom_mtom_caching_callback_t *mtom_caching_callback,
+            const axutil_env_t* env);
+    };
+
+    struct axiom_mtom_caching_callback
+    {
+        axiom_mtom_caching_callback_ops_t *ops;
+		axutil_param_t *param;
+    };
+
+    /*************************** Function macros **********************************/
+#define AXIOM_MTOM_CACHING_CALLBACK_INIT_HANDLER(mtom_caching_callback, env, key) \
+        ((mtom_caching_callback)->ops->init_handler(mtom_caching_callback, env, key))
+
+#define AXIOM_MTOM_CACHING_CALLBACK_CACHE(mtom_caching_callback, env, data, length, handler)
\
+        ((mtom_caching_callback)->ops->cache(mtom_caching_callback, env, data, length,
handler))
+
+#define AXIOM_MTOM_CACHING_CALLBACK_CLOSE_HANDLER(mtom_caching_callback, env, handler) \
+        ((mtom_caching_callback)->ops->close_handler(mtom_caching_callback, env, handler))
+
+#define AXIOM_MTOM_CACHING_CALLBACK_FREE(mtom_caching_callback, env) \
+        ((mtom_caching_callback)->ops->free(mtom_caching_callback, env))
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIOM_MTOM_CACHING_CALLBACK */
+
+



Mime
View raw message