axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r518623 [13/17] - in /webservices/axis2/trunk/c: build/win32/ include/ modules/core/clientapi/ modules/core/deployment/ modules/core/engine/ modules/core/phaseresolver/ modules/core/receivers/ modules/core/transport/http/receiver/ modules/c...
Date Thu, 15 Mar 2007 13:16:11 GMT
Modified: webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/phases_info.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/phases_info.c Thu Mar 15 06:16:07 2007
@@ -17,13 +17,8 @@
 
 #include <axis2_phases_info.h>
 
-/**
- * @brief Phases Info struct impl
- *   Axis2 Phases Info impl
- */
-typedef struct axis2_phases_info_impl
+struct axis2_phases_info
 {
-    axis2_phases_info_t phases_info;
     axis2_array_list_t *in_phases;
     axis2_array_list_t *out_phases;
     axis2_array_list_t *in_faultphases;
@@ -33,209 +28,66 @@
     axis2_hash_t *op_in_faultphases;
     axis2_hash_t *op_out_faultphases;
 
-}
-axis2_phases_info_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(phases_info) \
-        ((axis2_phases_info_impl_t *)(phases_info))
-
-/***************************** Function headers *******************************/
-
-axis2_status_t AXIS2_CALL
-axis2_phases_info_free(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_phases_info_set_in_phases(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env,
-    axis2_array_list_t *in_phases);
-
-axis2_status_t AXIS2_CALL
-axis2_phases_info_set_out_phases(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env,
-    axis2_array_list_t *out_phases);
-
-axis2_status_t AXIS2_CALL
-axis2_phases_info_set_in_faultphases(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env,
-    axis2_array_list_t *in_faultphases);
-
-axis2_status_t AXIS2_CALL
-axis2_phases_info_set_out_faultphases(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env,
-    axis2_array_list_t *out_faultphases);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_in_phases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_out_phases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_in_faultphases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_out_faultphases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_in_phases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_out_phases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_in_faultphases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_out_faultphases(
-    const axis2_phases_info_t *phases_info,
-    const axis2_env_t *env);
+};
 
-axis2_status_t AXIS2_CALL
-axis2_phases_info_set_op_phases(
-    axis2_phases_info_t *phases_info,
-    const axis2_env_t *env,
-    struct axis2_op *op_desc);
-
-/***************************** End of function headers ************************/
-
-axis2_phases_info_t *AXIS2_CALL
+AXIS2_EXTERN axis2_phases_info_t *AXIS2_CALL
 axis2_phases_info_create(
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
+    axis2_phases_info_t *phases_info = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    phases_info_impl = (axis2_phases_info_impl_t *) AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_phases_info_impl_t));
-
-    if (NULL == phases_info_impl)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-
-    phases_info_impl->in_phases = NULL;
-    phases_info_impl->out_phases = NULL;
-    phases_info_impl->in_faultphases = NULL;
-    phases_info_impl->out_faultphases = NULL;
-    phases_info_impl->op_in_phases = axis2_hash_make(env);
-    phases_info_impl->op_out_phases = axis2_hash_make(env);
-    phases_info_impl->op_in_faultphases = axis2_hash_make(env);
-    phases_info_impl->op_out_faultphases = axis2_hash_make(env);
-
-    phases_info_impl->phases_info.ops = (axis2_phases_info_ops_t *)
-            AXIS2_MALLOC(env->allocator, sizeof(axis2_phases_info_ops_t));
+    phases_info = (axis2_phases_info_t *) AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_phases_info_t));
 
-    if (NULL == phases_info_impl->phases_info.ops)
+    if (NULL == phases_info)
     {
-        AXIS2_FREE(env->allocator, phases_info_impl);
-        phases_info_impl = NULL;
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    phases_info_impl->phases_info.ops->free = axis2_phases_info_free;
-
-    phases_info_impl->phases_info.ops->set_in_phases =
-        axis2_phases_info_set_in_phases;
-
-    phases_info_impl->phases_info.ops->set_out_phases =
-        axis2_phases_info_set_out_phases;
-
-    phases_info_impl->phases_info.ops->set_in_faultphases =
-        axis2_phases_info_set_in_faultphases;
-
-    phases_info_impl->phases_info.ops->set_out_faultphases =
-        axis2_phases_info_set_out_faultphases;
-
-    phases_info_impl->phases_info.ops->get_in_phases =
-        axis2_phases_info_get_in_phases;
-
-    phases_info_impl->phases_info.ops->get_out_phases =
-        axis2_phases_info_get_out_phases;
-
-    phases_info_impl->phases_info.ops->get_in_faultphases =
-        axis2_phases_info_get_in_faultphases;
-
-    phases_info_impl->phases_info.ops->get_out_faultphases =
-        axis2_phases_info_get_out_faultphases;
-
-    phases_info_impl->phases_info.ops->get_op_in_phases =
-        axis2_phases_info_get_op_in_phases;
-
-    phases_info_impl->phases_info.ops->get_op_out_phases =
-        axis2_phases_info_get_op_out_phases;
-
-    phases_info_impl->phases_info.ops->get_op_in_faultphases =
-        axis2_phases_info_get_op_in_faultphases;
+    phases_info->in_phases = NULL;
+    phases_info->out_phases = NULL;
+    phases_info->in_faultphases = NULL;
+    phases_info->out_faultphases = NULL;
+    phases_info->op_in_phases = axis2_hash_make(env);
+    phases_info->op_out_phases = axis2_hash_make(env);
+    phases_info->op_in_faultphases = axis2_hash_make(env);
+    phases_info->op_out_faultphases = axis2_hash_make(env);
 
-    phases_info_impl->phases_info.ops->get_op_out_faultphases =
-        axis2_phases_info_get_op_out_faultphases;
-
-    phases_info_impl->phases_info.ops->set_op_phases =
-        axis2_phases_info_set_op_phases;
-
-    return &(phases_info_impl->phases_info);
+    return phases_info;
 }
 
-/******************************************************************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_free(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
 
-    if (phases_info_impl->in_phases)
+    if (phases_info->in_phases)
     {
-        axis2_array_list_free(phases_info_impl->in_phases, env);
-        phases_info_impl->in_phases = NULL;
+        axis2_array_list_free(phases_info->in_phases, env);
     }
 
-    if (phases_info_impl->out_phases)
+    if (phases_info->out_phases)
     {
-        axis2_array_list_free(phases_info_impl->out_phases, env);
-        phases_info_impl->out_phases = NULL;
+        axis2_array_list_free(phases_info->out_phases, env);
     }
 
-    if (phases_info_impl->in_faultphases)
+    if (phases_info->in_faultphases)
     {
-        axis2_array_list_free(phases_info_impl->in_faultphases, env);
-        phases_info_impl->in_faultphases = NULL;
+        axis2_array_list_free(phases_info->in_faultphases, env);
     }
 
-    if (phases_info_impl->out_faultphases)
+    if (phases_info->out_faultphases)
     {
-        axis2_array_list_free(phases_info_impl->out_faultphases, env);
-        phases_info_impl->out_faultphases = NULL;
+        axis2_array_list_free(phases_info->out_faultphases, env);
     }
-    if (phases_info_impl->op_in_phases)
+    if (phases_info->op_in_phases)
     {
         axis2_hash_index_t *i = NULL;
-        for (i = axis2_hash_first (phases_info_impl->op_in_phases, env); i; i =
+        for (i = axis2_hash_first (phases_info->op_in_phases, env); i; i =
                 axis2_hash_next (env, i))
         {
             void *v = NULL;
@@ -246,16 +98,14 @@
             if(phase)
             {
                 AXIS2_PHASE_FREE(phase, env);
-                phase = NULL;
             }
         }
-        axis2_hash_free(phases_info_impl->op_in_phases, env);
-        phases_info_impl->op_in_phases = NULL;
+        axis2_hash_free(phases_info->op_in_phases, env);
     }
-    if (phases_info_impl->op_out_phases)
+    if (phases_info->op_out_phases)
     {
         axis2_hash_index_t *i = NULL;
-        for (i = axis2_hash_first (phases_info_impl->op_out_phases, env); i; i =
+        for (i = axis2_hash_first (phases_info->op_out_phases, env); i; i =
                 axis2_hash_next (env, i))
         {
             void *v = NULL;
@@ -266,16 +116,14 @@
             if(phase)
             {
                 AXIS2_PHASE_FREE(phase, env);
-                phase = NULL;
             }
         }
-        axis2_hash_free(phases_info_impl->op_out_phases, env);
-        phases_info_impl->op_out_phases = NULL;
+        axis2_hash_free(phases_info->op_out_phases, env);
     }
-    if (phases_info_impl->op_in_faultphases)
+    if (phases_info->op_in_faultphases)
     {
         axis2_hash_index_t *i = NULL;
-        for (i = axis2_hash_first (phases_info_impl->op_in_faultphases, env); 
+        for (i = axis2_hash_first (phases_info->op_in_faultphases, env); 
             i; i = axis2_hash_next (env, i))
         {
             void *v = NULL;
@@ -286,16 +134,14 @@
             if(phase)
             {
                 AXIS2_PHASE_FREE(phase, env);
-                phase = NULL;
             }
         }
-        axis2_hash_free(phases_info_impl->op_in_faultphases, env);
-        phases_info_impl->op_in_faultphases = NULL;
+        axis2_hash_free(phases_info->op_in_faultphases, env);
     }
-    if (phases_info_impl->op_out_faultphases)
+    if (phases_info->op_out_faultphases)
     {
         axis2_hash_index_t *i = NULL;
-        for (i = axis2_hash_first (phases_info_impl->op_out_faultphases, env); 
+        for (i = axis2_hash_first (phases_info->op_out_faultphases, env); 
             i; i = axis2_hash_next (env, i))
         {
             void *v = NULL;
@@ -306,158 +152,130 @@
             if(phase)
             {
                 AXIS2_PHASE_FREE(phase, env);
-                phase = NULL;
             }
         }
-        axis2_hash_free(phases_info_impl->op_out_faultphases, env);
-        phases_info_impl->op_out_faultphases = NULL;
-    }
-    if (phases_info->ops)
-    {
-        AXIS2_FREE(env->allocator, phases_info->ops);
-        phases_info->ops = NULL;
+        axis2_hash_free(phases_info->op_out_faultphases, env);
     }
 
-    if (phases_info_impl)
+    if (phases_info)
     {
-        AXIS2_FREE(env->allocator, phases_info_impl);
-        phases_info_impl = NULL;
+        AXIS2_FREE(env->allocator, phases_info);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_set_in_phases(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env,
     axis2_array_list_t *in_phases)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_phases, AXIS2_FAILURE);
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
 
-    if (phases_info_impl->in_phases)
+    if (phases_info->in_phases)
     {
-        axis2_array_list_free(phases_info_impl->in_phases, env);
-        phases_info_impl->in_phases = NULL;
+        axis2_array_list_free(phases_info->in_phases, env);
     }
 
-    phases_info_impl->in_phases = in_phases;
+    phases_info->in_phases = in_phases;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_set_out_phases(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env,
     axis2_array_list_t *out_phases)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_phases, AXIS2_FAILURE);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-    if (phases_info_impl->out_phases)
+    if (phases_info->out_phases)
     {
-        axis2_array_list_free(phases_info_impl->out_phases, env);
-        phases_info_impl->out_phases = NULL;
+        axis2_array_list_free(phases_info->out_phases, env);
+        phases_info->out_phases = NULL;
     }
-    phases_info_impl->out_phases = out_phases;
+    phases_info->out_phases = out_phases;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_set_in_faultphases(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env,
     axis2_array_list_t *in_faultphases)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_faultphases, AXIS2_FAILURE);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-    if (phases_info_impl->in_faultphases)
+    if (phases_info->in_faultphases)
     {
-        axis2_array_list_free(phases_info_impl->in_faultphases, env);
-        phases_info_impl->in_faultphases = NULL;
+        axis2_array_list_free(phases_info->in_faultphases, env);
+        phases_info->in_faultphases = NULL;
     }
-    phases_info_impl->in_faultphases = in_faultphases;
+    phases_info->in_faultphases = in_faultphases;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_set_out_faultphases(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env,
     axis2_array_list_t *out_faultphases)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_faultphases, AXIS2_FAILURE);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-    if (phases_info_impl->out_faultphases)
+    if (phases_info->out_faultphases)
     {
-        axis2_array_list_free(phases_info_impl->out_faultphases, env);
-        phases_info_impl->out_faultphases = NULL;
+        axis2_array_list_free(phases_info->out_faultphases, env);
+        phases_info->out_faultphases = NULL;
     }
-    phases_info_impl->out_faultphases = out_faultphases;
+    phases_info->out_faultphases = out_faultphases;
     return AXIS2_SUCCESS;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_in_phases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
-    return AXIS2_INTF_TO_IMPL(phases_info)->in_phases;
+    return phases_info->in_phases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_out_phases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-
-    return AXIS2_INTF_TO_IMPL(phases_info)->out_phases;
+    return phases_info->out_phases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_in_faultphases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-
-    return AXIS2_INTF_TO_IMPL(phases_info)->in_faultphases;
+    return phases_info->in_faultphases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_out_faultphases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-
-    return AXIS2_INTF_TO_IMPL(phases_info)->out_faultphases;
+    return phases_info->out_faultphases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_op_in_phases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
     struct axis2_phase *phase = NULL;
     int i = 0;
     int size = 0;
@@ -467,19 +285,18 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
     op_in_phases = axis2_array_list_create(env, 0);
     if (!op_in_phases)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    /*phase = axis2_hash_get(phases_info_impl->op_in_phases, 
+    /*phase = axis2_hash_get(phases_info->op_in_phases, 
         AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING);
     if(!phase)
     {
         phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
-        axis2_hash_set(phases_info_impl->op_in_phases, 
+        axis2_hash_set(phases_info->op_in_phases, 
             AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING, phase);
     }
 
@@ -492,15 +309,15 @@
         op_in_phases = NULL;
         return NULL;
     }*/
-    if (!phases_info_impl->in_phases)
+    if (!phases_info->in_phases)
     {
         return op_in_phases;
     }
-    size = axis2_array_list_size(phases_info_impl->in_phases, env);
+    size = axis2_array_list_size(phases_info->in_phases, env);
     for (i = 0; i < size; i++)
     {
         phase_name = (axis2_char_t *) axis2_array_list_get(
-                    phases_info_impl->in_phases, env, i);
+                    phases_info->in_phases, env, i);
         if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORT_IN, phase_name) ||
             0 == AXIS2_STRCMP(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
             0 == AXIS2_STRCMP(AXIS2_PHASE_DISPATCH, phase_name) ||
@@ -510,12 +327,12 @@
         }
         else
         {
-            phase = axis2_hash_get(phases_info_impl->op_in_phases, phase_name, 
+            phase = axis2_hash_get(phases_info->op_in_phases, phase_name, 
                 AXIS2_HASH_KEY_STRING);
             if(!phase)
             {
                 phase = axis2_phase_create(env, phase_name);
-                axis2_hash_set(phases_info_impl->op_in_phases, phase_name,
+                axis2_hash_set(phases_info->op_in_phases, phase_name,
                     AXIS2_HASH_KEY_STRING, phase);
             }
             status = axis2_array_list_add(op_in_phases, env, phase);
@@ -542,12 +359,11 @@
     return op_in_phases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_op_out_phases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
     struct axis2_phase *phase = NULL;
     int i = 0;
     int size = 0;
@@ -557,10 +373,8 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-
-    if (phases_info_impl->out_phases)
-        size = axis2_array_list_size(phases_info_impl->out_phases, env);
+    if (phases_info->out_phases)
+        size = axis2_array_list_size(phases_info->out_phases, env);
     op_out_phases = axis2_array_list_create(env, 0);
     if (!op_out_phases)
     {
@@ -569,14 +383,14 @@
     }
     for (i = 0; i < size; i++)
     {
-        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info_impl->
+        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info->
                 out_phases, env, i);
-        phase = axis2_hash_get(phases_info_impl->op_out_phases, phase_name, 
+        phase = axis2_hash_get(phases_info->op_out_phases, phase_name, 
             AXIS2_HASH_KEY_STRING);
         if(!phase)
         {
             phase = axis2_phase_create(env, phase_name);
-            axis2_hash_set(phases_info_impl->op_out_phases, phase_name,
+            axis2_hash_set(phases_info->op_out_phases, phase_name,
                 AXIS2_HASH_KEY_STRING, phase);
         }
         status = axis2_array_list_add(op_out_phases, env, phase);
@@ -599,12 +413,12 @@
             return NULL;
         }
     }
-    /*phase = axis2_hash_get(phases_info_impl->op_out_phases, 
+    /*phase = axis2_hash_get(phases_info->op_out_phases, 
         AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING);
     if(!phase)
     {
         phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
-        axis2_hash_set(phases_info_impl->op_out_phases, 
+        axis2_hash_set(phases_info->op_out_phases, 
             AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING, phase);
     }
     status = axis2_array_list_add(op_out_phases, env, phase);
@@ -626,12 +440,12 @@
         op_out_phases = NULL;
         return NULL;
     }
-    phase = axis2_hash_get(phases_info_impl->op_out_phases, 
+    phase = axis2_hash_get(phases_info->op_out_phases, 
         AXIS2_PHASE_MESSAGE_OUT, AXIS2_HASH_KEY_STRING);
     if(!phase)
     {
         phase = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
-        axis2_hash_set(phases_info_impl->op_out_phases, 
+        axis2_hash_set(phases_info->op_out_phases, 
             AXIS2_PHASE_MESSAGE_OUT, AXIS2_HASH_KEY_STRING, phase);
     }
 
@@ -662,12 +476,11 @@
     return op_out_phases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_op_in_faultphases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
     int i = 0;
     int size = 0;
     axis2_status_t status = AXIS2_FAILURE;
@@ -676,13 +489,12 @@
     struct axis2_phase *phase = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
 
-    if (!phases_info_impl->in_faultphases)
+    if (!phases_info->in_faultphases)
     {
         return NULL;
     }
-    size = axis2_array_list_size(phases_info_impl->in_faultphases, env);
+    size = axis2_array_list_size(phases_info->in_faultphases, env);
     if (0 == size)
     {
         return NULL;
@@ -695,14 +507,14 @@
     }
     for (i = 0; i < size; i++)
     {
-        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info_impl->
+        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info->
                 in_faultphases, env, i);
-        phase = axis2_hash_get(phases_info_impl->op_in_faultphases, phase_name, 
+        phase = axis2_hash_get(phases_info->op_in_faultphases, phase_name, 
             AXIS2_HASH_KEY_STRING);
         if(!phase)
         {
             phase = axis2_phase_create(env, phase_name);
-            axis2_hash_set(phases_info_impl->op_in_faultphases, 
+            axis2_hash_set(phases_info->op_in_faultphases, 
                 phase_name, AXIS2_HASH_KEY_STRING, phase);
         }
         status = axis2_array_list_add(op_in_faultphases, env, phase);
@@ -729,12 +541,11 @@
     return op_in_faultphases;
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_get_op_out_faultphases(
     const axis2_phases_info_t *phases_info,
     const axis2_env_t *env)
 {
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
     int i = 0;
     int size = 0;
     axis2_status_t status = AXIS2_FAILURE;
@@ -744,13 +555,12 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-
-    if (!phases_info_impl->out_faultphases)
+    if (!phases_info->out_faultphases)
     {
         return NULL;
     }
-    size = axis2_array_list_size(phases_info_impl->out_faultphases, env);
+    size = axis2_array_list_size(phases_info->out_faultphases, env);
+
     if (0 == size)
         return NULL;
     op_out_faultphases = axis2_array_list_create(env, 0);
@@ -761,14 +571,14 @@
     }
     for (i = 0; i < size; i++)
     {
-        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info_impl->
+        phase_name = (axis2_char_t *) axis2_array_list_get(phases_info->
                 out_faultphases, env, i);
-        phase = axis2_hash_get(phases_info_impl->op_out_faultphases, phase_name, 
+        phase = axis2_hash_get(phases_info->op_out_faultphases, phase_name, 
             AXIS2_HASH_KEY_STRING);
         if(!phase)
         {
             phase = axis2_phase_create(env, phase_name);
-            axis2_hash_set(phases_info_impl->op_out_faultphases, 
+            axis2_hash_set(phases_info->op_out_faultphases, 
                 phase_name, AXIS2_HASH_KEY_STRING, phase);
         }
         status = axis2_array_list_add(op_out_faultphases, env, phase);
@@ -795,7 +605,7 @@
     return op_out_faultphases;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phases_info_set_op_phases(
     axis2_phases_info_t *phases_info,
     const axis2_env_t *env,
@@ -807,13 +617,9 @@
     axis2_array_list_t *op_in_faultphases = NULL;
     axis2_array_list_t *op_out_faultphases = NULL;
 
-    axis2_phases_info_impl_t *phases_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
 
-    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-
     op_in_phases = axis2_phases_info_get_op_in_phases(phases_info, env);
     if (NULL == op_in_phases)
     {
@@ -870,7 +676,7 @@
 
 }
 
-axis2_array_list_t *AXIS2_CALL
+AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
 axis2_phases_info_copy_flow(
     const axis2_env_t *env,
     const axis2_array_list_t *flow_to_copy)

Modified: webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c Thu Mar 15 06:16:07 2007
@@ -19,121 +19,47 @@
 #include <axis2_ws_info_list.h>
 #include <axis2_dir_handler.h>
 
-/**
- * @brief DLL Description struct impl
- * Axis2 DLL Description impl
- */
-typedef struct axis2_repos_listener_impl
+struct axis2_repos_listener
 {
-    axis2_repos_listener_t repos_listener;
     /**
      * Referance to a WSInfoList
      */
     axis2_ws_info_list_t *info_list;
 
-    int BUFFER;
-
     /**
      * The parent directory of the modules and services directories
      * that the listentner should listent
      */
     axis2_char_t *folder_name;
+};
 
-
-
-}
-axis2_repos_listener_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(repos_listener) \
-        ((axis2_repos_listener_impl_t *) repos_listener)
-
-/*************************** Function headers *********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_free(
-    axis2_repos_listener_t *repos_listener,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_check_modules(
-    axis2_repos_listener_t *listener,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_check_svcs(
-    axis2_repos_listener_t *listener,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_update(
-    axis2_repos_listener_t *listener,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_init(
-    axis2_repos_listener_t *listener,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_repos_listener_start_listen(
-    axis2_repos_listener_t *listener,
-    const axis2_env_t *env);
-
-/**
- * This method is to search a given folder  for jar files
- * and added them to a list wich is in the WSInfolist class
- */
 static axis2_status_t
 axis2_repos_listener_search(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env,
     axis2_char_t *folder_name,
     int type);
 
-/************************* End of function headers ****************************/
-
-axis2_repos_listener_t *AXIS2_CALL
+AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
 axis2_repos_listener_create(
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
+    axis2_repos_listener_t *repos_listener = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    listener_impl = (axis2_repos_listener_impl_t *) AXIS2_MALLOC(env->allocator
-            , sizeof(axis2_repos_listener_impl_t));
-
-    if (NULL == listener_impl)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    listener_impl->folder_name = NULL;
-    listener_impl->info_list = NULL;
-    listener_impl->BUFFER = 2048;
-    listener_impl->repos_listener.ops = NULL;
-
-    listener_impl->repos_listener.ops = (axis2_repos_listener_ops_t *)
-            AXIS2_MALLOC(env->allocator, sizeof(axis2_repos_listener_ops_t));
+    repos_listener = (axis2_repos_listener_t *) AXIS2_MALLOC(env->allocator
+            , sizeof(axis2_repos_listener_t));
 
-    if (NULL == listener_impl->repos_listener.ops)
+    if (NULL == repos_listener)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
+    repos_listener->folder_name = NULL;
+    repos_listener->info_list = NULL;
 
-    listener_impl->repos_listener.ops->free = axis2_repos_listener_free;
-    listener_impl->repos_listener.ops->check_modules =
-        axis2_repos_listener_check_modules;
-    listener_impl->repos_listener.ops->check_svcs =
-        axis2_repos_listener_check_svcs;
-    listener_impl->repos_listener.ops->update = axis2_repos_listener_update;
-    listener_impl->repos_listener.ops->init = axis2_repos_listener_init;
-    listener_impl->repos_listener.ops->start_listen =
-        axis2_repos_listener_start_listen;
-
-
-    return &(listener_impl->repos_listener);
+    return repos_listener;
 }
 
 
@@ -142,40 +68,40 @@
  * Fisrt it initilize the syetm , by loading all the modules in the /modules directory
  * and also create a WSInfoList to keep infor about available modules and services
  *
- * @param folderName    path to parent directory that the listener should listen
+ * @param folderName    path to parent directory that the repos_listener should listen
  * @param deploy_engine refearnce to engine registry  inorder to inform the updates
  */
 
-axis2_repos_listener_t *AXIS2_CALL
+AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
 axis2_repos_listener_create_with_folder_name_and_dep_engine(
     const axis2_env_t *env,
     axis2_char_t *folder_name,
     axis2_dep_engine_t *dep_engine)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
+    axis2_repos_listener_t *repos_listener = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    listener_impl = (axis2_repos_listener_impl_t *) axis2_repos_listener_create(env);
+    repos_listener = (axis2_repos_listener_t *) axis2_repos_listener_create(env);
 
-    if (NULL == listener_impl)
+    if (NULL == repos_listener)
     {
         return NULL;
     }
-    listener_impl->folder_name = AXIS2_STRDUP(folder_name, env);
-    if (!listener_impl->folder_name)
+    repos_listener->folder_name = AXIS2_STRDUP(folder_name, env);
+    if (!repos_listener->folder_name)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    listener_impl->info_list = axis2_ws_info_list_create_with_dep_engine(
+    repos_listener->info_list = axis2_ws_info_list_create_with_dep_engine(
                 env, dep_engine);
-    if (!listener_impl->info_list)
+    if (!repos_listener->info_list)
     {
         return NULL;
     }
-    status = axis2_repos_listener_init(&(listener_impl->repos_listener), env);
+    status = axis2_repos_listener_init(repos_listener, env);
     if (AXIS2_SUCCESS != status)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
@@ -183,117 +109,89 @@
         return NULL;
     }
 
-    return &(listener_impl->repos_listener);
+    return repos_listener;
 }
 
-/******************************************************************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_free(
     axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    listener_impl = AXIS2_INTF_TO_IMPL(repos_listener);
-
-    if (listener_impl->folder_name)
+    if (repos_listener->folder_name)
     {
-        AXIS2_FREE(env->allocator, listener_impl->folder_name);
-        listener_impl->folder_name = NULL;
+        AXIS2_FREE(env->allocator, repos_listener->folder_name);
     }
 
-    if (listener_impl->info_list)
+    if (repos_listener->info_list)
     {
-        AXIS2_WS_INFO_LIST_FREE(listener_impl->info_list, env);
-        listener_impl->info_list = NULL;
+        AXIS2_WS_INFO_LIST_FREE(repos_listener->info_list, env);
     }
 
-    if (repos_listener->ops)
-    {
-        AXIS2_FREE(env->allocator, repos_listener->ops);
-        repos_listener->ops = NULL;
-    }
-
-    AXIS2_FREE(env->allocator, listener_impl);
-    listener_impl = NULL;
+    AXIS2_FREE(env->allocator, repos_listener);
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_check_modules(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
     axis2_char_t *module_path = NULL;
     axis2_char_t *temp_path = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
 
-    temp_path = AXIS2_STRACAT(listener_impl->folder_name, AXIS2_PATH_SEP_STR,
+    temp_path = AXIS2_STRACAT(repos_listener->folder_name, AXIS2_PATH_SEP_STR,
             env);
     module_path = AXIS2_STRACAT(temp_path, AXIS2_MODULE_PATH, env);
     AXIS2_FREE(env->allocator, temp_path);
-    status = axis2_repos_listener_search(listener, env, module_path, AXIS2_MODULE);
+    status = axis2_repos_listener_search(repos_listener, env, module_path, AXIS2_MODULE);
     AXIS2_FREE(env->allocator, module_path);
     return status;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_check_svcs(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
     axis2_char_t *svc_path = NULL;
     axis2_char_t *temp_path = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
 
-    temp_path = AXIS2_STRACAT(listener_impl->folder_name, AXIS2_PATH_SEP_STR,
+    temp_path = AXIS2_STRACAT(repos_listener->folder_name, AXIS2_PATH_SEP_STR,
             env);
     svc_path = AXIS2_STRACAT(temp_path, AXIS2_SVC_PATH, env);
     AXIS2_FREE(env->allocator, temp_path);
-    status = axis2_repos_listener_search(listener, env, svc_path, AXIS2_SVC);
+    status = axis2_repos_listener_search(repos_listener, env, svc_path, AXIS2_SVC);
     AXIS2_FREE(env->allocator, svc_path);
     return status;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_update(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
-
-    /* TODO completet this */
-    /* this call the update method of WSInfoList */
-    return AXIS2_WS_INFO_LIST_UPDATE(listener_impl->info_list, env);
+    return AXIS2_WS_INFO_LIST_UPDATE(repos_listener->info_list, env);
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_init(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
 
-    status = AXIS2_WS_INFO_LIST_INIT(listener_impl->info_list, env);
+    status = AXIS2_WS_INFO_LIST_INIT(repos_listener->info_list, env);
     if (AXIS2_SUCCESS != status)
     {
         return status;
@@ -301,41 +199,37 @@
     /* if check_modules return AXIS2_FAILURE that means
      * there are no modules to load
      */
-    axis2_repos_listener_check_modules(listener, env);
+    axis2_repos_listener_check_modules(repos_listener, env);
 
     /* if check_svcs return AXIS2_FAILURE that means
      * there are no services to load
      */
-    axis2_repos_listener_check_svcs(listener, env);
+    axis2_repos_listener_check_svcs(repos_listener, env);
     /* TODO uncomment this when hot update done */
-    return axis2_repos_listener_update(listener, env);
+    return axis2_repos_listener_update(repos_listener, env);
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_repos_listener_start_listen(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
 
-    AXIS2_WS_INFO_LIST_INIT(listener_impl->info_list, env);
-    /* axis2_repos_listener_check_modules(listener, env); */
-    axis2_repos_listener_check_svcs(listener, env);
-    axis2_repos_listener_update(listener, env);
+    AXIS2_WS_INFO_LIST_INIT(repos_listener->info_list, env);
+    /* axis2_repos_listener_check_modules(repos_listener, env); */
+    axis2_repos_listener_check_svcs(repos_listener, env);
+    axis2_repos_listener_update(repos_listener, env);
     return AXIS2_SUCCESS;
 }
 
 static axis2_status_t
 axis2_repos_listener_search(
-    axis2_repos_listener_t *listener,
+    axis2_repos_listener_t *repos_listener,
     const axis2_env_t *env,
     axis2_char_t *folder_name,
     int type)
 {
-    axis2_repos_listener_impl_t *listener_impl = NULL;
     int size = 0;
     int i = 0;
     axis2_array_list_t *current_info_list = NULL;
@@ -343,7 +237,6 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, folder_name, AXIS2_FAILURE);
-    listener_impl = AXIS2_INTF_TO_IMPL(listener);
 
     current_info_list = axis2_dir_handler_list_service_or_module_dirs(env,
             folder_name);
@@ -364,7 +257,7 @@
     {
         axis2_file_t *file = NULL;
         file = axis2_array_list_get(current_info_list, env, i);
-        status = AXIS2_WS_INFO_LIST_ADD_WS_INFO_ITEM(listener_impl->info_list, env,
+        status = AXIS2_WS_INFO_LIST_ADD_WS_INFO_ITEM(repos_listener->info_list, env,
                 file, type);
         if (AXIS2_SUCCESS != status)
         {

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c Thu Mar 15 06:16:07 2007
@@ -20,37 +20,11 @@
 #include <axis2_utils.h>
 #include <axis2_property.h>
 
-/**
-* This struct is to convert OM->ServiceDescrption , where it first create OM
-* from services.xml and then populate service description by using OM
-*/
-typedef struct axis2_svc_builder_impl
+struct axis2_svc_builder
 {
-    axis2_svc_builder_t svc_builder;
-
     axis2_svc_t *svc;
-
-}
-axis2_svc_builder_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(svc_builder) \
-    ((axis2_svc_builder_impl_t *) svc_builder)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_svc_builder_free(
-    axis2_svc_builder_t *svc_builder,
-    const axis2_env_t *env);
-
-/**
- * top most method that is used to populate service from corresponding OM
- */
-axis2_status_t AXIS2_CALL
-axis2_svc_builder_populate_svc(
-    axis2_svc_builder_t *svc_builder,
-    const axis2_env_t *env,
-    axiom_node_t *svc_node);
+    struct axis2_desc_builder *desc_builder;
+};
 
 static axis2_array_list_t *
 axis2_svc_builder_process_ops(
@@ -58,169 +32,119 @@
     const axis2_env_t *env,
     axiom_children_qname_iterator_t *op_itr);
 
-axis2_status_t AXIS2_CALL
-axis2_svc_builder_process_svc_module_conf(
-    axis2_svc_builder_t *svc_builder,
-    const axis2_env_t *env,
-    axiom_children_qname_iterator_t *module_confs,
-    axis2_param_container_t *parent,
-    axis2_svc_t *svc);
-
-/**
- * To get the list og modules that is requird to be engage globally
- */
-axis2_status_t AXIS2_CALL
-axis2_svc_builder_process_module_refs(
-    axis2_svc_builder_t *svc_builder,
-    const axis2_env_t *env,
-    axiom_children_qname_iterator_t *module_refs);
-
-/************************** End of function prototypes ************************/
-
-axis2_svc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
 axis2_svc_builder_create(
     const axis2_env_t *env)
 {
-    axis2_svc_builder_impl_t *svc_builder_impl = NULL;
+    axis2_svc_builder_t *svc_builder = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_builder_impl = (axis2_svc_builder_impl_t *) AXIS2_MALLOC(env->
-            allocator, sizeof(axis2_svc_builder_impl_t));
-
+    svc_builder = (axis2_svc_builder_t *) AXIS2_MALLOC(env->
+            allocator, sizeof(axis2_svc_builder_t));
 
-    if (NULL == svc_builder_impl)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
 
-    svc_builder_impl->svc_builder.desc_builder = NULL;
-    svc_builder_impl->svc = NULL;
-    svc_builder_impl->svc_builder.ops = NULL;
-
-    svc_builder_impl->svc_builder.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_builder_ops_t));
-    if (NULL == svc_builder_impl->svc_builder.ops)
+    if (NULL == svc_builder)
     {
-        axis2_svc_builder_free(&(svc_builder_impl->svc_builder), env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    svc_builder_impl->svc_builder.ops->free = axis2_svc_builder_free;
-    svc_builder_impl->svc_builder.ops->populate_svc =
-        axis2_svc_builder_populate_svc;
-    svc_builder_impl->svc_builder.ops->process_module_refs =
-        axis2_svc_builder_process_module_refs;
+    svc_builder->desc_builder = NULL;
+    svc_builder->svc = NULL;
 
-    return &(svc_builder_impl->svc_builder);
+    return svc_builder;
 }
 
-axis2_svc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
 axis2_svc_builder_create_with_file_and_dep_engine_and_svc(
     const axis2_env_t *env,
     axis2_char_t *file_name,
     struct axis2_dep_engine *dep_engine,
     axis2_svc_t *svc)
 {
-    axis2_svc_builder_impl_t *builder_impl = NULL;
+    axis2_svc_builder_t *svc_builder = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
     AXIS2_PARAM_CHECK(env->error, dep_engine, NULL);
     AXIS2_PARAM_CHECK(env->error, svc, NULL);
-    builder_impl = (axis2_svc_builder_impl_t *) axis2_svc_builder_create(env);
-    if (NULL == builder_impl)
+    svc_builder = (axis2_svc_builder_t *) axis2_svc_builder_create(env);
+    if (NULL == svc_builder)
     {
         return NULL;
     }
-    builder_impl->svc_builder.desc_builder =
+    svc_builder->desc_builder =
         axis2_desc_builder_create_with_file_and_dep_engine(env, file_name,
                 dep_engine);
-    if (!builder_impl->svc_builder.desc_builder)
+    if (!svc_builder->desc_builder)
     {
-        axis2_svc_builder_free(&(builder_impl->svc_builder), env);
+        axis2_svc_builder_free(svc_builder, env);
         return NULL;
     }
-    builder_impl->svc = svc;
-    return &(builder_impl->svc_builder);
+    svc_builder->svc = svc;
+    return svc_builder;
 }
 
-axis2_svc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
 axis2_svc_builder_create_with_dep_engine_and_svc(
     const axis2_env_t *env,
     axis2_dep_engine_t *dep_engine,
     axis2_svc_t *svc)
 {
-    axis2_svc_builder_impl_t *builder_impl = NULL;
+    axis2_svc_builder_t *svc_builder = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, dep_engine, NULL);
     AXIS2_PARAM_CHECK(env->error, svc, NULL);
-    builder_impl = (axis2_svc_builder_impl_t *) axis2_svc_builder_create(env);
-    if (NULL == builder_impl)
+    svc_builder = (axis2_svc_builder_t *) axis2_svc_builder_create(env);
+    if (NULL == svc_builder)
     {
         return NULL;
     }
-    builder_impl->svc_builder.desc_builder =
+    svc_builder->desc_builder =
         axis2_desc_builder_create_with_dep_engine(env, dep_engine);
-    if (!builder_impl->svc_builder.desc_builder)
+    if (!svc_builder->desc_builder)
     {
-        axis2_svc_builder_free(&(builder_impl->svc_builder), env);
+        axis2_svc_builder_free(svc_builder, env);
         return NULL;
     }
-    builder_impl->svc = svc;
-    return &(builder_impl->svc_builder);
+    svc_builder->svc = svc;
+    return svc_builder;
 }
 
-/***************************Function implementation****************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_builder_free(
     axis2_svc_builder_t *svc_builder,
     const axis2_env_t *env)
 {
-    axis2_svc_builder_impl_t *svc_builder_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_builder_impl = AXIS2_INTF_TO_IMPL(svc_builder);
-
     if (svc_builder->desc_builder)
     {
         AXIS2_DESC_BUILDER_FREE(svc_builder->desc_builder, env);
-        svc_builder->desc_builder = NULL;
     }
 
-    svc_builder_impl->svc = NULL;
+    svc_builder->svc = NULL;
 
-    if (svc_builder->ops)
+    if (svc_builder)
     {
-        AXIS2_FREE(env->allocator, svc_builder->ops);
-        svc_builder->ops = NULL;
-    }
-
-    if (svc_builder_impl)
-    {
-        AXIS2_FREE(env->allocator, svc_builder_impl);
-        svc_builder_impl = NULL;
+        AXIS2_FREE(env->allocator, svc_builder);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_builder_populate_svc(
     axis2_svc_builder_t *svc_builder,
     const axis2_env_t *env,
     axiom_node_t *svc_node)
 {
-    axis2_svc_builder_impl_t *builder_impl = NULL;
     axiom_element_t *svc_element = NULL;
     axiom_children_qname_iterator_t *itr = NULL;
     axiom_children_qname_iterator_t *operation_itr = NULL;
-    /*axiom_children_qname_iterator_t *module_configs_itr = NULL; */
     axis2_qname_t *qparamst = NULL;
     axis2_qname_t *qdesc = NULL;
     axis2_qname_t *qmodulest = NULL;
@@ -230,7 +154,6 @@
     axis2_qname_t *qout_faultflowst = NULL;
     axis2_qname_t *qopst = NULL;
     axis2_qname_t *qattname = NULL;
-    /*axis2_qname_t *qmodule_config = NULL; */
     axis2_status_t status = AXIS2_FAILURE;
     axis2_svc_grp_t *parent = NULL;
     axiom_element_t *desc_element = NULL;
@@ -261,7 +184,6 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_node, AXIS2_FAILURE);
-    builder_impl = AXIS2_INTF_TO_IMPL(svc_builder);
 
     svc_element = AXIOM_NODE_GET_DATA_ELEMENT(svc_node, env);
     /* Processing service level paramters */
@@ -275,11 +197,11 @@
             svc_node);
     AXIS2_QNAME_FREE(qparamst, env);
     qparamst = NULL;
-    parent = AXIS2_SVC_GET_PARENT(builder_impl->svc, env);
+    parent = AXIS2_SVC_GET_PARENT(svc_builder->svc, env);
 
     status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(svc_builder->desc_builder, env,
             itr, 
-            axis2_svc_get_param_container(builder_impl->svc, env), 
+            axis2_svc_get_param_container(svc_builder->svc, env), 
             axis2_svc_grp_get_param_container(parent, env));
     if (AXIS2_SUCCESS != status)
     {
@@ -308,7 +230,7 @@
 		  description_text = AXIOM_ELEMENT_GET_TEXT (desc_element, env, desc_node);
 		  if (description_text)
 			 {
-				  AXIS2_SVC_SET_SVC_DESC (builder_impl->svc, env, description_text);
+				  AXIS2_SVC_SET_SVC_DESC (svc_builder->svc, env, description_text);
 			 }
     }
 	 /* --------------------services description end -------------------- */
@@ -316,7 +238,7 @@
     qattname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
     name_attr = AXIOM_ELEMENT_GET_ATTRIBUTE(svc_element, env, qattname);
     svc_name = axiom_attribute_get_value(name_attr, env);
-    AXIS2_SVC_SET_NAME(builder_impl->svc, env, svc_name);
+    AXIS2_SVC_SET_NAME(svc_builder->svc, env, svc_name);
     AXIS2_QNAME_FREE(qattname, env);
 
     /* create dll_desc and set it in a parameter. then set that param in param
@@ -324,7 +246,7 @@
      */
     dll_desc = axis2_dll_desc_create(env);
     impl_info_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
-                axis2_svc_get_param_container(builder_impl->svc, env),
+                axis2_svc_get_param_container(svc_builder->svc, env),
                 env,
                 AXIS2_SERVICE_CLASS);
     if (!impl_info_param)
@@ -336,8 +258,9 @@
     svc_dll_name =
          axis2_dll_desc_create_platform_specific_dll_name(dll_desc, env,
                 class_name);
-    arch_file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(builder_impl->
-            svc_builder.desc_builder->engine, env);
+    arch_file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(
+        axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env), 
+            env);
     svc_folder = AXIS2_ARCH_FILE_DATA_GET_FILE(arch_file_data, env);
     timestamp =  axis2_file_get_timestamp(svc_folder, env);
      axis2_dll_desc_set_timestamp(dll_desc, env, timestamp);
@@ -387,8 +310,8 @@
         axis2_flow_t *flow = NULL;
 
         flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(svc_builder->desc_builder, env,
-                in_flow_element, builder_impl->svc->param_container, in_flow_node);
-        status = AXIS2_SVC_SET_IN_FLOW(builder_impl->svc, env, flow);
+                in_flow_element, svc_builder->svc->param_container, in_flow_node);
+        status = AXIS2_SVC_SET_IN_FLOW(svc_builder->svc, env, flow);
         if (AXIS2_SUCCESS != status)
         {
             AXIS2_FLOW_FREE(flow, env);
@@ -406,8 +329,8 @@
         axis2_flow_t *flow = NULL;
 
         flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(svc_builder->desc_builder, env,
-                out_flow_element, builder_impl->svc->param_container, out_flow_node);
-        status = AXIS2_SVC_SET_OUT_FLOW(builder_impl->svc, env, flow);
+                out_flow_element, svc_builder->svc->param_container, out_flow_node);
+        status = AXIS2_SVC_SET_OUT_FLOW(svc_builder->svc, env, flow);
         if (AXIS2_SUCCESS != status)
         {
             AXIS2_FLOW_FREE(flow, env);
@@ -426,9 +349,9 @@
         axis2_flow_t *flow = NULL;
 
         flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(svc_builder->desc_builder, env,
-                in_faultflow_element, builder_impl->svc->param_container,
+                in_faultflow_element, svc_builder->svc->param_container,
                 in_faultflow_node);
-        status = AXIS2_SVC_SET_FAULT_IN_FLOW(builder_impl->svc, env, flow);
+        status = AXIS2_SVC_SET_FAULT_IN_FLOW(svc_builder->svc, env, flow);
         if (AXIS2_SUCCESS != status)
         {
             AXIS2_FLOW_FREE(flow, env);
@@ -446,9 +369,9 @@
         axis2_flow_t *flow = NULL;
 
         flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(svc_builder->desc_builder, env,
-                out_faultflow_element, builder_impl->svc->param_container,
+                out_faultflow_element, svc_builder->svc->param_container,
                 out_faultflow_node);
-        status = AXIS2_SVC_SET_FAULT_OUT_FLOW(builder_impl->svc, env, flow);
+        status = AXIS2_SVC_SET_FAULT_OUT_FLOW(svc_builder->svc, env, flow);
         if (AXIS2_SUCCESS != status)
         {
             AXIS2_FLOW_FREE(flow, env);
@@ -491,10 +414,10 @@
                 axis2_char_t *key = NULL;
 
                 key = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(param, env);
-                AXIS2_SVC_ADD_MAPPING(builder_impl->svc, env, key, op_desc);
+                AXIS2_SVC_ADD_MAPPING(svc_builder->svc, env, key, op_desc);
             }
         }
-        AXIS2_SVC_ADD_OP(builder_impl->svc, env, op_desc);
+        AXIS2_SVC_ADD_OP(svc_builder->svc, env, op_desc);
     }
     axis2_array_list_free(ops, env);
     /*
@@ -503,7 +426,7 @@
         env, qmodule_config, svc_node);
     AXIS2_QNAME_FREE(qmodule_config, env) ;
     status = axis2_svc_builder_process_svc_module_conf(svc_builder, env, 
-        module_configs_itr, builder_impl->svc->param_container, builder_impl->svc);
+        module_configs_itr, svc_builder->svc->param_container, svc_builder->svc);
     */
     return AXIS2_SUCCESS;
 }
@@ -514,12 +437,10 @@
     const axis2_env_t *env,
     axiom_children_qname_iterator_t *op_itr)
 {
-    axis2_svc_builder_impl_t *builder_impl = NULL;
     axis2_array_list_t *ops = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, op_itr, NULL);
-    builder_impl = AXIS2_INTF_TO_IMPL(svc_builder);
 
     ops = axis2_array_list_create(env, 0);
     while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(op_itr, env))
@@ -542,6 +463,7 @@
         axiom_element_t *recv_element = NULL;
         axiom_node_t *recv_node = NULL;
         axis2_status_t status = AXIS2_FAILURE;
+        struct axis2_dep_engine *dep_engine = NULL;
 
         op_node = axiom_children_qname_iterator_next(op_itr, env);
         /* getting operation name */
@@ -572,7 +494,7 @@
         }
         op_name = axiom_attribute_get_value(op_name_att, env);
         qopname = axis2_qname_create(env, op_name, NULL, NULL);
-        /*wsdl_op = AXIS2_SVC_GET_WSDL_OP(builder_impl->svc, env, qopname);*/
+        /*wsdl_op = AXIS2_SVC_GET_WSDL_OP(svc_builder->svc, env, qopname);*/
         /*if (NULL == wsdl_op)
         {*/
             /*if (NULL == mep_url)
@@ -618,7 +540,7 @@
         status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(svc_builder->desc_builder,
                 env, params_itr, 
                 axis2_op_get_param_container(op_desc, env), 
-                axis2_svc_get_param_container(builder_impl->svc, env));
+                axis2_svc_get_param_container(svc_builder->svc, env));
         /* To process wsamapping */
         AXIS2_DESC_BUILDER_PROCESS_ACTION_MAPPINGS(svc_builder->desc_builder, 
             env, op_node, op_desc);
@@ -657,10 +579,12 @@
             return AXIS2_FAILURE;
         }
         /* setting operation phase */
-        if (svc_builder->desc_builder->engine)
+        dep_engine = 
+            axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env);
+        if (dep_engine)
         {
             axis2_phases_info_t *info = AXIS2_DEP_ENGINE_GET_PHASES_INFO(
-                        svc_builder->desc_builder->engine, env);
+                        dep_engine, env);
             AXIS2_PHASES_INFO_SET_OP_PHASES(info, env, op_desc);
         }
 
@@ -672,7 +596,7 @@
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_builder_process_svc_module_conf(
     axis2_svc_builder_t *svc_builder,
     const axis2_env_t *env,
@@ -706,18 +630,15 @@
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_builder_process_module_refs(
     axis2_svc_builder_t *svc_builder,
     const axis2_env_t *env,
     axiom_children_qname_iterator_t *
     module_refs)
 {
-    axis2_svc_builder_impl_t *builder_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_refs, AXIS2_FAILURE);
-    builder_impl = AXIS2_INTF_TO_IMPL(svc_builder);
 
     while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_refs, env))
     {
@@ -740,8 +661,9 @@
 
             ref_name = axiom_attribute_get_value(module_ref_att, env);
             qrefname = axis2_qname_create(env, ref_name, NULL, NULL);
-            if (NULL == AXIS2_DEP_ENGINE_GET_MODULE(svc_builder->desc_builder->
-                    engine, env, qrefname))
+            if (NULL == AXIS2_DEP_ENGINE_GET_MODULE(
+                axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env), 
+                env, qrefname))
             {
                 AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
                         AXIS2_FAILURE);
@@ -749,11 +671,18 @@
             }
             else
             {
-                AXIS2_SVC_ADD_MODULE_QNAME(builder_impl->svc, env, qrefname);
+                AXIS2_SVC_ADD_MODULE_QNAME(svc_builder->svc, env, qrefname);
             }
             AXIS2_QNAME_FREE(qrefname, env);
         }
     }
     return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN struct axis2_desc_builder *AXIS2_CALL
+axis2_svc_builder_get_desc_builder(const axis2_svc_builder_t *svc_builder,
+    const axis2_env_t *env)
+{
+    return svc_builder->desc_builder;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c Thu Mar 15 06:16:07 2007
@@ -17,151 +17,89 @@
 
 #include <axis2_svc_grp_builder.h>
 
-typedef struct axis2_svc_grp_builder_impl
+struct axis2_svc_grp_builder
 {
-    axis2_svc_grp_builder_t svc_grp_builder;
     axiom_node_t *svc_grp;
+    axis2_desc_builder_t *desc_builder;
+};
 
-}
-axis2_svc_grp_builder_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(svc_grp_builder) \
-    ((axis2_svc_grp_builder_impl_t *) svc_grp_builder)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_builder_free(
-    axis2_svc_grp_builder_t *svc_grp_builder,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_builder_populate_svc_grp(
-    axis2_svc_grp_builder_t *grp_builder,
-    const axis2_env_t *env,
-    axis2_svc_grp_t *svc_grp);
-
-/**
- * To get the list og modules that is requird to be engage globally
- * @param module_refs  <code>axiom_children_qname_iterator_t</code>
- */
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_builder_process_module_refs(
-    axis2_svc_grp_builder_t *grp_builder,
-    const axis2_env_t *env,
-    axiom_children_qname_iterator_t *module_refs ,
-    axis2_svc_grp_t *svc_grp);
-
-/************************** End of function prototypes ************************/
-
-axis2_svc_grp_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_grp_builder_t *AXIS2_CALL
 axis2_svc_grp_builder_create(
     const axis2_env_t *env)
 {
-    axis2_svc_grp_builder_impl_t *svc_grp_builder_impl = NULL;
+    axis2_svc_grp_builder_t *svc_grp_builder = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_grp_builder_impl = (axis2_svc_grp_builder_impl_t *) AXIS2_MALLOC(env->
-            allocator, sizeof(axis2_svc_grp_builder_impl_t));
-
+    svc_grp_builder = (axis2_svc_grp_builder_t *) AXIS2_MALLOC(env->
+            allocator, sizeof(axis2_svc_grp_builder_t));
 
-    if (NULL == svc_grp_builder_impl)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
 
-    svc_grp_builder_impl->svc_grp_builder.ops = NULL;
-    svc_grp_builder_impl->svc_grp = NULL;
-    svc_grp_builder_impl->svc_grp_builder.desc_builder = NULL;
-
-    svc_grp_builder_impl->svc_grp_builder.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_builder_ops_t));
-    if (NULL == svc_grp_builder_impl->svc_grp_builder.ops)
+    if (NULL == svc_grp_builder)
     {
-        axis2_svc_grp_builder_free(&(svc_grp_builder_impl->svc_grp_builder), env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    svc_grp_builder_impl->svc_grp_builder.ops->free = axis2_svc_grp_builder_free;
-    svc_grp_builder_impl->svc_grp_builder.ops->populate_svc_grp =
-        axis2_svc_grp_builder_populate_svc_grp;
-    svc_grp_builder_impl->svc_grp_builder.ops->process_module_refs =
-        axis2_svc_grp_builder_process_module_refs;
+    svc_grp_builder->svc_grp = NULL;
+    svc_grp_builder->desc_builder = NULL;
 
-    return &(svc_grp_builder_impl->svc_grp_builder);
+    return svc_grp_builder;
 }
 
-axis2_svc_grp_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_grp_builder_t *AXIS2_CALL
 axis2_svc_grp_builder_create_with_svc_and_dep_engine(
     const axis2_env_t *env,
     axiom_node_t *svc_grp,
     axis2_dep_engine_t *dep_engine)
 {
-    axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
+    axis2_svc_grp_builder_t *svc_grp_builder = NULL;
 
-    grp_builder_impl = (axis2_svc_grp_builder_impl_t *)
+    svc_grp_builder = (axis2_svc_grp_builder_t *)
             axis2_svc_grp_builder_create(env);
-    if (!grp_builder_impl)
+    if (!svc_grp_builder)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        grp_builder_impl = NULL;
+        svc_grp_builder = NULL;
     }
-    grp_builder_impl->svc_grp_builder.desc_builder =
+    svc_grp_builder->desc_builder =
         axis2_desc_builder_create_with_dep_engine(env, dep_engine);
-    if (!grp_builder_impl->svc_grp_builder.desc_builder)
+    if (!svc_grp_builder->desc_builder)
     {
-        axis2_svc_grp_builder_free(&(grp_builder_impl->svc_grp_builder), env);
+        axis2_svc_grp_builder_free(svc_grp_builder, env);
         return NULL;
     }
-    grp_builder_impl->svc_grp = svc_grp;
+    svc_grp_builder->svc_grp = svc_grp;
 
-    return &(grp_builder_impl->svc_grp_builder);
+    return svc_grp_builder;
 }
 
-/***************************Function implementation****************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_builder_free(
     axis2_svc_grp_builder_t *svc_grp_builder,
     const axis2_env_t *env)
 {
-    axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    grp_builder_impl = AXIS2_INTF_TO_IMPL(svc_grp_builder);
-
-    if (grp_builder_impl->svc_grp_builder.desc_builder)
+    if (svc_grp_builder->desc_builder)
     {
-        AXIS2_DESC_BUILDER_FREE(grp_builder_impl->svc_grp_builder.desc_builder,
+        AXIS2_DESC_BUILDER_FREE(svc_grp_builder->desc_builder,
                 env);
-        grp_builder_impl->svc_grp_builder.desc_builder = NULL;
     }
-    if (svc_grp_builder->ops)
+    if (svc_grp_builder)
     {
-        AXIS2_FREE(env->allocator, svc_grp_builder->ops);
-        svc_grp_builder->ops = NULL;
-    }
-
-    if (grp_builder_impl)
-    {
-        AXIS2_FREE(env->allocator, grp_builder_impl);
-        grp_builder_impl = NULL;
+        AXIS2_FREE(env->allocator, svc_grp_builder);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_builder_populate_svc_grp(
-    axis2_svc_grp_builder_t *grp_builder,
+    axis2_svc_grp_builder_t *svc_grp_builder,
     const axis2_env_t *env,
     axis2_svc_grp_t *svc_grp)
 {
-    axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
     axiom_children_qname_iterator_t *itr = NULL;
     axiom_children_qname_iterator_t *module_ref_itr = NULL;
     axiom_children_qname_iterator_t *svc_itr = NULL;
@@ -172,14 +110,12 @@
     axis2_status_t status = AXIS2_FAILURE;
     axis2_conf_t *parent = NULL;
 
-    grp_builder_impl = AXIS2_INTF_TO_IMPL(grp_builder);
-
     /* Processing service level paramters */
-    svc_grp_element = AXIOM_NODE_GET_DATA_ELEMENT(grp_builder_impl->svc_grp, env);
+    svc_grp_element = AXIOM_NODE_GET_DATA_ELEMENT(svc_grp_builder->svc_grp, env);
     qparamst = axis2_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
 
     itr = AXIOM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env, qparamst,
-            grp_builder_impl->svc_grp);
+            svc_grp_builder->svc_grp);
     
     if (qparamst)
     {
@@ -188,14 +124,14 @@
     }
 
     parent =  axis2_svc_grp_get_parent(svc_grp, env);
-    status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(grp_builder_impl->svc_grp_builder.
-            desc_builder, env, itr, 
-            axis2_svc_grp_get_param_container(svc_grp, env), parent->param_container);
+    status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(svc_grp_builder->desc_builder, env, itr, 
+            axis2_svc_grp_get_param_container(svc_grp, env), 
+            axis2_conf_get_param_container(parent, env));
 
     /* Processing service modules required to be engaged globally */
     qmodulest = axis2_qname_create(env, AXIS2_MODULEST, NULL, NULL);
     module_ref_itr = AXIOM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env,
-            qmodulest, grp_builder_impl->svc_grp);
+            qmodulest, svc_grp_builder->svc_grp);
 
     if (qmodulest)
     {
@@ -203,11 +139,11 @@
         qmodulest = NULL;
     }
 
-    axis2_svc_grp_builder_process_module_refs(grp_builder, env, module_ref_itr,
+    axis2_svc_grp_builder_process_module_refs(svc_grp_builder, env, module_ref_itr,
             svc_grp);
     qsvc_element = axis2_qname_create(env, AXIS2_SVC_ELEMENT, NULL, NULL);
     svc_itr = AXIOM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env,
-            qsvc_element, grp_builder_impl->svc_grp);
+            qsvc_element, svc_grp_builder->svc_grp);
 
     if (qsvc_element)
     {
@@ -249,8 +185,9 @@
             axis2_array_list_t *deployable_svcs = NULL;
             axis2_svc_builder_t *svc_builder = NULL;
 
-            file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(grp_builder->
-                    desc_builder->engine, env);
+            file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(
+                axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env), 
+                env);
             axis_svc = AXIS2_ARCH_FILE_DATA_GET_SVC(file_data, env, svc_name);
             if (NULL == axis_svc)
             {
@@ -269,7 +206,8 @@
             axis2_array_list_add(deployable_svcs, env, axis_svc);
             AXIS2_SVC_SET_PARENT(axis_svc, env, svc_grp);
             svc_builder = axis2_svc_builder_create_with_dep_engine_and_svc(env,
-                    grp_builder->desc_builder->engine, axis_svc);
+                axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env), 
+                axis_svc);
             status = AXIS2_SVC_BUILDER_POPULATE_SVC(svc_builder, env, svc_node);
             AXIS2_SVC_BUILDER_FREE(svc_builder, env);
 
@@ -278,19 +216,16 @@
     return status;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_builder_process_module_refs(
-    axis2_svc_grp_builder_t *grp_builder,
+    axis2_svc_grp_builder_t *svc_grp_builder,
     const axis2_env_t *env,
     axiom_children_qname_iterator_t *module_refs ,
     axis2_svc_grp_t *svc_grp)
 {
-    axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_refs, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
-    grp_builder_impl = AXIS2_INTF_TO_IMPL(grp_builder);
 
     while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_refs, env))
     {
@@ -314,8 +249,9 @@
 
             ref_name = axiom_attribute_get_value(module_ref_att, env);
             qrefname = axis2_qname_create(env, ref_name, NULL, NULL);
-            module = AXIS2_DEP_ENGINE_GET_MODULE(grp_builder->desc_builder->
-                    engine, env, qrefname);
+            module = AXIS2_DEP_ENGINE_GET_MODULE(
+                axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env), 
+                env, qrefname);
             if (NULL == module)
             {
                 AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
@@ -333,3 +269,11 @@
 
     return AXIS2_SUCCESS;
 }
+
+AXIS2_EXTERN axis2_desc_builder_t *AXIS2_CALL
+axis2_svc_grp_builder_get_desc_builder(const axis2_svc_grp_builder_t *svc_grp_builder,
+    const axis2_env_t *env)
+{
+    return svc_grp_builder->desc_builder;
+}
+

Modified: webservices/axis2/trunk/c/modules/core/deployment/ws_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/ws_info.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/ws_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/ws_info.c Thu Mar 15 06:16:07 2007
@@ -18,232 +18,150 @@
 #include "axis2_ws_info.h"
 #include <string.h>
 
-typedef struct axis2_ws_info_impl
+struct axis2_ws_info
 {
-    axis2_ws_info_t ws_info;
-
     axis2_char_t *file_name;
     long last_modified_date;
     /**
      * To check whether the file is a module or a servise
      */
     int type;
+};
 
-
-}
-axis2_ws_info_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(ws_info) \
-    ((axis2_ws_info_impl_t *) ws_info)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_ws_info_free(
-    axis2_ws_info_t *ws_info,
-    const axis2_env_t *env);
-
-axis2_char_t *AXIS2_CALL
-axis2_ws_info_get_file_name(
-    const axis2_ws_info_t *ws_info,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_ws_info_set_file_name(
-    axis2_ws_info_t *ws_info,
-    const axis2_env_t *env,
-    axis2_char_t *file_name);
-
-long AXIS2_CALL
-axis2_ws_info_get_last_modified_date(
-    const axis2_ws_info_t *ws_info,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_ws_info_set_last_modified_date(
-    axis2_ws_info_t *ws_info,
-    const axis2_env_t *env,
-    long last_modified_date);
-
-int AXIS2_CALL
-axis2_ws_info_get_type(
-    const axis2_ws_info_t *ws_info,
-    const axis2_env_t *env);
-
-/************************** End of function prototypes ************************/
-
-axis2_ws_info_t *AXIS2_CALL
+AXIS2_EXTERN axis2_ws_info_t *AXIS2_CALL
 axis2_ws_info_create_with_file_name_and_last_modified_date(
     const axis2_env_t *env,
     axis2_char_t *file_name,
     long last_modified_date)
 {
-    axis2_ws_info_impl_t *ws_info_impl = NULL;
+    axis2_ws_info_t *ws_info = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
 
-    ws_info_impl = (axis2_ws_info_impl_t *) AXIS2_MALLOC(env->
-            allocator, sizeof(axis2_ws_info_impl_t));
+    ws_info = (axis2_ws_info_t *) AXIS2_MALLOC(env->
+            allocator, sizeof(axis2_ws_info_t));
 
 
-    if (NULL == ws_info_impl)
+    if (NULL == ws_info)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    ws_info_impl->file_name = NULL;
-    ws_info_impl->last_modified_date = 0;
-    ws_info_impl->type = 0;
-    ws_info_impl->ws_info.ops = NULL;
+    ws_info->file_name = NULL;
+    ws_info->last_modified_date = 0;
+    ws_info->type = 0;
 
-    ws_info_impl->file_name = AXIS2_STRDUP(file_name, env);
-    if (!ws_info_impl->file_name)
+    ws_info->file_name = AXIS2_STRDUP(file_name, env);
+    if (!ws_info->file_name)
     {
-        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
+        axis2_ws_info_free(ws_info, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    ws_info_impl->last_modified_date = last_modified_date;
-
-    ws_info_impl->ws_info.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_ws_info_ops_t));
-    if (NULL == ws_info_impl->ws_info.ops)
-    {
-        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
+    ws_info->last_modified_date = last_modified_date;
 
-    ws_info_impl->ws_info.ops->free =  axis2_ws_info_free;
-    ws_info_impl->ws_info.ops->get_file_name = axis2_ws_info_get_file_name;
-    ws_info_impl->ws_info.ops->set_file_name = axis2_ws_info_set_file_name;
-    ws_info_impl->ws_info.ops->get_last_modified_date =
-        axis2_ws_info_get_last_modified_date;
-    ws_info_impl->ws_info.ops->set_last_modified_date =
-        axis2_ws_info_set_last_modified_date;
-    ws_info_impl->ws_info.ops->get_type = axis2_ws_info_get_type;
-
-    return &(ws_info_impl->ws_info);
+    return ws_info;
 }
 
-axis2_ws_info_t *AXIS2_CALL
+AXIS2_EXTERN axis2_ws_info_t *AXIS2_CALL
 axis2_ws_info_create_with_file_name_and_last_modified_date_and_type(
     const axis2_env_t *env,
     axis2_char_t *file_name,
     long last_modified_date,
     int type)
 {
-    axis2_ws_info_impl_t *ws_info_impl = NULL;
+    axis2_ws_info_t *ws_info = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
 
-    ws_info_impl = (axis2_ws_info_impl_t *)
+    ws_info = (axis2_ws_info_t *)
             axis2_ws_info_create_with_file_name_and_last_modified_date(env,
                     file_name, last_modified_date);
-    if (!ws_info_impl)
+    if (!ws_info)
     {
-        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
+        axis2_ws_info_free(ws_info, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    ws_info_impl->type = type;
-    return &(ws_info_impl->ws_info);
+    ws_info->type = type;
+    return ws_info;
 }
 
-/***************************Function implementation****************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_ws_info_free(
     axis2_ws_info_t *ws_info,
     const axis2_env_t *env)
 {
-    axis2_ws_info_impl_t *ws_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    ws_info_impl = AXIS2_INTF_TO_IMPL(ws_info);
-
-    if (ws_info->ops)
-    {
-        AXIS2_FREE(env->allocator, ws_info->ops);
-        ws_info->ops = NULL;
-    }
-
-    if (ws_info_impl->file_name)
+    if (ws_info->file_name)
     {
-        AXIS2_FREE(env->allocator, ws_info_impl->file_name);
-        ws_info_impl->file_name = NULL;
+        AXIS2_FREE(env->allocator, ws_info->file_name);
     }
 
-    if (ws_info_impl)
+    if (ws_info)
     {
-        AXIS2_FREE(env->allocator, ws_info_impl);
-        ws_info_impl = NULL;
+        AXIS2_FREE(env->allocator, ws_info);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axis2_ws_info_get_file_name(
     const axis2_ws_info_t *ws_info,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(ws_info)->file_name;
+    return ws_info->file_name;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_ws_info_set_file_name(
     axis2_ws_info_t *ws_info,
     const axis2_env_t *env,
     axis2_char_t *file_name)
 {
-    axis2_ws_info_impl_t *ws_info_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file_name, AXIS2_FAILURE);
 
-    ws_info_impl = AXIS2_INTF_TO_IMPL(ws_info);
-    if (ws_info_impl->file_name)
+    if (ws_info->file_name)
     {
-        AXIS2_FREE(env->allocator, ws_info_impl->file_name);
-        ws_info_impl->file_name = NULL;
+        AXIS2_FREE(env->allocator, ws_info->file_name);
+        ws_info->file_name = NULL;
     }
-    ws_info_impl->file_name = file_name;
+    ws_info->file_name = file_name;
     return AXIS2_SUCCESS;
 }
 
-long AXIS2_CALL
+AXIS2_EXTERN long AXIS2_CALL
 axis2_ws_info_get_last_modified_date(
     const axis2_ws_info_t *ws_info,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    return AXIS2_INTF_TO_IMPL(ws_info)->last_modified_date;
+    return ws_info->last_modified_date;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_ws_info_set_last_modified_date(
     axis2_ws_info_t *ws_info,
     const axis2_env_t *env,
     long last_modified_date)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(ws_info)->last_modified_date = last_modified_date;
+    ws_info->last_modified_date = last_modified_date;
     return AXIS2_SUCCESS;
 }
 
-int AXIS2_CALL
+AXIS2_EXTERN int AXIS2_CALL
 axis2_ws_info_get_type(
     const axis2_ws_info_t *ws_info,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(ws_info)->type;
+    return ws_info->type;
 }



---------------------------------------------------------------------
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