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 di...@apache.org on 2007/03/12 18:13:27 UTC

svn commit: r517291 - in /webservices/axis2/trunk/c: include/ modules/core/context/ modules/core/transport/http/sender/ modules/core/transport/http/util/ modules/mod_addr/ rampart/src/util/ samples/server/sg_math/

Author: dinesh
Date: Mon Mar 12 10:13:26 2007
New Revision: 517291

URL: http://svn.apache.org/viewvc?view=rev&rev=517291
Log:
ctx.c macros removed , code formatted

Modified:
    webservices/axis2/trunk/c/include/axis2_ctx.h
    webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
    webservices/axis2/trunk/c/modules/core/context/ctx.c
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/context/op_ctx.c
    webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
    webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c
    webservices/axis2/trunk/c/modules/mod_addr/addr_in_handler.c
    webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
    webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c
    webservices/axis2/trunk/c/samples/server/sg_math/add.c

Modified: webservices/axis2/trunk/c/include/axis2_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_ctx.h?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_ctx.h Mon Mar 12 10:13:26 2007
@@ -158,48 +158,6 @@
         const axis2_env_t *env,
         axis2_hash_t *map);
 
-
-/** Sets property with given key.
-    @sa axis2_ctx_ops#set_property */
-#define AXIS2_CTX_SET_PROPERTY(ctx, env, key, value, persistent) \
-    axis2_ctx_set_property(ctx, env, key, value, persistent)
-
-/** Gets property with given key.
-    @sa axis2_ctx_ops#get_property */
-#define AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent) \
-    axis2_ctx_get_property(ctx, env, key, persistent)
-
-/** Gets non persistent map of properties.
-    @sa axis2_ctx_ops#get_non_persistent_map */
-#define AXIS2_CTX_GET_NON_PERSISTANT_MAP(ctx, env) \
-    axis2_ctx_get_non_persistent_map(ctx, env)
-
-/** Gets all properties.
-    @sa axis2_ctx_ops#get_all_properties */
-#define AXIS2_CTX_GET_ALL_PROPERTIES(ctx, env) \
-    axis2_ctx_get_all_properties(ctx, env)
-
-/** Gets persistent map of properties.
-    @sa axis2_ctx_ops#get_persistent_map */
-#define AXIS2_CTX_GET_PERSISTANT_MAP(ctx, env) \
-    axis2_ctx_get_persistent_map(ctx, env)
-
-/** Sets non persistent map of properties.
-    @sa axis2_ctx_ops#set_non_persistent_map */
-#define AXIS2_CTX_SET_NON_PERSISTANT_MAP(ctx, env, map) \
-    axis2_ctx_set_non_persistent_map(ctx, env, map)
-
-/** Sets persistent map of properties.
-    @sa axis2_ctx_ops#set_persistent_map */
-#define AXIS2_CTX_SET_PERSISTANT_MAP(ctx, env, map) \
-    axis2_ctx_set_persistent_map(ctx, env, map)
-
-/** Frees the context.
-    @sa axis2_ctx_ops#free */
-#define AXIS2_CTX_FREE(ctx, env) \
-    axis2_ctx_free (ctx, env)
-
-/** @} */
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/conf_ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/conf_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/conf_ctx.c Mon Mar 12 10:13:26 2007
@@ -364,7 +364,7 @@
 
     if (conf_ctx->base)
     {
-        AXIS2_CTX_FREE(conf_ctx->base, env);
+         axis2_ctx_free(conf_ctx->base, env);
     }
 
     if (conf_ctx->op_ctx_map)

Modified: webservices/axis2/trunk/c/modules/core/context/ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/ctx.c Mon Mar 12 10:13:26 2007
@@ -117,8 +117,6 @@
 {
     axis2_property_t *ret = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     if (persistent)
     {
         if (ctx->persistent_map)
@@ -288,5 +286,4 @@
 
     return AXIS2_SUCCESS;
 }
-
 

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Mon Mar 12 10:13:26 2007
@@ -298,7 +298,7 @@
     
     if (msg_ctx->base)
     {
-        AXIS2_CTX_FREE(msg_ctx->base, env);
+         axis2_ctx_free(msg_ctx->base, env);
         msg_ctx->base = NULL;
     }
 
@@ -1333,7 +1333,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     /* search in message context */
-    obj = AXIS2_CTX_GET_PROPERTY(msg_ctx->base, env, key, persistent);
+    obj =  axis2_ctx_get_property(msg_ctx->base, env, key, persistent);
     if (obj)
     {
         return obj;
@@ -1344,7 +1344,7 @@
         ctx = AXIS2_OP_CTX_GET_BASE(msg_ctx->op_ctx, env);
         if (ctx)
         {
-            obj = AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent);
+            obj =  axis2_ctx_get_property(ctx, env, key, persistent);
             if (obj)
             {
                 return obj;
@@ -1357,7 +1357,7 @@
         ctx = AXIS2_SVC_CTX_GET_BASE(msg_ctx->svc_ctx, env);
         if (ctx)
         {
-            obj = AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent);
+            obj =  axis2_ctx_get_property(ctx, env, key, persistent);
             if (obj)
             {
                 return obj;
@@ -1370,7 +1370,7 @@
         ctx = AXIS2_SVC_GRP_CTX_GET_BASE(msg_ctx->svc_grp_ctx, env);
         if (ctx)
         {
-            obj = AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent);
+            obj =  axis2_ctx_get_property(ctx, env, key, persistent);
             if (obj)
             {
                 return obj;
@@ -1383,7 +1383,7 @@
         ctx =  axis2_conf_ctx_get_base(msg_ctx->conf_ctx, env);
         if (ctx)
         {
-            obj = AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent);
+            obj =  axis2_ctx_get_property(ctx, env, key, persistent);
             if (obj)
             {
                 return obj;
@@ -1404,7 +1404,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    return AXIS2_CTX_SET_PROPERTY(msg_ctx->base, env, key, value, persistent);
+    return axis2_ctx_set_property(msg_ctx->base, env, key, value, persistent);
 }
 
 const axis2_string_t *AXIS2_CALL
@@ -1762,7 +1762,7 @@
     options = axis2_options_create(env);
     AXIS2_OPTIONS_SET_MSG_INFO_HEADERS(options, env, 
         msg_ctx->msg_info_headers);
-    properties = AXIS2_CTX_GET_NON_PERSISTANT_MAP(msg_ctx->base, env);
+    properties =  axis2_ctx_get_non_persistent_map(msg_ctx->base, env);
     AXIS2_OPTIONS_SET_PROPERTIES(options, env, properties);
     return options;
 }
@@ -1793,7 +1793,7 @@
     
     msg_ctx->doing_mtom = AXIS2_OPTIONS_GET_ENABLE_MTOM(options, env);
 
-    AXIS2_CTX_SET_NON_PERSISTANT_MAP(msg_ctx->base, env,
+     axis2_ctx_set_non_persistent_map(msg_ctx->base, env,
             AXIS2_OPTIONS_GET_PROPERTIES(options, env));
     rest_val = (axis2_property_t *) AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
             AXIS2_ENABLE_REST, AXIS2_FALSE);

Modified: webservices/axis2/trunk/c/modules/core/context/op_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/op_ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/op_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/op_ctx.c Mon Mar 12 10:13:26 2007
@@ -134,7 +134,7 @@
 
     if (op_ctx->base)
     {
-        AXIS2_CTX_FREE(op_ctx->base, env);
+         axis2_ctx_free(op_ctx->base, env);
         op_ctx->base = NULL;
     }
 
@@ -142,7 +142,7 @@
     {
         if(op_ctx->msg_ctx_array[i])
         {
-            AXIS2_MSG_CTX_FREE(op_ctx->msg_ctx_array[i], env);
+             axis2_msg_ctx_free(op_ctx->msg_ctx_array[i], env);
             op_ctx->msg_ctx_array[i] = NULL;
         }
     }
@@ -192,7 +192,7 @@
     {
         if(op_ctx->msg_ctx_array[i])
         {
-            AXIS2_MSG_CTX_INIT(op_ctx->msg_ctx_array[i], env, conf);
+             axis2_msg_ctx_init(op_ctx->msg_ctx_array[i], env, conf);
         }
     }
 
@@ -307,7 +307,7 @@
     {
         if(op_ctx->msg_ctx_array[i])
         {
-            AXIS2_MSG_CTX_FREE(op_ctx->msg_ctx_array[i], env);
+             axis2_msg_ctx_free(op_ctx->msg_ctx_array[i], env);
             op_ctx->msg_ctx_array[i] = NULL;
         }
     }

Modified: webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/svc_ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_ctx.c Mon Mar 12 10:13:26 2007
@@ -121,7 +121,7 @@
 
     if (svc_ctx->base)
     {
-        AXIS2_CTX_FREE(svc_ctx->base, env);
+         axis2_ctx_free(svc_ctx->base, env);
         svc_ctx->base = NULL;
     }
 

Modified: webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c Mon Mar 12 10:13:26 2007
@@ -124,7 +124,7 @@
 
     if (svc_grp_ctx->base)
     {
-        AXIS2_CTX_FREE(svc_grp_ctx->base, env);
+         axis2_ctx_free(svc_grp_ctx->base, env);
         svc_grp_ctx->base = NULL;
     }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c Mon Mar 12 10:13:26 2007
@@ -784,7 +784,7 @@
             AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
             AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(content_type,
 																 env));
-            AXIS2_CTX_SET_PROPERTY(axis_ctx, env, MTOM_RECIVED_CONTENT_TYPE,
+            axis2_ctx_set_property(axis_ctx, env, MTOM_RECIVED_CONTENT_TYPE,
 								   property, AXIS2_FALSE);
         }
     }
@@ -797,7 +797,7 @@
             property = axis2_property_create(env);
             AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
             AXIS2_PROPERTY_SET_VALUE(property, env, charset);
-            AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
+            axis2_ctx_set_property(axis_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
 								   property, AXIS2_FALSE);
         }
     }
@@ -850,7 +850,7 @@
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, in_stream);
-    /*AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_TRANSPORT_IN, property,
+    /*axis2_ctx_set_property(axis_ctx, env, AXIS2_TRANSPORT_IN, property,
 	  AXIS2_FALSE);*/
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_IN, property,
 							   AXIS2_FALSE);
@@ -1122,7 +1122,7 @@
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
 
-    soap_env = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
+    soap_env =  axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
     if (NULL == soap_env)
     {
         return NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Mon Mar 12 10:13:26 2007
@@ -198,7 +198,7 @@
             axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
             if (ctx)
             {
-                property = AXIS2_CTX_GET_PROPERTY(ctx, env,
+                property =  axis2_ctx_get_property(ctx, env,
                         AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
                 if (property)
                 {
@@ -243,7 +243,7 @@
         }
     }
 
-    soap_data_out = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
+    soap_data_out =  axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
     if (NULL == soap_data_out)
     {
         AXIS2_ERROR_SET(env->error,

Modified: webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c Mon Mar 12 10:13:26 2007
@@ -1091,14 +1091,14 @@
         axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
         if (ctx)
         {
-            property = AXIS2_CTX_GET_PROPERTY(ctx, env,
+            property =  axis2_ctx_get_property(ctx, env,
                     AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
             if (property)
             {
                 char_set_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
                 property = NULL;
             }
-            property = AXIS2_CTX_GET_PROPERTY(ctx, env,
+            property =  axis2_ctx_get_property(ctx, env,
                     MTOM_RECIVED_CONTENT_TYPE, AXIS2_FALSE);
             if (property)
             {

Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_addr/addr_in_handler.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_in_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_in_handler.c Mon Mar 12 10:13:26 2007
@@ -173,13 +173,13 @@
                 }
             }
 
-            ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
+            ctx = axis2_msg_ctx_get_base(msg_ctx, env);
             if (ctx)
             {
                 property = axis2_property_create(env);
                 AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
                 AXIS2_PROPERTY_SET_VALUE(property, env, addr_ns_str);
-                AXIS2_CTX_SET_PROPERTY(ctx, env, AXIS2_WSA_VERSION, property, AXIS2_FALSE);
+                axis2_ctx_set_property(ctx, env, AXIS2_WSA_VERSION, property, AXIS2_FALSE);
             }
 
             /* extract service group context, if available */

Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c Mon Mar 12 10:13:26 2007
@@ -134,9 +134,9 @@
         return AXIS2_SUCCESS; /* If no action present, assume no addressing in use */
 
 
-    ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
+    ctx = axis2_msg_ctx_get_base(msg_ctx, env);
     property =
-        AXIS2_CTX_GET_PROPERTY(ctx, env, AXIS2_WSA_VERSION, AXIS2_FALSE);
+         axis2_ctx_get_property(ctx, env, AXIS2_WSA_VERSION, AXIS2_FALSE);
     if (property)
     {
         addressing_version_from_msg_ctx = AXIS2_PROPERTY_GET_VALUE(property,
@@ -175,10 +175,10 @@
         else
         {
             axis2_ctx_t *in_ctx = NULL;
-            in_ctx = AXIS2_MSG_CTX_GET_BASE(in_msg_ctx, env);
+            in_ctx = axis2_msg_ctx_get_base(in_msg_ctx, env);
 
             property =
-                AXIS2_CTX_GET_PROPERTY(in_ctx, env, AXIS2_WSA_VERSION,
+                 axis2_ctx_get_property(in_ctx, env, AXIS2_WSA_VERSION,
                         AXIS2_FALSE);
             if (property)
             {

Modified: webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/rampart_handler_util.c Mon Mar 12 10:13:26 2007
@@ -91,7 +91,7 @@
 
     /*Check if encUserPassword is in the context. This is designed specially for PHP
     i.e.In any context in the context hierarchy starting from msg, op, svc, etc.*/
-    ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
+    ctx = axis2_msg_ctx_get_base(msg_ctx, env);
     password = rampart_get_property_from_ctx(env, ctx,  RAMPART_ACTION_ENC_USER_PASSWORD);
     if (password)
     {
@@ -130,7 +130,7 @@
 
     /*Get value from the dynamic settings*/
 
-    property = AXIS2_CTX_GET_PROPERTY(ctx, env, key, AXIS2_FALSE);
+    property =  axis2_ctx_get_property(ctx, env, key, AXIS2_FALSE);
     if (property)
     {
         str_property = AXIS2_PROPERTY_GET_VALUE(property, env);

Modified: webservices/axis2/trunk/c/samples/server/sg_math/add.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/add.c?view=diff&rev=517291&r1=517290&r2=517291
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/add.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/add.c Mon Mar 12 10:13:26 2007
@@ -134,7 +134,7 @@
             {
                 axis2_property_t* prop = NULL;
                 /* get value */
-                prop = AXIS2_CTX_GET_PROPERTY(ctx, env, "ADD_RESULT", AXIS2_FALSE);
+                prop =  axis2_ctx_get_property(ctx, env, "ADD_RESULT", AXIS2_FALSE);
                 if (prop)
                 {
                     axis2_char_t *val = (axis2_char_t*)AXIS2_PROPERTY_GET_VALUE(prop, env);
@@ -145,7 +145,7 @@
                 if (prop)
                 {
                     AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(result_str, env));
-                    AXIS2_CTX_SET_PROPERTY(ctx, env, "ADD_RESULT", prop, AXIS2_FALSE);
+                    axis2_ctx_set_property(ctx, env, "ADD_RESULT", prop, AXIS2_FALSE);
                 }
             }
         }



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