axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dushshan...@apache.org
Subject svn commit: r515473 - in /webservices/axis2/trunk/c: include/axis2_desc.h modules/core/description/desc.c modules/core/description/op.c
Date Wed, 07 Mar 2007 06:30:56 GMT
Author: dushshantha
Date: Tue Mar  6 22:30:55 2007
New Revision: 515473

URL: http://svn.apache.org/viewvc?view=rev&rev=515473
Log:
corrected indentation, Dropped macros. 

Modified:
    webservices/axis2/trunk/c/include/axis2_desc.h
    webservices/axis2/trunk/c/modules/core/description/desc.c
    webservices/axis2/trunk/c/modules/core/description/op.c

Modified: webservices/axis2/trunk/c/include/axis2_desc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_desc.h?view=diff&rev=515473&r1=515472&r2=515473
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_desc.h Tue Mar  6 22:30:55 2007
@@ -26,10 +26,6 @@
  * @{
  */
 
-/**
-  * @file axis2_desc.h
-  */
-
 #include <axis2_param_container.h>
 #include <axis2_hash.h>
 #include <axis2_description.h>
@@ -42,6 +38,14 @@
     /** Type name of struct axis2_desc */
     typedef struct axis2_desc axis2_desc_t;
 
+	/**
+     * Creates a description struct instance.    
+     * @param env pointer to environment struct
+     * @return pointer to newly created description
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_desc_create (const axis2_env_t *env);
+
     /** 
      * Frees description struct.
      * @param desc pointer to description
@@ -62,7 +66,7 @@
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axis2_desc_add_param(axis2_desc_t *desc,
         const axis2_env_t *env,
-        axis2_param_t *param);
+        const axis2_param_t *param);
 
     /**
      * Gets named parameter.
@@ -149,51 +153,7 @@
     axis2_desc_remove_child(const axis2_desc_t *desc,
         const axis2_env_t *env,
         const axis2_char_t *key);
-
-    /**
-     * Creates a description struct instance.    
-     * @param env pointer to environment struct
-     * @return pointer to newly created description
-     */
-    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
-    axis2_desc_create (const axis2_env_t *env);
-
-/** Frees the desc. */
-#define AXIS2_DESC_FREE(desc, env) \
-        axis2_desc_free (desc, env)
-
-/** Adds given parameter. */
-#define AXIS2_DESC_ADD_PARAM(desc, env, param) \
-      axis2_desc_add_param (desc, env, param)
-
-/** Gets named parameter. */
-#define AXIS2_DESC_GET_PARAM(desc, env, key) \
-      axis2_desc_get_param (desc, env, key)
-
-/** Gets the map of all parameters. */
-#define AXIS2_DESC_GET_ALL_PARAMS(desc, env) \
-      axis2_desc_get_all_params (desc, env)
-
-/** Checks if named parameter is locked. */
-#define AXIS2_DESC_IS_PARAM_LOCKED(desc, env, param_name) \
-        axis2_desc_is_param_locked(desc, env, param_name)
-
-/** Adds child with given key. */
-#define AXIS2_DESC_ADD_CHILD(desc, env, key, child) \
-    axis2_desc_add_child(desc, env, key, child)
-
-/** Gets the map of all children. */
-#define AXIS2_DESC_GET_ALL_CHILDREN(desc, env) \
-    axis2_desc_get_all_children(desc, env)
-
-/** Gets child with given key. */
-#define AXIS2_DESC_GET_CHILD(desc, env, key) \
-    axis2_desc_get_child(desc, env, key)
-
-/** Removes child with given key. */
-#define AXIS2_DESC_REMOVE_CHILD(desc, env, key) \
-    axis2_desc_remove_child(desc, env, key)
-
+    
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/modules/core/description/desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/desc.c?view=diff&rev=515473&r1=515472&r2=515473
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/desc.c Tue Mar  6 22:30:55 2007
@@ -29,17 +29,16 @@
 };
 
 AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
-axis2_desc_create(
-    const axis2_env_t *env)
+axis2_desc_create(const axis2_env_t *env)
 {
     axis2_desc_t *desc = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
     desc = (axis2_desc_t *) AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_desc_t));
+        sizeof(axis2_desc_t));
 
-    if (NULL == desc)
+    if (!desc)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -49,15 +48,15 @@
     desc->children = NULL;
 
     desc->param_container = (axis2_param_container_t *)
-            axis2_param_container_create(env);
-    if (NULL == desc->param_container)
+        axis2_param_container_create(env);
+    if (!(desc->param_container))
     {
         axis2_desc_free(desc, env);
         return NULL;
     }
 
     desc->children = axis2_hash_make(env);
-    if (NULL == desc->children)
+	if (!(desc->children))
     {
         axis2_desc_free(desc, env);
         return NULL;
@@ -67,8 +66,7 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_desc_free(
-    axis2_desc_t *desc,
+axis2_desc_free(axis2_desc_t *desc,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -79,41 +77,36 @@
         void *val = NULL;
 
         for (hi = axis2_hash_first(desc->children, env); hi;
-                hi = axis2_hash_next(env, hi))
+            hi = axis2_hash_next(env, hi))
         {
             axis2_hash_this(hi, NULL, NULL, &val);
 
             if (val)
             {
                 AXIS2_MSG_FREE((axis2_msg_t *)val, env);
-                val = NULL;
             }
         }
 
         axis2_hash_free(desc->children, env);
-        desc->children = NULL;
     }
 
     if (desc->param_container)
     {
         AXIS2_PARAM_CONTAINER_FREE(desc->param_container, env);
-        desc->param_container = NULL;
     }
 
     if (desc)
     {
         AXIS2_FREE(env->allocator, desc);
-        desc = NULL;
     }
 
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_desc_add_param(
-    axis2_desc_t *desc,
+axis2_desc_add_param(axis2_desc_t *desc,
     const axis2_env_t *env,
-    axis2_param_t *param)
+    const axis2_param_t *param)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, param, AXIS2_FALSE);
@@ -122,30 +115,26 @@
 }
 
 AXIS2_EXTERN axis2_param_t *AXIS2_CALL
-axis2_desc_get_param(
-    const axis2_desc_t *desc,
+axis2_desc_get_param(const axis2_desc_t *desc,
     const axis2_env_t *env,
     const axis2_char_t *param_name)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, param_name, NULL);
-    return AXIS2_PARAM_CONTAINER_GET_PARAM(desc->param_container, env, param_name);
+    return AXIS2_PARAM_CONTAINER_GET_PARAM(desc->param_container, env,
+	    param_name);
 }
 
 AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
-axis2_desc_get_all_params(
-    const axis2_desc_t *desc,
+axis2_desc_get_all_params(const axis2_desc_t *desc,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, desc->param_container, AXIS2_FALSE);
 
     return AXIS2_PARAM_CONTAINER_GET_PARAMS(desc->param_container, env);
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_desc_is_param_locked(
-    const axis2_desc_t *desc,
+axis2_desc_is_param_locked(const axis2_desc_t *desc,
     const axis2_env_t *env,
     const axis2_char_t *param_name)
 {
@@ -160,8 +149,7 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_desc_add_child(
-    const axis2_desc_t *desc,
+axis2_desc_add_child(const axis2_desc_t *desc,
     const axis2_env_t *env,
     const axis2_char_t *key,
     const void *child)
@@ -171,35 +159,29 @@
     if (desc->children)
     {
         axis2_hash_set(desc->children, key,
-                AXIS2_HASH_KEY_STRING, child);
+            AXIS2_HASH_KEY_STRING, child);
         return AXIS2_SUCCESS;
     }
     return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
-axis2_desc_get_all_children(
-    const axis2_desc_t *desc,
+axis2_desc_get_all_children(const axis2_desc_t *desc,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     return desc->children;
 }
 
 AXIS2_EXTERN void *AXIS2_CALL
-axis2_desc_get_child(
-    const axis2_desc_t *desc,
+axis2_desc_get_child(const axis2_desc_t *desc,
     const axis2_env_t *env,
     const axis2_char_t *key)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-
     return axis2_hash_get(desc->children, key, AXIS2_HASH_KEY_STRING);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_desc_remove_child(
-    const axis2_desc_t *desc,
+axis2_desc_remove_child(const axis2_desc_t *desc,
     const axis2_env_t *env,
     const axis2_char_t *key)
 {
@@ -208,8 +190,9 @@
     if (desc->children)
     {
         axis2_hash_set(desc->children, key,
-                AXIS2_HASH_KEY_STRING, NULL);
+            AXIS2_HASH_KEY_STRING, NULL);
         return AXIS2_SUCCESS;
     }
     return AXIS2_FAILURE;
 }
+

Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/op.c?view=diff&rev=515473&r1=515472&r2=515473
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Tue Mar  6 22:30:55 2007
@@ -194,7 +194,7 @@
 
     if (op->base)
     {
-        AXIS2_DESC_FREE(op->base, env);
+        axis2_desc_free(op->base, env);
         op->base = NULL;
     }
     if (op->param_container)
@@ -714,7 +714,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_IN_FAULT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_IN_FAULT);
         if (msg)
         {
             return AXIS2_MSG_GET_FLOW(msg, env);
@@ -733,7 +733,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_OUT_FAULT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_OUT_FAULT);
         if (msg)
         {
             return AXIS2_MSG_GET_FLOW(msg, env);
@@ -752,7 +752,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_OUT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_OUT);
         if (msg)
         {
             return AXIS2_MSG_GET_FLOW(msg, env);
@@ -771,7 +771,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_IN);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_IN);
         if (msg)
         {
             return AXIS2_MSG_GET_FLOW(msg, env);
@@ -792,7 +792,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_IN_FAULT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_IN_FAULT);
         if (msg)
         {
             return AXIS2_MSG_SET_FLOW(msg, env, list);
@@ -812,7 +812,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_OUT_FAULT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_OUT_FAULT);
         if (msg)
         {
             return AXIS2_MSG_SET_FLOW(msg, env, list);
@@ -833,7 +833,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_OUT);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_OUT);
         if (msg)
         {
             return AXIS2_MSG_SET_FLOW(msg, env, list);
@@ -855,7 +855,7 @@
     if (op->base)
     {
         axis2_msg_t *msg = NULL;
-        msg = AXIS2_DESC_GET_CHILD(op->base, env, AXIS2_MSG_IN);
+        msg = axis2_desc_get_child(op->base, env, AXIS2_MSG_IN);
         if (msg)
         {
             return AXIS2_MSG_SET_FLOW(msg, env, list);
@@ -1161,7 +1161,7 @@
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, label, NULL);
 
-    return (axis2_msg_t *)AXIS2_DESC_GET_CHILD(op->base, env, label);
+    return (axis2_msg_t *)axis2_desc_get_child(op->base, env, label);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -1174,7 +1174,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, label, AXIS2_FAILURE);
 
-    return AXIS2_DESC_ADD_CHILD(op->base, env, label, msg);
+    return axis2_desc_add_child(op->base, env, label, msg);
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL



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


Mime
View raw message