You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/09/28 12:22:36 UTC

svn commit: r580284 [1/12] - in /webservices/axis2/trunk/c/axiom: src/attachments/ src/om/ src/parser/ src/parser/guththila/ src/parser/libxml2/ src/soap/ src/util/ test/om/ test/soap/

Author: samisa
Date: Fri Sep 28 03:22:20 2007
New Revision: 580284

URL: http://svn.apache.org/viewvc?rev=580284&view=rev
Log:
Fixed formatting

Modified:
    webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_body_part.h
    webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_output.h
    webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c
    webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c
    webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c
    webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
    webservices/axis2/trunk/c/axiom/src/om/axiom_namespace_internal.h
    webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h
    webservices/axis2/trunk/c/axiom/src/om/axiom_stax_builder_internal.h
    webservices/axis2/trunk/c/axiom/src/om/om_attribute.c
    webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_children_with_specific_attribute_iterator.c
    webservices/axis2/trunk/c/axiom/src/om/om_comment.c
    webservices/axis2/trunk/c/axiom/src/om/om_data_source.c
    webservices/axis2/trunk/c/axiom/src/om/om_doctype.c
    webservices/axis2/trunk/c/axiom/src/om/om_document.c
    webservices/axis2/trunk/c/axiom/src/om/om_element.c
    webservices/axis2/trunk/c/axiom/src/om/om_namespace.c
    webservices/axis2/trunk/c/axiom/src/om/om_navigator.c
    webservices/axis2/trunk/c/axiom/src/om/om_node.c
    webservices/axis2/trunk/c/axiom/src/om/om_output.c
    webservices/axis2/trunk/c/axiom/src/om/om_processing_instruction.c
    webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
    webservices/axis2/trunk/c/axiom/src/om/om_text.c
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c
    webservices/axis2/trunk/c/axiom/src/parser/xml_writer.c
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_body.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_envelope.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_code.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_detail.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_node.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_reason.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_role.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_sub_code.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_text.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_fault_value.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_header.h
    webservices/axis2/trunk/c/axiom/src/soap/_axiom_soap_header_block.h
    webservices/axis2/trunk/c/axiom/src/soap/axiom_soap11_builder_helper.h
    webservices/axis2/trunk/c/axiom/src/soap/axiom_soap12_builder_helper.h
    webservices/axis2/trunk/c/axiom/src/soap/soap11_builder_helper.c
    webservices/axis2/trunk/c/axiom/src/soap/soap12_builder_helper.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_body.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_code.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_detail.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_node.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_reason.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_header.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c
    webservices/axis2/trunk/c/axiom/src/util/om_util.c
    webservices/axis2/trunk/c/axiom/test/om/test_om.c
    webservices/axis2/trunk/c/axiom/test/soap/test_soap.c

Modified: webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_body_part.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_body_part.h?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_body_part.h (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_body_part.h Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -37,43 +38,50 @@
 {
 #endif
 
-   
-typedef struct axiom_mime_body_part axiom_mime_body_part_t;   
+    typedef struct axiom_mime_body_part axiom_mime_body_part_t;
 
-/** @defgroup axiom_mime_body_part
-  * @ingroup axiom_mime_body_part
-  * @{
-  */
+    /** @defgroup axiom_mime_body_part
+      * @ingroup axiom_mime_body_part
+      * @{
+      */
 
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axiom_mime_body_part_add_header(axiom_mime_body_part_t *mime_body_part, 
-        const axutil_env_t *env, 
-        const axis2_char_t *name, 
-        const axis2_char_t *value); 
-   
-    AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axiom_mime_body_part_set_data_handler(axiom_mime_body_part_t *mime_body_part, 
-        const axutil_env_t *env, 
-        axiom_data_handler_t *data_handler); 
+    axiom_mime_body_part_add_header(
+        axiom_mime_body_part_t * mime_body_part,
+        const axutil_env_t * env,
+        const axis2_char_t * name,
+        const axis2_char_t * value);
 
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axiom_mime_body_part_write_to(axiom_mime_body_part_t *mime_body_part, 
-        const axutil_env_t *env,
-        axis2_byte_t **output_stream, 
-        int *output_stream_size); 
 
-   /** Deallocate memory
-     * @return status code
-     */
+    axiom_mime_body_part_set_data_handler(
+        axiom_mime_body_part_t * mime_body_part,
+        const axutil_env_t * env,
+        axiom_data_handler_t * data_handler);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_mime_body_part_write_to(
+        axiom_mime_body_part_t * mime_body_part,
+        const axutil_env_t * env,
+        axis2_byte_t ** output_stream,
+        int *output_stream_size);
+
+    /** Deallocate memory
+      * @return status code
+      */
     AXIS2_EXTERN void AXIS2_CALL
-    axiom_mime_body_part_free(axiom_mime_body_part_t *mime_body_part, 
-        const axutil_env_t *env);
-/**
- * Creates mime_body_part struct
- * @return pointer to newly created mime_body_part
- */
-AXIS2_EXTERN axiom_mime_body_part_t * AXIS2_CALL 
-axiom_mime_body_part_create (const axutil_env_t *env);
+    axiom_mime_body_part_free(
+        axiom_mime_body_part_t * mime_body_part,
+        const axutil_env_t * env);
+
+    /**
+     * Creates mime_body_part struct
+     * @return pointer to newly created mime_body_part
+     */
+    AXIS2_EXTERN axiom_mime_body_part_t *AXIS2_CALL
+
+    axiom_mime_body_part_create(
+        const axutil_env_t * env);
 
 #define AXIOM_MIME_BODY_PART_FREE(mime_body_part, env) \
     axiom_mime_body_part_free (mime_body_part, env)
@@ -87,9 +95,9 @@
 #define AXIOM_MIME_BODY_PART_WRITE_TO(mime_body_part, env, output_stream, output_stream_size) \
     axiom_mime_body_part_write_to (mime_body_part, env, output_stream, output_stream_size)
 
-/** @} */
+    /** @} */
 
 #ifdef __cplusplus
 }
 #endif
-#endif  /* AXIOM_MIME_BODY_PART_H */
+#endif                          /* AXIOM_MIME_BODY_PART_H */

Modified: webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_output.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_output.h?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_output.h (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/axiom_mime_output.h Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -31,60 +32,63 @@
 #include <axutil_string.h>
 #include <axutil_array_list.h>
 
-
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
-/* This should be moved to header file later axutil_utils_defines.h*/    
+    /* This should be moved to header file later axutil_utils_defines.h*/
 #define axis2_byte_t char
-   
-typedef struct axiom_mime_output axiom_mime_output_t;   
-   
-
-/** @defgroup axiom_mime_output Flow
-  * @ingroup axiom_mime_output
-  * @{
-  */
-
-    AXIS2_EXTERN axis2_byte_t* AXIS2_CALL
-    axiom_mime_output_complete(axiom_mime_output_t *mime_output,
-        const axutil_env_t *env, 
-        axis2_byte_t **output_stream,
+
+    typedef struct axiom_mime_output axiom_mime_output_t;
+
+    /** @defgroup axiom_mime_output Flow
+      * @ingroup axiom_mime_output
+      * @{
+      */
+
+    AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
+    axiom_mime_output_complete(
+        axiom_mime_output_t * mime_output,
+        const axutil_env_t * env,
+        axis2_byte_t ** output_stream,
         int *output_stream_size,
-        axis2_char_t *soap_body_buffer,
-        axutil_array_list_t *binary_node_list,
-        axis2_char_t *boundary, 
-        axis2_char_t *content_id,
-        axis2_char_t *char_set_encoding,
-        const axis2_char_t *soap_content_type);
+        axis2_char_t * soap_body_buffer,
+        axutil_array_list_t * binary_node_list,
+        axis2_char_t * boundary,
+        axis2_char_t * content_id,
+        axis2_char_t * char_set_encoding,
+        const axis2_char_t * soap_content_type);
 
     AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-    axiom_mime_output_get_content_type_for_mime(axiom_mime_output_t *mime_output, 
-        const axutil_env_t *env, 
-        axis2_char_t *boundary, 
-        axis2_char_t *content_id, 
-        axis2_char_t *char_set_encoding, 
-        const axis2_char_t *soap_content_type);
-    
-   /** Deallocate memory
-     * @return status code
-     */
+
+    axiom_mime_output_get_content_type_for_mime(
+        axiom_mime_output_t * mime_output,
+        const axutil_env_t * env,
+        axis2_char_t * boundary,
+        axis2_char_t * content_id,
+        axis2_char_t * char_set_encoding,
+        const axis2_char_t * soap_content_type);
+
+    /** Deallocate memory
+      * @return status code
+      */
     AXIS2_EXTERN void AXIS2_CALL
-    axiom_mime_output_free(axiom_mime_output_t *mime_output,
-        const axutil_env_t *env);
+    axiom_mime_output_free(
+        axiom_mime_output_t * mime_output,
+        const axutil_env_t * env);
 
     /**
      * Creates mime_output struct
      * @return pointer to newly created mime_output
      */
-    AXIS2_EXTERN axiom_mime_output_t * AXIS2_CALL 
-    axiom_mime_output_create (const axutil_env_t *env);
+    AXIS2_EXTERN axiom_mime_output_t *AXIS2_CALL
+    axiom_mime_output_create(
+        const axutil_env_t * env);
 
-/** @} */
+    /** @} */
 
 #ifdef __cplusplus
 }
 #endif
-#endif  /* AXIOM_MIME_OUTPUT_H */
+#endif                          /* AXIOM_MIME_OUTPUT_H */

Modified: webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -21,24 +22,25 @@
 
 struct axiom_data_handler
 {
-    axis2_char_t* mime_type;
-    axis2_char_t* file_name;
-    axis2_byte_t* buffer;
+    axis2_char_t *mime_type;
+    axis2_char_t *file_name;
+    axis2_byte_t *buffer;
     int buffer_len;
     int data_handler_type;
 };
 
-AXIS2_EXTERN axiom_data_handler_t * AXIS2_CALL
-axiom_data_handler_create(const axutil_env_t *env,
-    const axis2_char_t *file_name,
-    const axis2_char_t *mime_type)
+AXIS2_EXTERN axiom_data_handler_t *AXIS2_CALL
+axiom_data_handler_create(
+    const axutil_env_t * env,
+    const axis2_char_t * file_name,
+    const axis2_char_t * mime_type)
 {
     axiom_data_handler_t *data_handler = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
-    data_handler = 
-	(axiom_data_handler_t *) AXIS2_MALLOC(env->allocator,
-        sizeof(axiom_data_handler_t));
+    data_handler =
+        (axiom_data_handler_t *) AXIS2_MALLOC(env->allocator,
+                                              sizeof(axiom_data_handler_t));
 
     if (!data_handler)
     {
@@ -76,14 +78,14 @@
     {
         data_handler->data_handler_type = AXIOM_DATA_HANDLER_TYPE_BUFFER;
     }
-    
+
     return data_handler;
 }
 
-
 AXIS2_EXTERN void AXIS2_CALL
-axiom_data_handler_free(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env)
+axiom_data_handler_free(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -110,41 +112,45 @@
     return;
 }
 
-AXIS2_EXTERN axis2_char_t * AXIS2_CALL
-axiom_data_handler_get_content_type(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axiom_data_handler_get_content_type(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env)
 {
     return data_handler->mime_type;
 }
 
-AXIS2_EXTERN axis2_byte_t * AXIS2_CALL
-axiom_data_handler_get_input_stream(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env)
+AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
+axiom_data_handler_get_input_stream(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env)
 {
-    return (axis2_byte_t *)data_handler->buffer;
+    return (axis2_byte_t *) data_handler->buffer;
 }
 
 AXIS2_EXTERN int AXIS2_CALL
-axiom_data_handler_get_input_stream_len(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env)
+axiom_data_handler_get_input_stream_len(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env)
 {
     return data_handler->buffer_len;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_data_handler_read_from(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env,
-    axis2_byte_t** output_stream, 
+axiom_data_handler_read_from(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
     int *output_stream_size)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    if(data_handler->data_handler_type == AXIOM_DATA_HANDLER_TYPE_BUFFER)
+    if (data_handler->data_handler_type == AXIOM_DATA_HANDLER_TYPE_BUFFER)
     {
         *output_stream = data_handler->buffer;
-        *output_stream_size = data_handler->buffer_len;  
+        *output_stream_size = data_handler->buffer_len;
     }
     else if (data_handler->data_handler_type == AXIOM_DATA_HANDLER_TYPE_FILE
-        &&  data_handler->file_name)
+             && data_handler->file_name)
     {
         FILE *f = NULL;
         axis2_byte_t *byte_stream = NULL;
@@ -159,33 +165,33 @@
         if (!f)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                " error opening file %s for reading ", 
-		data_handler->file_name);
+                            " error opening file %s for reading ",
+                            data_handler->file_name);
             return AXIS2_FAILURE;
         }
 
         do
         {
             struct stat stat_p;
-            if (-1 ==  stat(data_handler->file_name, &stat_p))
+            if (-1 == stat(data_handler->file_name, &stat_p))
             {
                 return AXIS2_FAILURE;
-	    }
-	    else if(stat_p.st_size == 0)
-	    {			  				
-	        *output_stream = NULL;
-		*output_stream_size = 0;
-		return AXIS2_SUCCESS;
-	    }
-
+            }
+            else if (stat_p.st_size == 0)
+            {
+                *output_stream = NULL;
+                *output_stream_size = 0;
+                return AXIS2_SUCCESS;
+            }
 
             read_stream_size = stat_p.st_size;
-            read_stream = AXIS2_MALLOC(env->allocator, 
-	        (read_stream_size) * sizeof(axis2_byte_t));
+            read_stream = AXIS2_MALLOC(env->allocator,
+                                       (read_stream_size) *
+                                       sizeof(axis2_byte_t));
             if (!read_stream)
             {
-                AXIS2_ERROR_SET(env->error, 
-	            AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error,
+                                AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 if (byte_stream)
                 {
                     AXIS2_FREE(env->allocator, byte_stream);
@@ -195,8 +201,8 @@
             count = fread(read_stream, 1, read_stream_size, f);
             if (ferror(f) != 0)
             {
-                AXIS2_ERROR_SET(env->error, 
-                    AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error,
+                                AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 if (byte_stream)
                 {
                     AXIS2_FREE(env->allocator, byte_stream);
@@ -216,12 +222,13 @@
                     temp_byte_stream = byte_stream;
                     temp_byte_stream_size = byte_stream_size;
                     byte_stream_size = temp_byte_stream_size + count;
-                    byte_stream = AXIS2_MALLOC(env->allocator, 
-	                (byte_stream_size) * sizeof(axis2_byte_t));
+                    byte_stream = AXIS2_MALLOC(env->allocator,
+                                               (byte_stream_size) *
+                                               sizeof(axis2_byte_t));
                     if (!byte_stream)
                     {
-                        AXIS2_ERROR_SET(env->error, 
-			    AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error,
+                                        AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                         if (read_stream)
                         {
                             AXIS2_FREE(env->allocator, read_stream);
@@ -233,10 +240,10 @@
                         return AXIS2_FAILURE;
                     }
 
-                    memcpy(byte_stream, 
-		        temp_byte_stream, temp_byte_stream_size);
-                    memcpy(byte_stream + temp_byte_stream_size, 
-		        read_stream, count);
+                    memcpy(byte_stream,
+                           temp_byte_stream, temp_byte_stream_size);
+                    memcpy(byte_stream + temp_byte_stream_size,
+                           read_stream, count);
 
                     if (read_stream)
                     {
@@ -268,8 +275,8 @@
         while (!feof(f));
 
         fclose(f);
-		data_handler->buffer = byte_stream;
-		data_handler->buffer_len = byte_stream_size;
+        data_handler->buffer = byte_stream;
+        data_handler->buffer_len = byte_stream_size;
         *output_stream = byte_stream;
         *output_stream_size = byte_stream_size;
     }
@@ -278,9 +285,11 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_data_handler_set_binary_data(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env,
-    axis2_byte_t* input_stream, int input_stream_len)
+axiom_data_handler_set_binary_data(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env,
+    axis2_byte_t * input_stream,
+    int input_stream_len)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     data_handler = data_handler;
@@ -291,8 +300,9 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_data_handler_write_to(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env)
+axiom_data_handler_write_to(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -305,13 +315,12 @@
         if (!f)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                " error opening file %s for writing ", 
-		data_handler->file_name);
+                            " error opening file %s for writing ",
+                            data_handler->file_name);
             return AXIS2_FAILURE;
         }
 
-        count = fwrite(data_handler->buffer, 
-	    1, data_handler->buffer_len, f);
+        count = fwrite(data_handler->buffer, 1, data_handler->buffer_len, f);
 
         if (ferror(f) != 0)
         {
@@ -325,9 +334,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_data_handler_set_file_name(axiom_data_handler_t *data_handler, 
-    const axutil_env_t *env,
-    axis2_char_t* file_name)
+axiom_data_handler_set_file_name(
+    axiom_data_handler_t * data_handler,
+    const axutil_env_t * env,
+    axis2_char_t * file_name)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -349,4 +359,3 @@
 
     return AXIS2_SUCCESS;
 }
-

Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,13 +16,13 @@
  * limitations under the License.
  */
 
-
 #include "axiom_mime_body_part.h"
 #include <axiom_data_handler.h>
 #include <axutil_hash.h>
 
 struct axiom_mime_body_part
 {
+
     /** hash map to hold header name, value pairs */
     axutil_hash_t *header_map;
     axiom_data_handler_t *data_handler;
@@ -29,15 +30,16 @@
 
 extern axis2_char_t AXIS2_CRLF[];
 
-
-AXIS2_EXTERN axiom_mime_body_part_t * AXIS2_CALL
-axiom_mime_body_part_create(const axutil_env_t *env)
+AXIS2_EXTERN axiom_mime_body_part_t *AXIS2_CALL
+axiom_mime_body_part_create(
+    const axutil_env_t * env)
 {
     axiom_mime_body_part_t *mime_body_part = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     mime_body_part = (axiom_mime_body_part_t *) AXIS2_MALLOC(env->allocator,
-        sizeof(axiom_mime_body_part_t));
+                                                             sizeof
+                                                             (axiom_mime_body_part_t));
 
     if (!mime_body_part)
     {
@@ -60,8 +62,9 @@
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axiom_mime_body_part_free(axiom_mime_body_part_t *mime_body_part, 
-    const axutil_env_t *env)
+axiom_mime_body_part_free(
+    axiom_mime_body_part_t * mime_body_part,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -71,7 +74,7 @@
         const void *key = NULL;
         void *value = NULL;
         for (hash_index = axutil_hash_first(mime_body_part->header_map, env);
-            hash_index; hash_index = axutil_hash_next(env, hash_index))
+             hash_index; hash_index = axutil_hash_next(env, hash_index))
         {
             axutil_hash_this(hash_index, &key, NULL, &value);
             if (value)
@@ -80,7 +83,6 @@
             }
         }
 
-    
         axutil_hash_free(mime_body_part->header_map, env);
         mime_body_part->header_map = NULL;
     }
@@ -93,24 +95,26 @@
     return;
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_mime_body_part_add_header(axiom_mime_body_part_t *mime_body_part,
-    const axutil_env_t *env,
-    const axis2_char_t *name,
-    const axis2_char_t *value)
+axiom_mime_body_part_add_header(
+    axiom_mime_body_part_t * mime_body_part,
+    const axutil_env_t * env,
+    const axis2_char_t * name,
+    const axis2_char_t * value)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE);
 
     axutil_hash_set(mime_body_part->header_map, name,
-        AXIS2_HASH_KEY_STRING, value);
+                    AXIS2_HASH_KEY_STRING, value);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_mime_body_part_set_data_handler(axiom_mime_body_part_t *mime_body_part,
-    const axutil_env_t *env, axiom_data_handler_t *data_handler)
+axiom_mime_body_part_set_data_handler(
+    axiom_mime_body_part_t * mime_body_part,
+    const axutil_env_t * env,
+    axiom_data_handler_t * data_handler)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     mime_body_part->data_handler = data_handler;
@@ -118,9 +122,11 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_mime_body_part_write_to(axiom_mime_body_part_t *mime_body_part, 
-    const axutil_env_t *env,
-    axis2_byte_t **output_stream, int *output_stream_size)
+axiom_mime_body_part_write_to(
+    axiom_mime_body_part_t * mime_body_part,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size)
 {
     axutil_hash_index_t *hash_index = NULL;
     const void *key = NULL;
@@ -137,12 +143,13 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     for (hash_index = axutil_hash_first(mime_body_part->header_map, env);
-        hash_index; hash_index = axutil_hash_next(env, hash_index))
+         hash_index; hash_index = axutil_hash_next(env, hash_index))
     {
         axutil_hash_this(hash_index, &key, NULL, &value);
         if (key && value)
         {
-            temp_header_str = axutil_stracat(env, header_str, (axis2_char_t*)key);
+            temp_header_str =
+                axutil_stracat(env, header_str, (axis2_char_t *) key);
             if (header_str)
             {
                 AXIS2_FREE(env->allocator, header_str);
@@ -151,7 +158,8 @@
             temp_header_str = axutil_stracat(env, header_str, ": ");
             AXIS2_FREE(env->allocator, header_str);
             header_str = temp_header_str;
-            temp_header_str = axutil_stracat(env, header_str, (axis2_char_t*)value);
+            temp_header_str =
+                axutil_stracat(env, header_str, (axis2_char_t *) value);
             AXIS2_FREE(env->allocator, header_str);
             header_str = temp_header_str;
             temp_header_str = axutil_stracat(env, header_str, "\r\n");
@@ -178,11 +186,12 @@
     if (mime_body_part->data_handler)
     {
         status = axiom_data_handler_read_from(mime_body_part->data_handler, env,
-            &data_handler_stream, &data_handler_stream_size);
+                                              &data_handler_stream,
+                                              &data_handler_stream_size);
         if (status == AXIS2_FAILURE)
-	{
+        {
             return AXIS2_FAILURE;
-	}
+        }
     }
 
     size = header_str_size + data_handler_stream_size;
@@ -190,7 +199,7 @@
     if (!byte_stream)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-      
+
         if (header_str)
         {
             AXIS2_FREE(env->allocator, header_str);
@@ -205,10 +214,9 @@
 
     if (data_handler_stream)
     {
-        memcpy(byte_stream + header_str_size, 
-	    data_handler_stream, data_handler_stream_size);
+        memcpy(byte_stream + header_str_size,
+               data_handler_stream, data_handler_stream_size);
     }
-
 
     *output_stream = byte_stream;
     *output_stream_size = size;

Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +16,6 @@
  * limitations under the License.
  */
 
-
 #include "axiom_mime_output.h"
 #include "axiom_data_handler.h"
 #include "axiom_mime_body_part.h"
@@ -23,61 +23,63 @@
 #include <axiom_text.h>
 #include <axiom_mime_const.h>
 
-axis2_char_t AXIS2_CRLF[] =  { 13, 10 };
+axis2_char_t AXIS2_CRLF[] = { 13, 10 };
 
 struct axiom_mime_output
 {
     int dummy;
 };
 
-static axis2_status_t 
-axis2_char_2_byte(const axutil_env_t *env, 
-    axis2_char_t *char_buffer, 
-    axis2_byte_t **byte_buffer, 
+static axis2_status_t axis2_char_2_byte(
+    const axutil_env_t * env,
+    axis2_char_t * char_buffer,
+    axis2_byte_t ** byte_buffer,
     int *byte_buffer_size);
 
-static axiom_mime_body_part_t *
-axis2_create_mime_body_part(axiom_text_t *text, 
-    const axutil_env_t *env);
+static axiom_mime_body_part_t *axis2_create_mime_body_part(
+    axiom_text_t * text,
+    const axutil_env_t * env);
+
+static axis2_status_t axis2_write_body_part(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axiom_mime_body_part_t * part,
+    axis2_char_t * boundary);
 
-static axis2_status_t
-axis2_write_body_part(axiom_mime_output_t *mime_output, 
-    const axutil_env_t *env,
-    axis2_byte_t **output_stream, 
+static axis2_status_t axis2_write_mime_boundary(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
     int *output_stream_size,
-    axiom_mime_body_part_t *part, 
-    axis2_char_t *boundary);
+    axis2_char_t * boundary);
 
-static axis2_status_t 
-axis2_write_mime_boundary(axiom_mime_output_t *mime_output, 
-    const axutil_env_t *env,
-    axis2_byte_t **output_stream, 
+static axis2_status_t axis2_write_finish_writing_mime(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
     int *output_stream_size,
-    axis2_char_t *boundary);
+    axis2_char_t * boundary);
 
-static axis2_status_t 
-axis2_write_finish_writing_mime(axiom_mime_output_t *mime_output, 
-    const axutil_env_t *env,
-    axis2_byte_t **output_stream, 
-    int *output_stream_size, 
-    axis2_char_t *boundary);
-
-static axis2_status_t 
-axis2_start_writing_mime(axiom_mime_output_t *mime_output,
-    const axutil_env_t *env, 
-    axis2_byte_t **output_stream,
-    int *output_stream_size, 
-    axis2_char_t *boundary);
+static axis2_status_t axis2_start_writing_mime(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axis2_char_t * boundary);
 
-AXIS2_EXTERN axiom_mime_output_t * AXIS2_CALL
-axiom_mime_output_create(const axutil_env_t *env)
+AXIS2_EXTERN axiom_mime_output_t *AXIS2_CALL
+axiom_mime_output_create(
+    const axutil_env_t * env)
 {
     axiom_mime_output_t *mime_output = NULL;
     AXIS2_ENV_CHECK(env, NULL);
     mime_output = (axiom_mime_output_t *) AXIS2_MALLOC(env->allocator,
-            sizeof(axiom_mime_output_t));
+                                                       sizeof
+                                                       (axiom_mime_output_t));
 
-    if (! mime_output)
+    if (!mime_output)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -87,8 +89,9 @@
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axiom_mime_output_free(axiom_mime_output_t *mime_output, 
-    const axutil_env_t *env)
+axiom_mime_output_free(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -100,18 +103,18 @@
     return;
 }
 
-
-AXIS2_EXTERN axis2_byte_t * AXIS2_CALL
-axiom_mime_output_complete(axiom_mime_output_t *mime_output,
-        const axutil_env_t *env,
-        axis2_byte_t **output_stream,
-        int *output_stream_size,
-        axis2_char_t *soap_body_buffer,
-        axutil_array_list_t *binary_node_list,
-        axis2_char_t *boundary,
-        axis2_char_t *content_id,
-        axis2_char_t *char_set_encoding,
-        const axis2_char_t *soap_content_type)
+AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
+axiom_mime_output_complete(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axis2_char_t * soap_body_buffer,
+    axutil_array_list_t * binary_node_list,
+    axis2_char_t * boundary,
+    axis2_char_t * content_id,
+    axis2_char_t * char_set_encoding,
+    const axis2_char_t * soap_content_type)
 {
     axis2_status_t status = AXIS2_FAILURE;
     axis2_char_t *header_value = NULL;
@@ -134,11 +137,12 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    status = axis2_start_writing_mime(mime_output, env, &output_stream_start, &output_stream_start_size, boundary);
+    status =
+        axis2_start_writing_mime(mime_output, env, &output_stream_start,
+                                 &output_stream_start_size, boundary);
     if (status == AXIS2_FAILURE)
         return NULL;
 
-
     root_mime_body_part = axiom_mime_body_part_create(env);
 
     /* content-type */
@@ -155,20 +159,26 @@
     temp_header_value = axutil_stracat(env, header_value, "\";");
     AXIS2_FREE(env->allocator, header_value);
     header_value = temp_header_value;
-    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env, "content-type", header_value);
+    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env, "content-type",
+                                    header_value);
 
     /* content-transfer-encoding */
-    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env, "content-transfer-encoding", axutil_strdup(env, "binary"));
+    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env,
+                                    "content-transfer-encoding",
+                                    axutil_strdup(env, "binary"));
 
     /* content-id */
-    content_id_string = (axis2_char_t *)"<";
+    content_id_string = (axis2_char_t *) "<";
     content_id_string = axutil_stracat(env, content_id_string, content_id);
     temp_content_id_string = axutil_stracat(env, content_id_string, ">");
     AXIS2_FREE(env->allocator, content_id_string);
     content_id_string = temp_content_id_string;
-    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env, "content-id", content_id_string);
+    AXIOM_MIME_BODY_PART_ADD_HEADER(root_mime_body_part, env, "content-id",
+                                    content_id_string);
 
-    axis2_write_body_part(mime_output, env, &output_stream_body, &output_stream_body_size, root_mime_body_part, boundary);
+    axis2_write_body_part(mime_output, env, &output_stream_body,
+                          &output_stream_body_size, root_mime_body_part,
+                          boundary);
 
     AXIOM_MIME_BODY_PART_FREE(root_mime_body_part, env);
     root_mime_body_part = NULL;
@@ -182,13 +192,16 @@
         int temp_size = 0;
         for (j = 0; j < axutil_array_list_size(binary_node_list, env); j++)
         {
-            axiom_text_t *text = (axiom_text_t *)axutil_array_list_get(binary_node_list, env, j);
+            axiom_text_t *text =
+                (axiom_text_t *) axutil_array_list_get(binary_node_list, env,
+                                                       j);
             if (text)
             {
                 axiom_mime_body_part_t *mime_body_part = NULL;
                 mime_body_part = axis2_create_mime_body_part(text, env);
                 axis2_write_body_part(mime_output, env, &temp_stream,
-                        &temp_stream_size, mime_body_part, boundary);
+                                      &temp_stream_size, mime_body_part,
+                                      boundary);
 
                 AXIOM_MIME_BODY_PART_FREE(mime_body_part, env);
                 mime_body_part = NULL;
@@ -196,12 +209,14 @@
                 temp = output_stream_body_parts;
                 temp_size = output_stream_body_parts_size;
                 output_stream_body_parts_size = temp_size +
-                        output_stream_start_size + temp_stream_size;
+                    output_stream_start_size + temp_stream_size;
                 output_stream_body_parts = AXIS2_MALLOC(env->allocator,
-                        output_stream_body_parts_size * sizeof(axis2_byte_t));
+                                                        output_stream_body_parts_size
+                                                        * sizeof(axis2_byte_t));
                 if (!output_stream_body_parts)
                 {
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
+                                    AXIS2_FAILURE);
                     return NULL;
                 }
 
@@ -215,13 +230,14 @@
                 if (output_stream_start)
                 {
                     memcpy(output_stream_body_parts + temp_size,
-                            output_stream_start, output_stream_start_size);
+                           output_stream_start, output_stream_start_size);
                 }
 
                 if (temp_stream)
                 {
                     memcpy(output_stream_body_parts + temp_size +
-                            output_stream_start_size, temp_stream, temp_stream_size);
+                           output_stream_start_size, temp_stream,
+                           temp_stream_size);
                     AXIS2_FREE(env->allocator, temp_stream);
                     temp_stream = NULL;
                 }
@@ -232,25 +248,25 @@
         }
     }
 
-    axis2_write_finish_writing_mime(mime_output,  env, &boundary_stream,
-            &boundary_stream_size, boundary);
+    axis2_write_finish_writing_mime(mime_output, env, &boundary_stream,
+                                    &boundary_stream_size, boundary);
 
     if (soap_body_buffer)
     {
         temp_soap_body_buffer = axutil_stracat(env, soap_body_buffer, "\r\n");
-        
-        /*AXIS2_FREE(env->allocator, soap_body_buffer);*/
+
+        /*AXIS2_FREE(env->allocator, soap_body_buffer); */
         soap_body_buffer = temp_soap_body_buffer;
-        
+
         soap_body_buffer_size = axutil_strlen(soap_body_buffer);
     }
 
     stream_buffer_size = output_stream_start_size + output_stream_body_size +
-            soap_body_buffer_size + output_stream_body_parts_size +
-            boundary_stream_size;
+        soap_body_buffer_size + output_stream_body_parts_size +
+        boundary_stream_size;
 
     stream_buffer = AXIS2_MALLOC(env->allocator,
-            stream_buffer_size * sizeof(axis2_byte_t));
+                                 stream_buffer_size * sizeof(axis2_byte_t));
 
     if (output_stream_start)
     {
@@ -262,33 +278,35 @@
     if (output_stream_body)
     {
         memcpy(stream_buffer + output_stream_start_size, output_stream_body,
-                output_stream_body_size);
+               output_stream_body_size);
         AXIS2_FREE(env->allocator, output_stream_body);
         output_stream_body = NULL;
     }
 
     if (soap_body_buffer)
     {
-        memcpy(stream_buffer + output_stream_start_size + output_stream_body_size,
-                soap_body_buffer, soap_body_buffer_size);
+        memcpy(stream_buffer + output_stream_start_size +
+               output_stream_body_size, soap_body_buffer,
+               soap_body_buffer_size);
         AXIS2_FREE(env->allocator, soap_body_buffer);
         soap_body_buffer = NULL;
     }
 
     if (output_stream_body_parts)
     {
-        memcpy(stream_buffer + output_stream_start_size + output_stream_body_size +
-                soap_body_buffer_size,
-                output_stream_body_parts, output_stream_body_parts_size);
+        memcpy(stream_buffer + output_stream_start_size +
+               output_stream_body_size + soap_body_buffer_size,
+               output_stream_body_parts, output_stream_body_parts_size);
         AXIS2_FREE(env->allocator, output_stream_body_parts);
         output_stream_body_parts = NULL;
     }
 
     if (boundary_stream)
     {
-        memcpy(stream_buffer + output_stream_start_size + output_stream_body_size +
-                soap_body_buffer_size + output_stream_body_parts_size,
-                boundary_stream, boundary_stream_size);
+        memcpy(stream_buffer + output_stream_start_size +
+               output_stream_body_size + soap_body_buffer_size +
+               output_stream_body_parts_size, boundary_stream,
+               boundary_stream_size);
         AXIS2_FREE(env->allocator, boundary_stream);
         boundary_stream = NULL;
     }
@@ -298,19 +316,26 @@
     return stream_buffer;
 }
 
-static axis2_status_t 
-axis2_start_writing_mime(axiom_mime_output_t *mime_output,
-        const axutil_env_t *env, axis2_byte_t **output_stream,
-        int *output_stream_size, axis2_char_t *boundary)
+static axis2_status_t
+axis2_start_writing_mime(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axis2_char_t * boundary)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return axis2_write_mime_boundary(mime_output, env, output_stream, output_stream_size, boundary);
+    return axis2_write_mime_boundary(mime_output, env, output_stream,
+                                     output_stream_size, boundary);
 }
 
-static axis2_status_t 
-axis2_write_mime_boundary(axiom_mime_output_t *mime_output, const axutil_env_t *env,
-        axis2_byte_t **output_stream, int *output_stream_size,
-        axis2_char_t *boundary)
+static axis2_status_t
+axis2_write_mime_boundary(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axis2_char_t * boundary)
 {
     axis2_byte_t *byte_buffer = NULL;
     axis2_byte_t *byte_stream = NULL;
@@ -321,7 +346,8 @@
     axis2_char_2_byte(env, boundary, &byte_buffer, &size);
     if (!byte_buffer)
         return AXIS2_FAILURE;
-    byte_stream = AXIS2_MALLOC(env->allocator, (size + 2) * sizeof(axis2_byte_t));
+    byte_stream =
+        AXIS2_MALLOC(env->allocator, (size + 2) * sizeof(axis2_byte_t));
     if (!byte_stream)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -337,7 +363,7 @@
         byte_buffer = NULL;
     }
 
-    /*AXIS2_FREE(env->allocator, byte_buffer);*/
+    /*AXIS2_FREE(env->allocator, byte_buffer); */
 
     *output_stream = byte_stream;
     *output_stream_size = size + 2;
@@ -346,12 +372,14 @@
 }
 
 static axiom_mime_body_part_t *
-axis2_create_mime_body_part(axiom_text_t *text, const axutil_env_t *env)
+axis2_create_mime_body_part(
+    axiom_text_t * text,
+    const axutil_env_t * env)
 {
     axiom_data_handler_t *data_handler = NULL;
     const axis2_char_t *content_type = "application/octet-stream";
-    axiom_mime_body_part_t * mime_body_part = axiom_mime_body_part_create(env);
-    axis2_char_t *content_id = (axis2_char_t *)"<";
+    axiom_mime_body_part_t *mime_body_part = axiom_mime_body_part_create(env);
+    axis2_char_t *content_id = (axis2_char_t *) "<";
     axis2_char_t *temp_content_id = NULL;
     if (!mime_body_part)
         return NULL;
@@ -362,27 +390,34 @@
         content_type = axiom_data_handler_get_content_type(data_handler, env);
     }
 
-    AXIOM_MIME_BODY_PART_SET_DATA_HANDLER(mime_body_part, env,
-            data_handler);
+    AXIOM_MIME_BODY_PART_SET_DATA_HANDLER(mime_body_part, env, data_handler);
     content_id = axutil_stracat(env,
-		    content_id,
-            axiom_text_get_content_id(text, env));
+                                content_id,
+                                axiom_text_get_content_id(text, env));
     temp_content_id = axutil_stracat(env, content_id, ">");
-    
+
     AXIS2_FREE(env->allocator, content_id);
     content_id = temp_content_id;
-    
-    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env, "content-id", content_id);
-    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env, "content-type", axutil_strdup(env, content_type));
-    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env, "content-transfer-encoding", axutil_strdup(env, "binary"));
+
+    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env, "content-id",
+                                    content_id);
+    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env, "content-type",
+                                    axutil_strdup(env, content_type));
+    AXIOM_MIME_BODY_PART_ADD_HEADER(mime_body_part, env,
+                                    "content-transfer-encoding",
+                                    axutil_strdup(env, "binary"));
 
     return mime_body_part;
 }
 
-static axis2_status_t 
-axis2_write_body_part(axiom_mime_output_t *mime_output, const axutil_env_t *env,
-        axis2_byte_t **output_stream, int *output_stream_size,
-        axiom_mime_body_part_t *part, axis2_char_t *boundary)
+static axis2_status_t
+axis2_write_body_part(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axiom_mime_body_part_t * part,
+    axis2_char_t * boundary)
 {
     axis2_byte_t *byte_buffer = NULL;
     axis2_byte_t *byte_stream = NULL;
@@ -419,7 +454,8 @@
 
     if (byte_buffer)
     {
-        memcpy(byte_stream + 2 + body_stream_size + 2, byte_buffer, byte_buffer_size);
+        memcpy(byte_stream + 2 + body_stream_size + 2, byte_buffer,
+               byte_buffer_size);
         AXIS2_FREE(env->allocator, byte_buffer);
         byte_buffer = NULL;
     }
@@ -431,9 +467,13 @@
 
 }
 
-static axis2_status_t 
-axis2_write_finish_writing_mime(axiom_mime_output_t *mime_output, const axutil_env_t *env,
-        axis2_byte_t **output_stream, int *output_stream_size, axis2_char_t *boundary)
+static axis2_status_t
+axis2_write_finish_writing_mime(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_byte_t ** output_stream,
+    int *output_stream_size,
+    axis2_char_t * boundary)
 {
     axis2_byte_t *byte_buffer;
     axis2_byte_t *byte_stream;
@@ -442,7 +482,8 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     axis2_char_2_byte(env, boundary, &byte_buffer, &size);
-    byte_stream = AXIS2_MALLOC(env->allocator, (size + 4) * sizeof(axis2_byte_t));
+    byte_stream =
+        AXIS2_MALLOC(env->allocator, (size + 4) * sizeof(axis2_byte_t));
 
     byte_stream[0] = AXIOM_MIME_BOUNDARY_BYTE;
     byte_stream[1] = AXIOM_MIME_BOUNDARY_BYTE;
@@ -465,13 +506,14 @@
 
 }
 
-AXIS2_EXTERN const axis2_char_t * AXIS2_CALL
-axiom_mime_output_get_content_type_for_mime(axiom_mime_output_t *mime_output,
-        const axutil_env_t *env,
-        axis2_char_t *boundary,
-        axis2_char_t *content_id,
-        axis2_char_t *char_set_encoding,
-        const axis2_char_t *soap_content_type)
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+axiom_mime_output_get_content_type_for_mime(
+    axiom_mime_output_t * mime_output,
+    const axutil_env_t * env,
+    axis2_char_t * boundary,
+    axis2_char_t * content_id,
+    axis2_char_t * char_set_encoding,
+    const axis2_char_t * soap_content_type)
 {
     axis2_char_t *content_type_string = NULL;
     axis2_char_t *temp_content_type_string = NULL;
@@ -484,17 +526,22 @@
     content_type_string = temp_content_type_string;
     if (boundary)
     {
-        temp_content_type_string = axutil_stracat(env, content_type_string, "boundary=");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "boundary=");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, boundary);
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, boundary);
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, "; ");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "; ");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
     }
-    temp_content_type_string = axutil_stracat(env, content_type_string, "type=\"application/xop+xml\"");
+    temp_content_type_string =
+        axutil_stracat(env, content_type_string,
+                       "type=\"application/xop+xml\"");
     AXIS2_FREE(env->allocator, content_type_string);
     content_type_string = temp_content_type_string;
     temp_content_type_string = axutil_stracat(env, content_type_string, "; ");
@@ -502,40 +549,50 @@
     content_type_string = temp_content_type_string;
     if (content_id)
     {
-        temp_content_type_string = axutil_stracat(env, content_type_string, "start=\"<");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "start=\"<");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, content_id);
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, content_id);
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, ">\"");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, ">\"");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, "; ");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "; ");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
     }
     if (soap_content_type)
     {
-        temp_content_type_string = axutil_stracat(env, content_type_string, "start-info=\"");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "start-info=\"");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, soap_content_type);
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, soap_content_type);
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, "\"; ");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "\"; ");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
     }
     if (char_set_encoding)
     {
-        temp_content_type_string = axutil_stracat(env, content_type_string, "charset=\"");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "charset=\"");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, char_set_encoding);
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, char_set_encoding);
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
-        temp_content_type_string = axutil_stracat(env, content_type_string, "\"");
+        temp_content_type_string =
+            axutil_stracat(env, content_type_string, "\"");
         AXIS2_FREE(env->allocator, content_type_string);
         content_type_string = temp_content_type_string;
     }
@@ -544,9 +601,10 @@
 }
 
 static axis2_status_t
-axis2_char_2_byte(const axutil_env_t *env, 
-    axis2_char_t *char_buffer, 
-    axis2_byte_t **byte_buffer, 
+axis2_char_2_byte(
+    const axutil_env_t * env,
+    axis2_char_t * char_buffer,
+    axis2_byte_t ** byte_buffer,
     int *byte_buffer_size)
 {
     int length;

Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -24,7 +25,7 @@
 {
     axutil_hash_t *mime_parts_map;
     int soap_body_len;
-    axis2_char_t* soap_body_str;
+    axis2_char_t *soap_body_str;
 };
 
 #define AXIOM_MIME_PARSER_BUFFER_SIZE (1024 * 1024)
@@ -34,14 +35,16 @@
 
 #define AXIOM_MIME_PARSER_END_OF_MIME_MAX_COUNT 100
 
-AXIS2_EXTERN axiom_mime_parser_t * AXIS2_CALL
-axiom_mime_parser_create(const axutil_env_t *env)
+AXIS2_EXTERN axiom_mime_parser_t *AXIS2_CALL
+axiom_mime_parser_create(
+    const axutil_env_t * env)
 {
     axiom_mime_parser_t *mime_parser = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     mime_parser = (axiom_mime_parser_t *) AXIS2_MALLOC(env->allocator,
-        sizeof(axiom_mime_parser_t));
+                                                       sizeof
+                                                       (axiom_mime_parser_t));
 
     if (!mime_parser)
     {
@@ -51,7 +54,7 @@
 
     mime_parser->mime_parts_map = NULL;
     mime_parser->soap_body_len = 0;
-    mime_parser->soap_body_str = NULL; /* shallow copy */
+    mime_parser->soap_body_str = NULL;  /* shallow copy */
 
     mime_parser->mime_parts_map = axutil_hash_make(env);
     if (!(mime_parser->mime_parts_map))
@@ -64,14 +67,15 @@
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axiom_mime_parser_free(axiom_mime_parser_t *mime_parser, 
-    const axutil_env_t *env)
+axiom_mime_parser_free(
+    axiom_mime_parser_t * mime_parser,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     /* This map is passed on to SOAP builder, and SOAP builder take over the
        ownership of the map */
-    
+
     if (mime_parser)
     {
         AXIS2_FREE(env->allocator, mime_parser);
@@ -80,13 +84,13 @@
     return;
 }
 
-
-AXIS2_EXTERN axutil_hash_t* AXIS2_CALL
-axiom_mime_parser_parse(axiom_mime_parser_t *mime_parser,
-    const axutil_env_t *env,
+AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+axiom_mime_parser_parse(
+    axiom_mime_parser_t * mime_parser,
+    const axutil_env_t * env,
     AXIS2_READ_INPUT_CALLBACK callback,
     void *callback_ctx,
-    axis2_char_t *mime_boundary)
+    axis2_char_t * mime_boundary)
 {
     axis2_char_t *buffer = NULL;
     int size = AXIOM_MIME_PARSER_BUFFER_SIZE;
@@ -109,12 +113,12 @@
 
     do
     {
-        len = callback(buffer, size, (void*)callback_ctx);
+        len = callback(buffer, size, (void *) callback_ctx);
         if (len > 0)
         {
             axis2_char_t *temp_root_mime = root_mime;
             root_mime = AXIS2_MALLOC(env->allocator,
-                sizeof(char) * (root_mime_len + len + 1));
+                                     sizeof(char) * (root_mime_len + len + 1));
             if (root_mime)
             {
                 if (temp_root_mime)
@@ -134,7 +138,8 @@
                     {
                         soap_body_len = root_mime_len - (pos - root_mime + 4);
                         soap_body_str = AXIS2_MALLOC(env->allocator,
-                            sizeof(char) * (soap_body_len + 1));
+                                                     sizeof(char) *
+                                                     (soap_body_len + 1));
                         memcpy(soap_body_str, pos + 4, soap_body_len);
                         soap_body_str[soap_body_len] = '\0';
                         *pos = '\0';
@@ -160,21 +165,22 @@
             pos -= 2;
             body_mime_len = soap_body_len - (pos - soap_body_str);
             body_mime = AXIS2_MALLOC(env->allocator,
-                sizeof(char) * (body_mime_len + 1));
+                                     sizeof(char) * (body_mime_len + 1));
             memcpy(body_mime, pos, body_mime_len);
             body_mime[body_mime_len] = '\0';
 
-            *(pos)  = '\0';
+            *(pos) = '\0';
             soap_body_len = (pos - soap_body_str);
         }
         else
         {
-            len = callback(buffer, size, (void*)callback_ctx);
+            len = callback(buffer, size, (void *) callback_ctx);
             if (len > 0)
             {
                 axis2_char_t *temp_soap_body = soap_body_str;
                 soap_body_str = AXIS2_MALLOC(env->allocator,
-                    sizeof(char) * (soap_body_len + len + 1));
+                                             sizeof(char) * (soap_body_len +
+                                                             len + 1));
                 if (soap_body_str)
                 {
                     if (temp_soap_body)
@@ -204,11 +210,11 @@
         int temp_body_mime_len = 0;
         pos = NULL;
         len = 0;
-        
+
         /* keep trac of counter to ensure that we do not go in an infinite loop
            It is possible that we could fall into an infinite loop if there 
            are problems in sender's message format
-           */
+         */
         count++;
 
         do
@@ -224,7 +230,8 @@
                 {
                     mime_binary_len = body_mime_len - (pos - body_mime + 4);
                     mime_binary = AXIS2_MALLOC(env->allocator,
-                        sizeof(char) * (mime_binary_len + 1));
+                                               sizeof(char) * (mime_binary_len +
+                                                               1));
                     memcpy(mime_binary, pos + 4, mime_binary_len);
                     mime_binary[mime_binary_len] = '\0';
                     *pos = '\0';
@@ -232,13 +239,14 @@
             }
             else
             {
-                len = callback(buffer, size, (void*)callback_ctx);
+                len = callback(buffer, size, (void *) callback_ctx);
                 if (len > 0)
                 {
                     count = 0;
                     temp_body_mime = body_mime;
                     body_mime = AXIS2_MALLOC(env->allocator,
-                        sizeof(char) * (body_mime_len + len + 1));
+                                             sizeof(char) * (body_mime_len +
+                                                             len + 1));
                     if (body_mime)
                     {
                         if (temp_body_mime)
@@ -270,7 +278,7 @@
                 do
                 {
                     pos = memchr(old_pos, AXIOM_MIME_BOUNDARY_BYTE,
-                        (mime_binary_len - (old_pos - mime_binary)));
+                                 (mime_binary_len - (old_pos - mime_binary)));
                     if (!pos)
                     {
                         break;
@@ -286,9 +294,11 @@
                         temp_pos = axutil_strstr(pos + 1, mime_boundary);
                     }
                 }
-                while (*(pos + 1) != AXIOM_MIME_BOUNDARY_BYTE || temp_pos != pos + 2);
+                while (*(pos + 1) != AXIOM_MIME_BOUNDARY_BYTE ||
+                       temp_pos != pos + 2);
 
-                if (pos && *(pos + 1) == AXIOM_MIME_BOUNDARY_BYTE && temp_pos == pos + 2)
+                if (pos && *(pos + 1) == AXIOM_MIME_BOUNDARY_BYTE &&
+                    temp_pos == pos + 2)
                 {
                     old_mime_binary_len = mime_binary_len;
                     mime_binary_len = pos - mime_binary;
@@ -301,19 +311,21 @@
 
             if (!pos)
             {
-                len = callback(buffer, size, (void*)callback_ctx);
+                len = callback(buffer, size, (void *) callback_ctx);
                 if (len > 0)
                 {
                     axis2_char_t *temp_mime_binary = NULL;
                     count = 0;
                     temp_mime_binary = mime_binary;
                     mime_binary = AXIS2_MALLOC(env->allocator,
-                        sizeof(char) * (mime_binary_len + len + 1));
+                                               sizeof(char) * (mime_binary_len +
+                                                               len + 1));
                     if (mime_binary)
                     {
                         if (temp_mime_binary)
                         {
-                            memcpy(mime_binary, temp_mime_binary, mime_binary_len);
+                            memcpy(mime_binary, temp_mime_binary,
+                                   mime_binary_len);
                             AXIS2_FREE(env->allocator, temp_mime_binary);
                         }
 
@@ -333,10 +345,13 @@
 
                 /* capture the next mime part */
                 temp_body_mime = AXIS2_MALLOC(env->allocator,
-                    sizeof(char) * (old_mime_binary_len - mime_binary_len + 1));
+                                              sizeof(char) *
+                                              (old_mime_binary_len -
+                                               mime_binary_len + 1));
                 if (temp_body_mime)
                 {
-                    memcpy(temp_body_mime, pos, old_mime_binary_len - mime_binary_len);
+                    memcpy(temp_body_mime, pos,
+                           old_mime_binary_len - mime_binary_len);
                     temp_body_mime_len = old_mime_binary_len - mime_binary_len;
                     temp_body_mime[temp_body_mime_len] = '\0';
                 }
@@ -344,7 +359,6 @@
         }
         while (!pos && len > 0);
 
-
         if (mime_parser->mime_parts_map)
         {
             /* get MIME ID */
@@ -353,7 +367,9 @@
             if (body_mime)
             {
                 id = axutil_strcasestr(body_mime, AXIOM_MIME_PARSER_CONTENT_ID);
-                type = axutil_strcasestr(body_mime, AXIOM_MIME_PARSER_CONTENT_TYPE);
+                type =
+                    axutil_strcasestr(body_mime,
+                                      AXIOM_MIME_PARSER_CONTENT_TYPE);
                 if (type)
                 {
                     axis2_char_t *end = NULL;
@@ -376,7 +392,8 @@
                     if ((end - type) > 0)
                     {
                         temp_type = AXIS2_MALLOC(env->allocator,
-                            sizeof(axis2_char_t) * ((end - type) + 1));
+                                                 sizeof(axis2_char_t) *
+                                                 ((end - type) + 1));
                         memcpy(temp_type, type, (end - type));
                         temp_type[end - type] = '\0';
                         type = temp_type;
@@ -402,22 +419,26 @@
                             axis2_char_t *mime_id = NULL;
                             int mime_id_len = 0;
                             mime_id_len = pos - id;
-                            mime_id = AXIS2_MALLOC(env->allocator,
-                                sizeof(axis2_char_t) * mime_id_len + 1); /* this would be freed by SOAP builder*/
+                            mime_id = AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * mime_id_len + 1); /* this would be freed by SOAP builder */
                             if (mime_id)
                             {
 
                                 axiom_data_handler_t *data_handler = NULL;
                                 memcpy(mime_id, id, mime_id_len);
                                 mime_id[mime_id_len] = '\0';
-                                data_handler = axiom_data_handler_create(env, NULL, type);
-                                
+                                data_handler =
+                                    axiom_data_handler_create(env, NULL, type);
+
                                 AXIS2_FREE(env->allocator, type);
-                                
-                                axiom_data_handler_set_binary_data(data_handler, env,
-                                    mime_binary, mime_binary_len - 2);
-                                axutil_hash_set(mime_parser->mime_parts_map, mime_id,
-                                    AXIS2_HASH_KEY_STRING, data_handler);
+
+                                axiom_data_handler_set_binary_data(data_handler,
+                                                                   env,
+                                                                   mime_binary,
+                                                                   mime_binary_len
+                                                                   - 2);
+                                axutil_hash_set(mime_parser->mime_parts_map,
+                                                mime_id, AXIS2_HASH_KEY_STRING,
+                                                data_handler);
                             }
                         }
                     }
@@ -443,14 +464,14 @@
             body_mime = temp_body_mime;
             body_mime_len = temp_body_mime_len;
 
-        }/*if (mime_parser->mime_parts_map)*/
-    }/* end while (!end_of_mime) */
+        }                       /*if (mime_parser->mime_parts_map) */
+    }                           /* end while (!end_of_mime) */
 
     if (body_mime)
     {
         AXIS2_FREE(env->allocator, body_mime);
     }
-    
+
     if (root_mime)
     {
         AXIS2_FREE(env->allocator, root_mime);
@@ -461,23 +482,26 @@
     return mime_parser->mime_parts_map;
 }
 
-AXIS2_EXTERN axutil_hash_t* AXIS2_CALL
-axiom_mime_parser_get_mime_parts_map(axiom_mime_parser_t *mime_parser,
-    const axutil_env_t *env)
+AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+axiom_mime_parser_get_mime_parts_map(
+    axiom_mime_parser_t * mime_parser,
+    const axutil_env_t * env)
 {
     return mime_parser->mime_parts_map;
 }
 
 AXIS2_EXTERN int AXIS2_CALL
-axiom_mime_parser_get_soap_body_len(axiom_mime_parser_t *mime_parser,
-    const axutil_env_t *env)
+axiom_mime_parser_get_soap_body_len(
+    axiom_mime_parser_t * mime_parser,
+    const axutil_env_t * env)
 {
     return mime_parser->soap_body_len;
 }
 
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axiom_mime_parser_get_soap_body_str(axiom_mime_parser_t *mime_parser,
-    const axutil_env_t *env)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axiom_mime_parser_get_soap_body_str(
+    axiom_mime_parser_t * mime_parser,
+    const axutil_env_t * env)
 {
     return mime_parser->soap_body_str;
 }

Modified: webservices/axis2/trunk/c/axiom/src/om/axiom_namespace_internal.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/axiom_namespace_internal.h?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/axiom_namespace_internal.h (original)
+++ webservices/axis2/trunk/c/axiom/src/om/axiom_namespace_internal.h Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,16 +15,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- #ifndef AXIOM_NAMESPACE_INTERNAL_H
- #define AXIOM_NAMESPACE_INTERNAL_H
- 
- 
- /** @defgroup axiom AXIOM (Axis Object Model)
-  * @ingroup axis2
-  * @{
-  */
-  
+
+#ifndef AXIOM_NAMESPACE_INTERNAL_H
+#define AXIOM_NAMESPACE_INTERNAL_H
+
+/** @defgroup axiom AXIOM (Axis Object Model)
+ * @ingroup axis2
+ * @{
+ */
+
 /** @} */
 
 #include <axiom_namespace.h>
@@ -33,10 +33,11 @@
 {
 #endif
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_namespace_set_uri(axiom_namespace_t *ns,
-    const axutil_env_t *env,
-    const axis2_char_t *ns_uri);
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_namespace_set_uri(
+        axiom_namespace_t * ns,
+        const axutil_env_t * env,
+        const axis2_char_t * ns_uri);
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h (original)
+++ webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,16 +15,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- #ifndef AXIOM_NODE_INTERNAL_H
- #define AXIOM_NODE_INTERNAL_H
- 
- 
- /** @defgroup axiom AXIOM (Axis Object Model)
-  * @ingroup axis2
-  * @{
-  */
-  
+
+#ifndef AXIOM_NODE_INTERNAL_H
+#define AXIOM_NODE_INTERNAL_H
+
+/** @defgroup axiom AXIOM (Axis Object Model)
+ * @ingroup axis2
+ * @{
+ */
+
 /** @} */
 
 #include <axiom_node.h>
@@ -32,126 +32,137 @@
 extern "C"
 {
 #endif
-  
-/**
- * @defgroup axiom_node  OM Node
- * @ingroup axiom 
- * @{
- */
-struct axiom_document;
-struct axiom_stax_builder;
 
-/**
- * Sets a parent node to a given node, if a parent already exist for this node
- * then it is detached before seting the parent internal function;
- * @param om_node child node to whom a parent to be added. , cannot be NULL.
- * @param env Environment. MUST NOT be NULL, .
- * @param parent_node the node that will be set as parent. , cannot be NULL.
- * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_parent (axiom_node_t * om_node,
-    const axutil_env_t *env,
-    axiom_node_t * parent);
-
-/**
- * Sets a node as first child of om_node
- * @param om_node om_node
- * @param env environment, MUST NOT be NULL.
- * @param first_child child to be set as first child
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_first_child(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    axiom_node_t *first_child);
-
-/**
- * Sets previous sibling
- * @param om_node 
- * @param env environment, MUST NOT be NULL.
- * @param prev_sibling 
- * @return status of the op, AXIS2_SUCCESS on success
- *     AXIS2_FAILURE on error
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL  
-axiom_node_set_previous_sibling(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    axiom_node_t *prev_sibling); 
-
-/**
- * Sets next sibling
- * @param om_node 
- * @param env environment, MUST NOT be NULL.
- * @param last_sibling 
- * @return status of the op, AXIS2_SUCCESS on success,
- *     AXIS2_FAILURE on error
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_next_sibling(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    axiom_node_t *next_sibling);
-
-/**
- * Sets node type
- * @param om_node    
- * @param env environment, MUST NOT be NULL.
- * @param type type of the node
- * @return status code of the op AXIS2_SUCCESS on success,
- *     AXIS2_FAILURE on error
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axiom_node_set_node_type(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    axiom_types_t type);
-
-/**
- * Sets data element
- * @param om_node  node struct  
- * @param env environment, MUST NOT be NULL.
- * @param data_element 
- * @return status code of the op AXIS2_SUCCESS on success,
- *     AXIS2_FAILURE on error
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axiom_node_set_data_element(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    void* data_element);
-
-/**
- * Sets the build status , if the node if completety build, this attribute  is
- * set to AXIS2_TRUE , otherwise AXIS2_FALSE  
- * @param om_node 
- * @param env environment, MUST NOT be NULL.
- * @param done
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_complete(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    axis2_bool_t done);
-
-/**
- * This functions is only to be used by builder
- * do not use this function
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_document(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    struct axiom_document *om_doc);
+    /**
+     * @defgroup axiom_node  OM Node
+     * @ingroup axiom
+     * @{
+     */
+    struct axiom_document;
+    struct axiom_stax_builder;
+
+    /**
+     * Sets a parent node to a given node, if a parent already exist for this node
+     * then it is detached before seting the parent internal function;
+     * @param om_node child node to whom a parent to be added. , cannot be NULL.
+     * @param env Environment. MUST NOT be NULL, .
+     * @param parent_node the node that will be set as parent. , cannot be NULL.
+     * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_parent(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axiom_node_t * parent);
+
+    /**
+     * Sets a node as first child of om_node
+     * @param om_node om_node
+     * @param env environment, MUST NOT be NULL.
+     * @param first_child child to be set as first child
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_first_child(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axiom_node_t * first_child);
+
+    /**
+     * Sets previous sibling
+     * @param om_node
+     * @param env environment, MUST NOT be NULL.
+     * @param prev_sibling
+     * @return status of the op, AXIS2_SUCCESS on success
+     *     AXIS2_FAILURE on error
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_previous_sibling(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axiom_node_t * prev_sibling);
+
+    /**
+     * Sets next sibling
+     * @param om_node
+     * @param env environment, MUST NOT be NULL.
+     * @param last_sibling
+     * @return status of the op, AXIS2_SUCCESS on success,
+     *     AXIS2_FAILURE on error
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_next_sibling(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axiom_node_t * next_sibling);
+
+    /**
+     * Sets node type
+     * @param om_node
+     * @param env environment, MUST NOT be NULL.
+     * @param type type of the node
+     * @return status code of the op AXIS2_SUCCESS on success,
+     *     AXIS2_FAILURE on error
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_node_type(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axiom_types_t type);
+
+    /**
+     * Sets data element
+     * @param om_node  node struct
+     * @param env environment, MUST NOT be NULL.
+     * @param data_element
+     * @return status code of the op AXIS2_SUCCESS on success,
+     *     AXIS2_FAILURE on error
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_data_element(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        void *data_element);
+
+    /**
+     * Sets the build status , if the node if completety build, this attribute  is
+     * set to AXIS2_TRUE , otherwise AXIS2_FALSE
+     * @param om_node
+     * @param env environment, MUST NOT be NULL.
+     * @param done
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_complete(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        axis2_bool_t done);
+
+    /**
+     * This functions is only to be used by builder
+     * do not use this function
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_document(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        struct axiom_document *om_doc);
+
+    /**
+     * Sets the builder
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_node_set_builder(
+        axiom_node_t * om_node,
+        const axutil_env_t * env,
+        struct axiom_stax_builder *builder);
+
+    AXIS2_EXTERN struct axiom_stax_builder *AXIS2_CALL
+
+                axiom_node_get_builder(
+                    axiom_node_t * om_node,
+                    const axutil_env_t * env);
 
-/**
- * Sets the builder
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_node_set_builder(axiom_node_t *om_node,
-    const axutil_env_t *env,
-    struct axiom_stax_builder *builder);
-
-AXIS2_EXTERN struct axiom_stax_builder *AXIS2_CALL
-axiom_node_get_builder(axiom_node_t *om_node,
-    const axutil_env_t *env);
+    /** @} */
 
-/** @} */
-    
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/axiom/src/om/axiom_stax_builder_internal.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/axiom_stax_builder_internal.h?rev=580284&r1=580283&r2=580284&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/axiom_stax_builder_internal.h (original)
+++ webservices/axis2/trunk/c/axiom/src/om/axiom_stax_builder_internal.h Fri Sep 28 03:22:20 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,16 +15,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- #ifndef AXIOM_STAX_BUILDER_INTERNAL_H
- #define AXIOM_STAX_BUILDER_INTERNAL_H
- 
- 
- /** @defgroup axiom AXIOM (Axis Object Model)
-  * @ingroup axis2
-  * @{
-  */
-  
+
+#ifndef AXIOM_STAX_BUILDER_INTERNAL_H
+#define AXIOM_STAX_BUILDER_INTERNAL_H
+
+/** @defgroup axiom AXIOM (Axis Object Model)
+ * @ingroup axis2
+ * @{
+ */
+
 /** @} */
 
 #include <axiom_stax_builder.h>
@@ -32,36 +32,42 @@
 extern "C"
 {
 #endif
-  
-/**
- * @defgroup axiom_stax builder
- * @ingroup axiom 
- * @{
- */
-    
-AXIS2_EXTERN int AXIS2_CALL
-axiom_stax_builder_get_current_event(axiom_stax_builder_t *builder,
-                                        const axutil_env_t *env);
-                                        
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_stax_builder_set_lastnode(axiom_stax_builder_t *builder,
-                                    const axutil_env_t *env,
-                                    axiom_node_t *om_node);
-                                    
-AXIS2_EXTERN int AXIS2_CALL
-axiom_stax_builder_get_element_level(axiom_stax_builder_t* builder,
-                                        const axutil_env_t *env); 
-                                            
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_stax_builder_set_element_level(axiom_stax_builder_t* builder,
-                                        const axutil_env_t *env,
-                                        int element_level);  
-AXIS2_EXTERN axiom_node_t* AXIS2_CALL
-axiom_stax_builder_get_lastnode(axiom_stax_builder_t *builder,
-                                   const axutil_env_t *env);
-  
-/** @} */
-    
+
+    /**
+     * @defgroup axiom_stax builder
+     * @ingroup axiom
+     * @{
+     */
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axiom_stax_builder_get_current_event(
+        axiom_stax_builder_t * builder,
+        const axutil_env_t * env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axiom_stax_builder_set_lastnode(
+        axiom_stax_builder_t * builder,
+        const axutil_env_t * env,
+        axiom_node_t * om_node);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axiom_stax_builder_get_element_level(
+        axiom_stax_builder_t * builder,
+        const axutil_env_t * env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+
+    axiom_stax_builder_set_element_level(
+        axiom_stax_builder_t * builder,
+        const axutil_env_t * env,
+        int element_level);
+    AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+    axiom_stax_builder_get_lastnode(
+        axiom_stax_builder_t * builder,
+        const axutil_env_t * env);
+
+    /** @} */
+
 #ifdef __cplusplus
 }
 #endif



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org