axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r331679 - in /webservices/axis2/trunk/c: include/ modules/core/context/src/ modules/core/description/src/ modules/core/engine/src/
Date Tue, 08 Nov 2005 04:35:19 GMT
Author: damitha
Date: Mon Nov  7 20:34:51 2005
New Revision: 331679

URL: http://svn.apache.org/viewcvs?rev=331679&view=rev
Log:
description context and engine modules are now compiling

Modified:
    webservices/axis2/trunk/c/include/axis2_core.h
    webservices/axis2/trunk/c/include/axis2_engine_config.h
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/include/axis2_msg_recv.h
    webservices/axis2/trunk/c/include/axis2_operation.h
    webservices/axis2/trunk/c/include/axis2_param.h
    webservices/axis2/trunk/c/include/axis2_param_container.h
    webservices/axis2/trunk/c/include/axis2_svc.h
    webservices/axis2/trunk/c/include/axis2_svc_grp.h
    webservices/axis2/trunk/c/modules/core/context/src/Makefile.am
    webservices/axis2/trunk/c/modules/core/context/src/Makefile.in
    webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/description/src/module.c
    webservices/axis2/trunk/c/modules/core/description/src/operation.c
    webservices/axis2/trunk/c/modules/core/description/src/svc.c
    webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c
    webservices/axis2/trunk/c/modules/core/engine/src/Makefile.am
    webservices/axis2/trunk/c/modules/core/engine/src/Makefile.in
    webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c
    webservices/axis2/trunk/c/modules/core/engine/src/msg_recv.c

Modified: webservices/axis2/trunk/c/include/axis2_core.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_core.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_core.h (original)
+++ webservices/axis2/trunk/c/include/axis2_core.h Mon Nov  7 20:34:51 2005
@@ -61,27 +61,6 @@
 /************************ End of message exchange patters *********************/	
 	
 #define SERVICE_NAME_SPLIT_CHAR ":"
-
-/** @cond */
-struct axis2_context_msg_ctx_s;
-struct axis2_context_msg_ctx_ops_s;
-/** @endcond */
-typedef struct axis2_context_msg_ctx_s axis2_context_msg_ctx_t;
-typedef struct axis2_context_msg_ctx_ops_s axis2_context_msg_ctx_ops_t;
-	
-/** @cond */
-struct axis2_engine_msg_recv_s;
-struct axis2_engine_msg_recv_ops_s;
-/** @endcond */
-typedef struct axis2_engine_msg_recv_s axis2_msg_recv_t;
-typedef struct axis2_engine_msg_recv_ops_s axis2_engine_msg_recv_ops_t;
-	
-/** @cond */
-struct axis2_engine_config_s;
-struct axis2_engine_config_ops_s;
-/** @endcond */
-typedef struct axis2_engine_config_s axis2_engine_config_t;
-typedef struct axis2_engine_config_ops_s axis2_engine_config_ops_t;
 	
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/include/axis2_engine_config.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_engine_config.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_engine_config.h (original)
+++ webservices/axis2/trunk/c/include/axis2_engine_config.h Mon Nov  7 20:34:51 2005
@@ -14,128 +14,109 @@
  * limitations under the License.
  */
  
-#ifndef AXIS2_ENGINE_CONFIG_H
-#define AXIS2_ENGINE_CONFIG_H
+#ifndef AXIS2_CONFIG_H
+#define AXIS2_CONFIG_H
 
 /**
-  * @file axis2_engine_config.h
-  * @brief Global states of all the Axis can
-  *        can be accessed here
-  */
+ * @file axis2_config.h
+ * @brief axis2 engine configuration interface. Global states of all the Axis2
+ *        can be accessed here
+ */
 
 #include <axis2_core.h>
 #include <axis2_param_container.h>
-#include <axis2_description_servicegroup.h>
+#include <axis2_svc_grp.h>
 
 #ifdef __cplusplus
 extern "C" 
 {
 #endif
-/** @defgroup axis2_context CONTEXT (Axis2 Information model)
-  * @ingroup axis2
+/** @defgroup axis2_config Axis Configuration
+  * @ingroup axis2_core_engine
   * @{
   */
 
-/** @} */ 
-
-/**
- * @defgroup axis2_engine_ ENGINE engine_config
- * @ingroup axis2_engine_config 
- * @{
+typedef struct axis2_engine_config_ops_s axis2_engine_config_ops_t;
+typedef struct axis2_engine_config_s axis2_engine_config_t;
+    
+struct axis2_svc_grp_s;
+struct axis2_svc_s;
+struct axis2_operation_s;    
+    
+/** 
+ * @brief Engine Configuration operations struct
+ * Encapsulator struct for operations of axis2_config
  */
+struct axis2_engine_config_ops_s
+{
+	axis2_status_t (AXIS2_CALL *free) (axis2_engine_config_t *engine_config, 
+                                        axis2_env_t **env);
+    
+	axis2_status_t (AXIS2_CALL *add_svc_grp) (axis2_engine_config_t *engine_config, 
+                                                axis2_env_t **env, 
+                                                struct axis2_svc_grp_s *svc_grp);
+    
+	struct axis2_svc_grp_s *(AXIS2_CALL *get_svc_grp) (
+                                            axis2_engine_config_t *engine_config, 
+                                            axis2_env_t **env, 
+                                            const axis2_char_t *svc_grp_name);
+    
+	axis2_status_t (AXIS2_CALL *add_svc) (axis2_engine_config_t *engine_config, 
+                                            axis2_env_t **env, 
+                                            struct axis2_svc_s* svc);
+    
+	struct axis2_svc_s *(AXIS2_CALL *get_svc) (axis2_engine_config_t *engine_config, 
+                                        axis2_env_t **env, 
+                                        const axis2_char_t* svc_name);
+    
+	axis2_status_t (AXIS2_CALL *remove_svc) (axis2_engine_config_t *engine_config, 
+                                                axis2_env_t **env, 
+                                                const axis2_char_t *name);
+};
 
-/************************* Start of function macros	***************************/
-	
-#define axis2_engine_config_free(engine_config, env) \
-		(engine_config->free(engine_config, env);
-	
-#define axis2_engine_config_add_service_group(engine_config, env, \
-		service_group_desc) (axis2_engine_config_get_ops(engine_config, \
-		, env)->add_service_group (engine_config, env, service_group_desc));
-
-#define axis2_engine_config_get_service_group(engine_config, env, \
-		servicegroup_name) (axis2_engine_config_get_ops(engine_config \
-		, env)->get_service_group (engine_config, env, servicegroup_name));
-
-#define axis2_engine_config_add_service(engine_config, env, service_desc) \
-		(axis2_engine_config_get_ops(engine_config, env)->get_service \
-		(engine_config, env, service_desc));
-		
-#define axis2_engine_config_get_service(engine_config, env, service_name) \
-		(axis2_engine_config_get_ops(engine_config, env)->get_service \
-		(engine_config, env, service_name));
-
-#define axis2_engine_config_remove_service(engine_config, env, service_name) \
-		(axis2_engine_config_get_ops(engine_config, env)->remove_service \
-		(engine_config, env, service_name));
-		
-/************************* End of function macros *****************************/
-/************************* Start of function pointers *************************/
-
-typedef axis2_status_t (*axis2_engine_config_free_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env);
-		
-typedef axis2_status_t (*axis2_engine_config_add_service_group_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-    	, axis2_svc_grp_t *service_group_desc);
-		
-typedef axis2_svc_grp_t *(*axis2_engine_config_get_service_group_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *servicegroup_name);
-
-typedef axis2_status_t (*axis2_engine_config_add_service_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, axis2_svc_t* service_desc);
-		
-typedef axis2_svc_t *(*axis2_engine_config_get_service_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t* service_name);
-
-typedef axis2_status_t (*axis2_engine_config_remove_service_t)
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *name);	
-		
-/************************* End of function pointers ***************************/
-	
 /**
+ * @brief Engine configuration struct
+ * Axis2 Engine Configuration
  * The palce where all the global states of Axis is accessed.
  * All the global states kept in the <code>EngineRegistry</code> and all the
  * Service states kept in the <code>MessageContext</code>. Other runtime
  * artifacts does not keep states forward from the execution.
  */
-
-/**
-  * @struct axis2_engine_config_ops
-  * @brief ENGINE engine_config operations
-  * This holds the operations of the engine axis2_engine_config.
-  */
-struct axis2_engine_config_ops_s
-{
-	axis2_engine_config_free_t free;
-	axis2_engine_config_add_service_group_t add_service_group;
-	axis2_engine_config_get_service_group_t get_service_group;
-	axis2_engine_config_add_service_t add_service;
-	axis2_engine_config_get_service_t get_service;
-	axis2_engine_config_remove_service_t remove_service;
-};
-
-/**
-  * @struct axis2_engine_config
-  * @brief ENGINE engine_config
-  * This holds operations of the engine struct.
-  */
 struct axis2_engine_config_s
 {
 	axis2_engine_config_ops_t *ops;
 };
 
-/** create axis_engine_config struct
- * @return axis_engine_config struct
+/** create Engine configuration struct
+ * @return pointer to newly created engine configuration
  */
-axis2_engine_config_t *axis2_engine_config_create(axis2_env_t **env);
+axis2_engine_config_t * AXIS2_CALL 
+axis2_engine_config_create(axis2_env_t **env);
+
+/************************* Start of function macros	***************************/
+	
+#define AXIS2_ENGINE_CONFIG_free(engine_config, env) \
+		(engine_config->free(engine_config, env);
+	
+#define AXIS2_ENGINE_CONFIG_add_svc_grp(engine_config, env, svc_grp) \
+        (engine_config->ops->add_svc_grp (engine_config, env, svc_grp));
+
+#define AXIS2_ENGINE_CONFIG_GET_SVC_GRP(engine_config, env, svc_grp_name) \
+        (engine_config->ops->get_svc_grp (engine_config, env, svc_grp_name));
+
+#define AXIS2_ENGINE_CONFIG_ADD_SVC(engine_config, env, svc) \
+		(engine_config->ops->get_svc (engine_config, env, svc));
+		
+#define AXIS2_ENGINE_CONFIG_GET_SVC(engine_config, env, svc_name) \
+		(engine_config->ops->get_svc (engine_config, env, svc_name));
+
+#define AXIS2_ENGINE_CONFIG_REMOVE_SVC(engine_config, env, svc_name) \
+		(engine_config->ops->remove_svc (engine_config, env, svc_name));
+
+/************************* End of function macros *****************************/
 
 /** @} */
 #ifdef __cplusplus
 }
 #endif
-#endif /* AXIS2_ENGINE_CONFIG_H */
+#endif /* AXIS2_CONFIG_H */

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Mon Nov  7 20:34:51 2005
@@ -153,10 +153,16 @@
 		AXIS2_ERROR_ENVIRONMENT_IS_NULL,
         /** Parent requested, but parent is null */
         AXIS2_ERROR_INVALID_STATE_PARENT_NULL,
-        /** Parameter container not set */
-        AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER_NOT_SET,
         /** Parameter locked, Cannot override */
-        AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE
+        AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE,
+        /** Parameter container not set */
+        AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER,
+        /** Operation accessed has invalid state */
+        AXIS2_ERROR_INVALID_STATE_OPERATION,
+        /** Service accessed has invalid state */
+        AXIS2_ERROR_INVALID_STATE_SVC,
+        /** Service group accessed has invalid state */
+        AXIS2_ERROR_INVALID_STATE_SVC_GRP
     };
 
 /** @} */

Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Mon Nov  7 20:34:51 2005
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#ifndef AXIS2_ENGINE_MSG_CONTEXT_H
-#define AXIS2_ENGINE_MSG_CONTEXT_H
+#ifndef AXIS2_MSG_CTX_H
+#define AXIS2_MSG_CTX_H
 
 
 /**
-  * @file axis2_context_messsage.h
-  * @brief axis2 ENGINE CORE msg_context
+  * @file axis2_msg_ctx.h
+  * @brief axis2 Message Context interface
   */
 
 #include <axis2_core.h>
@@ -30,48 +30,49 @@
 {
 #endif
 
-/** @defgroup axis2_context ENGINE (Axis2 Information model)
-  * @ingroup axis2
-  * @{
-  */
-
-/** @} */
-
-/**
- * @defgroup axis2_context_msg_context ENGINE Msg_context
- * @ingroup axis2_context 
+/** @defgroup axis2_msg_ctx Message Context 
+ * @ingroup axis2_core_context
  * @{
  */
+    
+typedef struct axis2_msg_ctx_ops_s axis2_msg_ctx_ops_t;
+typedef struct axis2_msg_ctx_s axis2_msg_ctx_t;    
+    
+/** 
+ * @brief Message Context operations struct
+ * Encapsulator struct for operations of axis2_msg_ctx
+ */  
+struct axis2_msg_ctx_ops_s
+{
+    /** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *free)(axis2_msg_ctx_t *msg_ctx,
+                                        axis2_env_t **env); 
+};
+
+/** 
+ * @brief Message Context struct
+  *	Axis2 Message Context
+ */
+struct axis2_msg_ctx_s
+{
+    axis2_msg_ctx_ops_t *ops;    
+};
 
+AXIS2_DECLARE(axis2_msg_ctx_t *)
+axis2_msg_ctx_create (axis2_env_t **env);
+    
 /************************** Start of function macros **************************/
 
-#define axis2_context_msg_ctx_free(env, msg_ctx) \
-		(axis2_context_msg_ctx_get_ops(env, \
-		msg_ctx)->free (env, msg_ctx));
-
-/************************** End of function macros ****************************/
-
-/************************** Start of function pointers ************************/
-
-    typedef axis2_status_t (*axis2_context_msg_ctx_free_t)
-        (axis2_env_t * env, axis2_context_msg_ctx_t * msg_ctx);
-
-/**************************** End of function pointers ************************/
-
-    struct axis2_context_msg_ctx_ops_s
-    {
-        axis2_context_msg_ctx_free_t free;
-    };
-
-    axis2_context_msg_ctx_t *axis2_context_msg_ctx_get_ops
-        (axis2_env_t * env, axis2_context_msg_ctx_t * msg_ctx);
+#define AXIS2_MSG_CTX_FREE(env, msg_ctx) (msg_ctx->ops->free (env, msg_ctx));
 
-      axis2_context_msg_ctx_t
-        * axis2_context_msg_ctx_create (axis2_env_t * env);
+/************************** End of function macros ****************************/    
 
 /** @} */
 #ifdef __cplusplus
 }
 #endif
 
-#endif                          /* AXIS2_ENGINE_MSG_CONTEXT_H */
+#endif                          /* AXIS2_MSG_CTX_H */

Modified: webservices/axis2/trunk/c/include/axis2_msg_recv.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_recv.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_recv.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_recv.h Mon Nov  7 20:34:51 2005
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#ifndef AXIS2_ENGINE_MSG_RECEIVER_H
-#define AXIS2_ENGINE_MSG_RECEIVER_H
+#ifndef AXIS2_MSG_RECV_H
+#define AXIS2_MSG_RECV_H
 
 
 /**
   * @file axis2_msg_recv.h
-  * @brief axis2 ENGINE CORE msg_recv
+  * @brief axis Message Receiver interface
   */
 
 #include <axis2_core.h>
@@ -30,61 +30,57 @@
 {
 #endif
 
-/** @defgroup axis2_engine ENGINE (Axis2 Information model)
-  * @ingroup axis2
+/** @defgroup axis2_msg_recv Message Receiver
+  * @ingroup axis2_core_engine
   * @{
   */
 
-/** @} */
-
-/**
- * @defgroup axis2_engine_msg_recv ENGINE Msg_receiver
- * @ingroup axis2_engine 
- * @{
+struct axis2_msg_ctx_s;
+typedef struct axis2_msg_recv_s axis2_msg_recv_t;
+typedef struct axis2_msg_recv_ops_s axis2_msg_recv_ops_t;
+
+/** 
+ * @brief Message Receiver operations struct
+ * Encapsulator struct for operations of axis2_msg_recv
+ */     
+struct axis2_msg_recv_ops_s
+{
+    /** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *free) (axis2_msg_recv_t *msg_recv,
+                                        axis2_env_t **env);
+
+    axis2_status_t (AXIS2_CALL *receive) (axis2_msg_recv_t *msg_recv,
+                                            axis2_env_t **env,
+                                            struct axis2_msg_ctx_s *msg_ctx);
+};
+
+/** 
+ * @brief Message Receiver struct
+  *	Axis2 Message Receiver
  */
+struct axis2_msg_recv_s
+{
+    axis2_msg_recv_ops_t *ops;    
+};
 
-/************************** Start of function macros **************************/
-
-#define axis2_engine_msg_recv_free(env, msg_recv) \
-		(axis2_engine_msg_recv_get_ops(env, \
-		msg_recv)->free (env, msg_recv));
-
-#define axis2_engine_msg_recv_receive(env, msg_recv, msg_ctx) \
-		(axis2_engine_msg_recv_get_ops(env, \
-		msg_recv)->receive (env, msg_recv, msg_ctx));
-
-/************************** End of function macros ****************************/
-
-/************************** Start of function pointers ************************/
-
-    typedef axis2_status_t (*axis2_engine_msg_recv_free_t)
-        (axis2_env_t * env,
-         axis2_msg_recv_t * msg_recv);
-
-    typedef axis2_status_t (*axis2_engine_msg_recv_receive_t)
-        (axis2_env_t * env,
-         axis2_msg_recv_t * msg_recv,
-         axis2_context_msg_ctx_t * msg_ctx);
-
-/**************************** End of function pointers ************************/
-
-    struct axis2_engine_msg_recv_ops_s
-    {
-        axis2_engine_msg_recv_free_t free;
+AXIS2_DECLARE(axis2_msg_recv_t *)
+axis2_msg_recv_create (axis2_env_t **env);
 
-        axis2_engine_msg_recv_receive_t receive;
-    };
+/************************** Start of function macros **************************/
 
-    axis2_msg_recv_t *axis2_engine_msg_recv_get_ops
-        (axis2_env_t * env,
-         axis2_msg_recv_t * msg_recv);
+#define AXIS2_MSG_RECV_FREE(msg_recv, env) (msg_recv->ops->free (msg_recv, env));
 
-      axis2_msg_recv_t
-        * axis2_engine_msg_recv_create (axis2_env_t * env);
+#define AXIS2_MSG_RECV_RECEIVE(msg_recv, env, msg_ctx) \
+		(msg_recv->ops->receive (msg_recv, env, msg_ctx));
 
+/************************** End of function macros ****************************/
+    
 /** @} */
 #ifdef __cplusplus
 }
 #endif
 
-#endif                          /* AXIS2_ENGINE_MSG_RECEIVER_H */
+#endif                          /* AXIS2_MSG_RECV_H */

Modified: webservices/axis2/trunk/c/include/axis2_operation.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_operation.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_operation.h (original)
+++ webservices/axis2/trunk/c/include/axis2_operation.h Mon Nov  7 20:34:51 2005
@@ -39,6 +39,7 @@
 
 struct axis2_svc_s;
 struct axis2_msg_recv_s;
+typedef struct axis2_operation_ops_s axis2_operation_ops_t;    
 typedef struct axis2_operation_s axis2_operation_t;    
     
 /** 
@@ -75,13 +76,15 @@
 	axis2_hash_t *(AXIS2_CALL *get_params) (axis2_operation_t *operation, 
                                                 axis2_env_t **env);
 
-    //to check whether a given paramter is locked
+    /**
+     * To check whether a given paramter is locked
+     */
 	axis2_bool_t (AXIS2_CALL *is_param_locked) (axis2_operation_t *operation, 
                                                 axis2_env_t **env,
 		                                        const axis2_char_t *param_name);
 	
 	axis2_status_t (AXIS2_CALL *set_parent) (axis2_operation_t *operation, 
-                                     *axis2_env_t **env,
+                                     axis2_env_t **env,
                                      struct axis2_svc_s *service_desc);
 
 	struct axis2_svc_s *(AXIS2_CALL *get_parent) (axis2_operation_t *operation, 

Modified: webservices/axis2/trunk/c/include/axis2_param.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_param.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_param.h (original)
+++ webservices/axis2/trunk/c/include/axis2_param.h Mon Nov  7 20:34:51 2005
@@ -50,8 +50,7 @@
  * Field DOM_PARAM
  */
   static const int AXIS2_DOM_PARAM = 1;
-    
-
+       
 /**
  *   \brief param operations struct
  */

Modified: webservices/axis2/trunk/c/include/axis2_param_container.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_param_container.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_param_container.h (original)
+++ webservices/axis2/trunk/c/include/axis2_param_container.h Mon Nov  7 20:34:51 2005
@@ -47,7 +47,6 @@
  * @{
  */
 
-
 /** 
  * @brief Param Container operations struct
  * Encapsulator struct for operations of axis2_param_container

Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Mon Nov  7 20:34:51 2005
@@ -39,6 +39,8 @@
   */
 
 struct axis2_svc_grp_s;
+struct axis2_operation_s;    
+typedef struct axis2_svc_ops_s axis2_svc_ops_t;   
 typedef struct axis2_svc_s axis2_svc_t;
     
 /** 
@@ -51,14 +53,14 @@
 
 	axis2_status_t (AXIS2_CALL *add_operation) (axis2_svc_t *svc, 
                                                 axis2_env_t **env,
-	 	                                        axis2_operation_t *operation);
+	 	                                        struct axis2_operation_s *operation);
 
-	axis2_operation_t *(AXIS2_CALL *get_operation_with_qname) (
+	struct axis2_operation_s *(AXIS2_CALL *get_operation_with_qname) (
                                                   axis2_svc_t *svc, 
                                                   axis2_env_t **env,
 	 	                                          axis2_qname_t *operation_name);
 
-	axis2_operation_t *(AXIS2_CALL *get_operation_with_name) (
+	struct axis2_operation_s *(AXIS2_CALL *get_operation_with_name) (
                                             axis2_svc_t *svc, 
                                             axis2_env_t **env,
 	 	                                    const axis2_char_t * operation_name);
@@ -121,7 +123,7 @@
 
 /**************************** Start of function macros ************************/
 
-#define AXIS2_SVC_FREE(svc, env) (AXIS2_SVC_get_ops(svc, env)->free (svc, env));
+#define AXIS2_SVC_FREE(svc, env) (svc->ops->free (svc, env));
 
 #define AXIS2_SVC_ADD_OPERATION(svc, env, operation) \
 		(svc->ops->add_operation (svc, env, operation));

Modified: webservices/axis2/trunk/c/include/axis2_svc_grp.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc_grp.h?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_grp.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_grp.h Mon Nov  7 20:34:51 2005
@@ -19,7 +19,7 @@
 
 /**
  * @file axis2_svc_grp.h
- * @brief axis2 service group interface
+ * @brief axis2 Service Group interface
  */
 
 #include <axis2_core.h>
@@ -32,11 +32,12 @@
 #endif
 
 /** @defgroup axis2_svc_grp Service group description
-  * @ingroup axis2_description
+  * @ingroup axis2_core_description
   * @{
   */
 
 struct axis2_svc_s;
+typedef struct axis2_svc_grp_ops_s axis2_svc_grp_ops_t;    
 typedef struct axis2_svc_grp_s axis2_svc_grp_t;
     
 /** 
@@ -81,8 +82,8 @@
      * @return service description
      */
 	struct axis2_svc_s *(AXIS2_CALL *get_svc) (axis2_svc_grp_t *svc_grp, 
-                                        axis2_env_t **env,
-		,                               const axis2_qname_t* svc_name);
+                                                axis2_env_t **env,
+	                                            const axis2_qname_t *svc_name);
         
 	axis2_status_t (AXIS2_CALL *remove_svc) (axis2_svc_grp_t *svc_grp, 
                                              axis2_env_t **env,
@@ -97,7 +98,7 @@
                                                 const axis2_char_t *name);
         
 	axis2_hash_t *(AXIS2_CALL *get_params) (axis2_svc_grp_t *svc_grp, 
-                                                axis2_env_t *env);
+                                                axis2_env_t **env);
     
 	axis2_bool_t (AXIS2_CALL *is_param_locked) (axis2_svc_grp_t *svc_grp, 
                                                 axis2_env_t **env, 

Modified: webservices/axis2/trunk/c/modules/core/context/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/src/Makefile.am?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/context/src/Makefile.am Mon Nov  7 20:34:51 2005
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libaxis2_context.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_context_la_SOURCES = ctx_msg.c
+libaxis2_context_la_SOURCES = msg_ctx.c
 
 libaxis2_context_la_LIBADD = $(LDFLAGS)
 INCLUDES = -I${CUTEST_HOME}/include \

Modified: webservices/axis2/trunk/c/modules/core/context/src/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/src/Makefile.in?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/src/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/core/context/src/Makefile.in Mon Nov  7 20:34:51 2005
@@ -63,7 +63,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libaxis2_context_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libaxis2_context_la_OBJECTS = ctx_msg.lo
+am_libaxis2_context_la_OBJECTS = msg_ctx.lo
 libaxis2_context_la_OBJECTS = $(am_libaxis2_context_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
@@ -191,7 +191,7 @@
 target_vendor = @target_vendor@
 lib_LTLIBRARIES = libaxis2_context.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_context_la_SOURCES = ctx_msg.c
+libaxis2_context_la_SOURCES = msg_ctx.c
 libaxis2_context_la_LIBADD = $(LDFLAGS)
 INCLUDES = -I${CUTEST_HOME}/include \
             -I$(top_builddir)/modules/xml/guththila/src \
@@ -267,7 +267,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctx_msg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_ctx.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Modified: webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c Mon Nov  7 20:34:51 2005
@@ -16,7 +16,7 @@
  
 #include <axis2_msg_ctx.h>
 
-typedef axis2_msg_ctx_impl_s axis2_msg_ctx_impl_t;
+typedef struct axis2_msg_ctx_impl_s axis2_msg_ctx_impl_t;
 
 /** 
  * @brief Message Context struct impl
@@ -27,7 +27,7 @@
 	axis2_msg_ctx_t msg_ctx;
 };
 
-#define AXIS2_INTF_TO_IMPL(msg_ctx) ((axis2_msg_ctx_impl_t *)msg_ctx)
+#define AXIS2_INTF_TO_IMPL(msg_ctx) ((axis2_msg_ctx_impl_t *) msg_ctx)
 
 /*************************** Function headers *********************************/
 
@@ -43,24 +43,22 @@
 axis2_msg_ctx_create (axis2_env_t **env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    
-	axis2_context_msg_ctx_ops_t *ops = NULL;
-    
+ 
 	axis2_msg_ctx_impl_t *msg_ctx_impl = (axis2_msg_ctx_impl_t *) AXIS2_MALLOC (
-        env->allocator, sizeof (axis2_msg_ctx_impl_t));
+        (*env)->allocator, sizeof (axis2_msg_ctx_impl_t));
     
 	if(NULL == msg_ctx_impl)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	
-	msg_ctx_impl->msg_ctx.ops = (axis2_msg_ctx_ops_t *) AXIS2_MALLOC(env->allocator,
+	msg_ctx_impl->msg_ctx.ops = (axis2_msg_ctx_ops_t *) AXIS2_MALLOC((*env)->allocator,
 		sizeof(axis2_msg_ctx_ops_t));
 	if(NULL == msg_ctx_impl->msg_ctx.ops)
 	{
-        AXIS2_FREE((*env)->allocato, msg_ctx_impl);
+        AXIS2_FREE((*env)->allocator, msg_ctx_impl);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
 	
-	msg_ctx_impl->msg_ctx.ops->free = axis2_msg_ctx_free;
+	(msg_ctx_impl->msg_ctx.ops)->free = axis2_msg_ctx_free;
 						
 	return &(msg_ctx_impl->msg_ctx);
 }
@@ -75,7 +73,7 @@
     if(NULL == msg_ctx->ops)
         AXIS2_FREE((*env)->allocator, msg_ctx->ops);
     
-    AXIS2_FREE((env*)->allocator, AXIS2_INTF_TO_IMPL(msg_ctx));
+    AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(msg_ctx));
     
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/description/src/module.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/module.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/module.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/module.c Mon Nov  7 20:34:51 2005
@@ -14,4 +14,3 @@
  * limitations under the License.
  */
  
-#include <axis2_description_module.h>

Modified: webservices/axis2/trunk/c/modules/core/description/src/operation.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/operation.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/operation.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/operation.c Mon Nov  7 20:34:51 2005
@@ -24,7 +24,7 @@
 {
 	axis2_operation_t operation;
 	axis2_param_container_t *param_container;
-	axis2_svc_t *parent;
+	struct axis2_svc_s *parent;
 	axis2_qname_t *qname;
 	axis2_msg_recv_t *msg_recv;
 	axis2_char_t* msg_exchange_pattern;
@@ -82,9 +82,9 @@
 axis2_status_t AXIS2_CALL
 axis2_operation_set_msg_recv (axis2_operation_t *operation, 
                                 axis2_env_t **env,
-                                axis2_engine_msg_recv_t *msg_recv);
+                                axis2_msg_recv_t *msg_recv);
 
-axis2_engine_msg_recv_t * AXIS2_CALL
+axis2_msg_recv_t * AXIS2_CALL
 axis2_operation_get_msg_recv (axis2_operation_t *operation, 
                                 axis2_env_t **env);
 		
@@ -103,24 +103,25 @@
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
 	
-	operation_impl->ops->free = axis2_operation_free;
-	operation_impl->ops->add_param = axis2_operation_add_param;
-	operation_impl->ops->get_param = axis2_operation_get_param;
-	operation_impl->ops->get_params = axis2_operation_get_params;
-	operation_impl->ops->set_parent = axis2_operation_set_parent;
-	operation_impl->ops->get_parent = axis2_operation_get_parent;
-	operation_impl->ops->get_name = axis2_operation_get_name;
-	operation_impl->ops->set_msg_exchange_pattern 
+	operation_impl->operation.ops->free = axis2_operation_free;
+	operation_impl->operation.ops->add_param = axis2_operation_add_param;
+	operation_impl->operation.ops->get_param = axis2_operation_get_param;
+	operation_impl->operation.ops->get_params = axis2_operation_get_params;
+	operation_impl->operation.ops->set_parent = axis2_operation_set_parent;
+	operation_impl->operation.ops->get_parent = axis2_operation_get_parent;
+	operation_impl->operation.ops->get_name = axis2_operation_get_name;
+	operation_impl->operation.ops->set_msg_exchange_pattern 
 		= axis2_operation_set_msg_exchange_pattern;
-	operation_impl->ops->get_msg_exchange_pattern
+	operation_impl->operation.ops->get_msg_exchange_pattern
 		= axis2_operation_get_msg_exchange_pattern;
-	operation_impl->ops->set_msg_recv = axis2_operation_set_msg_recv;
-	operation_impl->ops->get_msg_recv = axis2_operation_get_msg_recv;
+	operation_impl->operation.ops->set_msg_recv = axis2_operation_set_msg_recv;
+	operation_impl->operation.ops->get_msg_recv = axis2_operation_get_msg_recv;
 	
 	axis2_param_container_t *param_container = (axis2_param_container_t *)
 		axis2_param_container_create(env);		
 	if(NULL == param_container)
 	{
+        AXIS2_FREE((*env)->allocator, operation_impl);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
 
@@ -257,7 +258,7 @@
 		                        axis2_svc_t *svc)
 {
     AXIS2_FUNC_PARAM_CHECK(operation, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, msg_recv, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(operation)->parent = svc;
 	return AXIS2_SUCCESS;
 }
@@ -276,7 +277,7 @@
 {
     AXIS2_FUNC_PARAM_CHECK(operation, env, NULL);
 	
-    return AXIS2_INTF_TO_IMPL(operation)->name;
+    return AXIS2_INTF_TO_IMPL(operation)->qname;
 }
 
 axis2_status_t AXIS2_CALL 
@@ -303,7 +304,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_operation_set_msg_recv (axis2_operation_t *operation, 
                                 axis2_env_t **env,
-		                        axis2_engine_msg_recv_t *msg_recv)
+		                        axis2_msg_recv_t *msg_recv)
 {
     AXIS2_FUNC_PARAM_CHECK(operation, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, msg_recv, AXIS2_FAILURE);
@@ -312,7 +313,7 @@
 	return AXIS2_SUCCESS;
 }
 
-axis2_engine_msg_recv_t * AXIS2_CALL
+axis2_msg_recv_t * AXIS2_CALL
 axis2_operation_get_msg_recv (axis2_operation_t *operation, 
                                 axis2_env_t **env)
 {

Modified: webservices/axis2/trunk/c/modules/core/description/src/svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/svc.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/svc.c Mon Nov  7 20:34:51 2005
@@ -12,11 +12,11 @@
 	axis2_param_container_t *param_container;
 	axis2_svc_grp_t *parent;
 	axis2_hash_t *wasaction_opeartionmap;
-	axis2_qname_t *name;    
+	axis2_qname_t *qname;    
 
 };
 
-#define AXIS2_INTF_TO_IMPL(svc) ((axis2_operation_impl_t *)svc)
+#define AXIS2_INTF_TO_IMPL(svc) ((axis2_svc_impl_t *)svc)
 
 /*************************** Function headers ********************************/
 
@@ -25,13 +25,13 @@
 
 axis2_status_t AXIS2_CALL
 axis2_svc_add_operation (axis2_svc_t *svc, axis2_env_t **env
-		,                   axis2_operation_t *operation);
+		,                   struct axis2_operation_s *operation);
 
-axis2_operation_t * AXIS2_CALL
+struct axis2_operation_s * AXIS2_CALL
 axis2_svc_get_operation_with_qname (axis2_svc_t *svc, axis2_env_t **env,
 		                            axis2_qname_t *operation_name);
 		
-axis2_operation_t * AXIS2_CALL
+struct axis2_operation_s * AXIS2_CALL
 axis2_svc_get_operation_with_name (axis2_svc_t *svc, axis2_env_t **env,
 		                            const axis2_char_t* operation_name);
 
@@ -69,31 +69,32 @@
 {
     AXIS2_ENV_CHECK(env, NULL);
 	axis2_svc_impl_t *svc_impl = (axis2_svc_impl_t *)
-		AXIS2_MALLOC (env->allocator, sizeof(axis2_svc_impl_t));
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_svc_impl_t));
     if(NULL == svc_impl)
 	{
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
 	
-	svc_impl->ops->free = axis2_svc_free;
-	svc_impl->ops->add_operation = axis2_svc_add_operation;
-	svc_impl->ops->get_operation_with_qname = 
+	svc_impl->svc.ops->free = axis2_svc_free;
+	svc_impl->svc.ops->add_operation = axis2_svc_add_operation;
+	svc_impl->svc.ops->get_operation_with_qname = 
 		axis2_svc_get_operation_with_qname;
-	svc_impl->ops->get_operation_with_name = 
+	svc_impl->svc.ops->get_operation_with_name = 
 		axis2_svc_get_operation_with_name;
-	svc_impl->ops->get_operations = axis2_svc_get_operations;
-	svc_impl->ops->set_parent = axis2_svc_set_parent;
-	svc_impl->ops->get_parent = axis2_svc_get_parent;
-	svc_impl->ops->get_name = axis2_svc_get_name;
-	svc_impl->ops->add_param = axis2_svc_add_param;
-	svc_impl->ops->get_param = axis2_svc_get_param;
-	svc_impl->ops->get_params = axis2_svc_get_params;
+	svc_impl->svc.ops->get_operations = axis2_svc_get_operations;
+	svc_impl->svc.ops->set_parent = axis2_svc_set_parent;
+	svc_impl->svc.ops->get_parent = axis2_svc_get_parent;
+	svc_impl->svc.ops->get_name = axis2_svc_get_name;
+	svc_impl->svc.ops->add_param = axis2_svc_add_param;
+	svc_impl->svc.ops->get_param = axis2_svc_get_param;
+	svc_impl->svc.ops->get_params = axis2_svc_get_params;
 	
 	axis2_param_container_t *param_container 
 		= (axis2_param_container_t *)
 		axis2_param_container_create(env);		
 	if(NULL == param_container)
 	{
+        AXIS2_FREE((*env)->allocator, svc_impl);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
 
@@ -104,9 +105,11 @@
 	svc_impl->wasaction_opeartionmap = axis2_hash_make (env);				
 	if(NULL == svc_impl->wasaction_opeartionmap)
 	{
+        AXIS2_FREE((*env)->allocator, svc_impl);
+        AXIS2_FREE((*env)->allocator, svc_impl->param_container);
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
-	svc_impl->name = NULL;
+	svc_impl->qname = NULL;
 
 	return &(svc_impl->svc);	
 }
@@ -115,7 +118,7 @@
 axis2_svc_create_with_qname (axis2_env_t **env, 
                                 axis2_qname_t *qname)
 {
-	axis2_svc_impl_t *svc_impl = axis2_svc_create(env);
+	axis2_svc_impl_t *svc_impl = AXIS2_INTF_TO_IMPL(axis2_svc_create(env));
 	if(NULL == svc_impl)
 	{
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
@@ -123,7 +126,7 @@
     
     AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
     
-	svc_impl->name = qname;
+	svc_impl->qname = qname;
 	
 	return &(svc_impl->svc);
 }
@@ -134,7 +137,7 @@
 axis2_svc_free (axis2_svc_t *svc, 
                 axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAM_CHECK(operation, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
 	if(NULL != svc->ops)
 		AXIS2_FREE((*env)->allocator, svc->ops);
     
@@ -160,7 +163,7 @@
 axis2_status_t AXIS2_CALL
 axis2_svc_add_operation (axis2_svc_t *svc,
                             axis2_env_t **env,
-		                    axis2_operation_t *operation)
+		                    struct axis2_operation_s *operation)
 {
     AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, operation, AXIS2_FALSE);
@@ -174,7 +177,7 @@
 	
 	if(!tempqname) return AXIS2_ERROR_INVALID_NULL_PARAM;
 		
-	axis2_char_t *tempname = tempqname->localpart;
+	axis2_char_t *tempname = AXIS2_QNAME_GET_LOCALPART(tempqname, env);
 	
     if(NULL == tempname)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -186,7 +189,7 @@
 	return AXIS2_SUCCESS;
 }
 
-axis2_operation_t * AXIS2_CALL
+struct axis2_operation_s * AXIS2_CALL
 axis2_svc_get_operation_with_qname (axis2_svc_t *svc,
                                         axis2_env_t **env,
 		                                axis2_qname_t *operation_name)
@@ -198,22 +201,23 @@
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_NULL_PARAM, NULL);	
 	}
     
-	return (axis2_operation_t *) (axis2_hash_get (AXIS2_INTF_TO_IMPL(svc)->
-        wasaction_opeartionmap, operation_name->localpart, AXIS2_HASH_KEY_STRING));
+	return (struct axis2_operation_s *) (axis2_hash_get (AXIS2_INTF_TO_IMPL(svc)->
+        wasaction_opeartionmap, AXIS2_QNAME_GET_LOCALPART(operation_name, env),
+        AXIS2_HASH_KEY_STRING));
 	
 }	
 
-axis2_operation_t * AXIS2_CALL
+struct axis2_operation_s * AXIS2_CALL
 axis2_svc_get_operation_with_name (axis2_svc_t *svc, 
                                     axis2_env_t **env,
 		                            const axis2_char_t* name)
 {
     AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, name, NULL);
-	axis2_char_t temp_name = axis2_strdup(name);
+	axis2_char_t *temp_name = axis2_strdup(name);
     AXIS2_PARAM_CHECK((*env)->error, temp_name, NULL); 
     
-	return (axis2_operation_t *) (axis2_hash_get 
+	return (struct axis2_operation_s *) (axis2_hash_get 
 		(AXIS2_INTF_TO_IMPL(svc)->wasaction_opeartionmap
 		, temp_name, AXIS2_HASH_KEY_STRING));
 }
@@ -256,7 +260,7 @@
                     axis2_env_t **env)
 {
 	AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
-	return AXIS2_INTF_TO_IMPL(svc)->name;
+	return AXIS2_INTF_TO_IMPL(svc)->qname;
 }
 
 axis2_status_t AXIS2_CALL
@@ -270,10 +274,11 @@
 	if(NULL == AXIS2_INTF_TO_IMPL(svc)->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
-            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER_NOT_SET, AXIS2_FAILURE);
+            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
 	}
-	axis2_hash_set (AXIS2_PARAM_CONTAINER_GET_PARAMS(svc->param_container, env),
-        AXIS2_PARAM_GET_NAME(param, env), AXIS2_HASH_KEY_STRING, param);	
+	axis2_hash_set (AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(svc)->
+        param_container, env), AXIS2_PARAM_GET_NAME(param, env), 
+        AXIS2_HASH_KEY_STRING, param);	
 	return AXIS2_SUCCESS;
 }
 
@@ -287,7 +292,7 @@
 	if(NULL == AXIS2_INTF_TO_IMPL(svc)->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
-            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER_NOT_SET, AXIS2_FAILURE);
+            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
 	}
     
 	axis2_char_t *tempname = axis2_strdup(name);
@@ -305,7 +310,7 @@
 axis2_svc_get_params (axis2_svc_t *svc, 
                         axis2_env_t **env)
 {
-	AXIS2_FUNC_PARAM_CHECK(svc, env);
+	AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
 	return AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(svc)->
         param_container, env);
 	
@@ -320,7 +325,7 @@
     if(NULL == AXIS2_INTF_TO_IMPL(svc)->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
-            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER_NOT_SET, AXIS2_FALSE);
+            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FALSE);
 	}
 	
 	axis2_char_t *tempname = axis2_strdup(param_name);

Modified: webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c Mon Nov  7 20:34:51 2005
@@ -16,270 +16,285 @@
  
 #include <axis2_svc_grp.h>
 
-/** @struct axis2_svc_grp_s
-  * @brief DESCRIPTION servicegroup
-  * This holds the information about the servicegroup_name
-  */
-struct axis2_svc_grp_s
+typedef struct axis2_svc_grp_impl_s axis2_svc_grp_impl_t;
+
+/** 
+ * @brief Service group struct impl
+ * Axis2 Service group impl  
+ */  
+struct axis2_svc_grp_impl_s
 {
-	axis2_svc_grp_ops_t *ops;
+	axis2_svc_grp_t svc_grp;
 	axis2_param_container_t *param_container;
-	axis2_char_t *servicegroup_name;
-	axis2_hash_t *services;
+	axis2_char_t *svc_grp_name;
+	axis2_hash_t *svcs;
 	
 };
 
-/***************************** Function headers *******************************/
+#define AXIS2_INTF_TO_IMPL(svc_grp) ((axis2_svc_grp_impl_t *)svc_grp)
 
-axis2_status_t axis2_svc_grp_ops_free
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
+/***************************** Function headers *******************************/
 
-axis2_status_t axis2_svc_grp_ops_set_name
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, axis2_char_t *name);
-
-axis2_char_t *axis2_svc_grp_ops_get_name
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
-
-axis2_status_t axis2_svc_grp_ops_add_service
-		(axis2_svc_grp_t* srvgrp_desc, axis2_env_t *env
-		, axis2_svc_t *service_desc);
-
-axis2_svc_t *axis2_svc_grp_ops_get_service
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_qname_t* service_name);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_free (axis2_svc_grp_t *svc_grp, 
+                    axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_set_name (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                axis2_char_t *name);
+
+axis2_char_t * AXIS2_CALL 
+axis2_svc_grp_get_name (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_add_svc (axis2_svc_grp_t* svc_grp, 
+                        axis2_env_t **env,
+		                axis2_svc_t *svc);
+
+axis2_svc_t * AXIS2_CALL 
+axis2_svc_grp_get_svc (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                const axis2_qname_t* svc_name);
 		
-axis2_status_t axis2_svc_grp_ops_remove_service
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_qname_t* service_name);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_remove_svc (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env,
+		                    const axis2_qname_t* svc_name);
 		
-axis2_status_t axis2_svc_grp_ops_add_param
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, axis2_param_t *param);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_add_param (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env,
+		                    axis2_param_t *param);
 		
 
-axis2_param_t *axis2_svc_grp_ops_get_param(
-		axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_char_t *name);
+axis2_param_t * AXIS2_CALL 
+axis2_svc_grp_get_param(axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                const axis2_char_t *name);
 		
-axis2_hash_t *axis2_svc_grp_ops_get_params
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
+axis2_hash_t * AXIS2_CALL 
+axis2_svc_grp_get_params (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env);
 		
-axis2_bool_t axis2_svc_grp_ops_is_param_locked(
-		axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_char_t *param_name);
+axis2_bool_t AXIS2_CALL 
+axis2_svc_grp_is_param_locked(axis2_svc_grp_t *svc_grp, 
+                                axis2_env_t **env,
+		                        const axis2_char_t *param_name);
 
 /***************************** End of function headers ************************/
 
-axis2_svc_grp_ops_t *axis2_svc_grp_get_ops
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env)
+axis2_svc_grp_t * AXIS2_CALL 
+axis2_svc_grp_create (axis2_env_t **env)
 {
-	if(!env || !srvgrp_desc)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	return srvgrp_desc->ops;
-}
-
-axis2_svc_grp_t *axis2_svc_grp_create
-		(axis2_env_t *env)
-{
-	axis2_svc_grp_t *srvgrp_desc 
-		= (axis2_svc_grp_t *)
-		AXIS2_MALLOC (env->allocator, sizeof(axis2_svc_grp_t));
-	if(!srvgrp_desc)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
-	}
-	axis2_svc_grp_ops_t *ops 
-		= (axis2_svc_grp_ops_t *)
-		AXIS2_MALLOC (env->allocator, sizeof(axis2_svc_grp_ops_t));
-	if(!ops)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;	
-	}
-	ops->free = axis2_svc_grp_ops_free;
-	ops->set_name = axis2_svc_grp_ops_set_name;
-	ops->get_name = axis2_svc_grp_ops_get_name;
-	ops->add_service = axis2_svc_grp_ops_add_service;
-	ops->get_service = axis2_svc_grp_ops_get_service;
-	ops->remove_service = axis2_svc_grp_ops_remove_service;
-	ops->add_param = axis2_svc_grp_ops_add_param;
-	ops->get_param = axis2_svc_grp_ops_get_param;
-	ops->get_params = axis2_svc_grp_ops_get_params;
-	ops->is_param_locked = axis2_svc_grp_ops_is_param_locked;
+    AXIS2_ENV_CHECK(env, NULL);
+	axis2_svc_grp_impl_t *svc_grp_impl = (axis2_svc_grp_impl_t *)
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_svc_grp_impl_t));
+	if(NULL == svc_grp_impl)
+	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	
+	svc_grp_impl->svc_grp.ops->free = axis2_svc_grp_free;
+	svc_grp_impl->svc_grp.ops->set_name = axis2_svc_grp_set_name;
+	svc_grp_impl->svc_grp.ops->get_name = axis2_svc_grp_get_name;
+	svc_grp_impl->svc_grp.ops->add_svc = axis2_svc_grp_add_svc;
+	svc_grp_impl->svc_grp.ops->get_svc = axis2_svc_grp_get_svc;
+	svc_grp_impl->svc_grp.ops->remove_svc = axis2_svc_grp_remove_svc;
+	svc_grp_impl->svc_grp.ops->add_param = axis2_svc_grp_add_param;
+	svc_grp_impl->svc_grp.ops->get_param = axis2_svc_grp_get_param;
+	svc_grp_impl->svc_grp.ops->get_params = axis2_svc_grp_get_params;
+	svc_grp_impl->svc_grp.ops->is_param_locked = axis2_svc_grp_is_param_locked;
 	
-	srvgrp_desc->ops = ops;
 	
-	axis2_param_container_t *param_container 
-		= (axis2_param_container_t *)
+	
+	axis2_param_container_t *param_container = (axis2_param_container_t *)
 		axis2_param_container_create(env);		
-	if(!param_container)
+	if(NULL == param_container)
 	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        AXIS2_FREE((*env)->allocator, svc_grp_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
 
-	srvgrp_desc->param_container = param_container;
+	svc_grp_impl->param_container = param_container;
 	
-	/*srvgrp_desc->parent = NULL;*/
+	/*svc_grp_impl->parent = NULL;*/
 	
-	srvgrp_desc->services = axis2_hash_make (env);				
-	if(!srvgrp_desc->services)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;			
-	}
-	srvgrp_desc->servicegroup_name = NULL;
+	svc_grp_impl->svcs = axis2_hash_make (env);				
+	if(NULL == svc_grp_impl->svcs)
+    {
+        AXIS2_FREE((*env)->allocator, svc_grp_impl);
+        AXIS2_FREE((*env)->allocator, svc_grp_impl->param_container);
+	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+	svc_grp_impl->svc_grp_name = NULL;
 
-	return srvgrp_desc;	
+	return &(svc_grp_impl->svc_grp);	
 }
 
 /******************************************************************************/
 
-axis2_status_t axis2_svc_grp_ops_free
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env)
-{
-	if(!env || !srvgrp_desc)
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	AXIS2_FREE(env->allocator, srvgrp_desc);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_free (axis2_svc_grp_t *svc_grp, 
+                    axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    
+    if(NULL != svc_grp->ops)
+		AXIS2_FREE((*env)->allocator, svc_grp->ops);
+    
+	if(NULL != AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+        AXIS2_PARAM_CONTAINER_FREE(AXIS2_INTF_TO_IMPL(svc_grp)->param_container, 
+            env);
+    
+    if(NULL != AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name)
+        AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name);
+    
+    axis2_hash_free(AXIS2_INTF_TO_IMPL(svc_grp)->svcs, env);
+    
+	AXIS2_FREE((*env)->allocator, svc_grp);
 	return AXIS2_SUCCESS;
 }
 
-axis2_status_t axis2_svc_grp_ops_set_name
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, axis2_char_t *name)
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_set_name (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                axis2_char_t *name)
 {
-	if(!env || !srvgrp_desc)
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+	
 	axis2_char_t *tempname = axis2_strdup(name);
-	if(!tempname) return AXIS2_ERROR_INVALID_NULL_PARAM;
-	srvgrp_desc->servicegroup_name = name;
+    if(NULL == tempname)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+	
+	AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name = name;
+    
 	return AXIS2_SUCCESS;
 }
 
-axis2_char_t *axis2_svc_grp_ops_get_name
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env)
+axis2_char_t * AXIS2_CALL 
+axis2_svc_grp_get_name (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env)
 {
-	if(!env || !srvgrp_desc)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	return srvgrp_desc->servicegroup_name;
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+	
+	return AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name;
 }
 
-axis2_status_t axis2_svc_grp_ops_add_service
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, axis2_svc_t *service_desc)
-{
-	if(!env || srvgrp_desc || service_desc)
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	
-	axis2_qname_t *tempname = axis2_svc_get_name(service_desc, env);
-	axis2_hash_set (srvgrp_desc->services, tempname->localpart
-		, AXIS2_HASH_KEY_STRING, service_desc);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_add_svc (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                axis2_svc_t *svc)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc, AXIS2_FAILURE);
+	
+	axis2_qname_t *tempname = AXIS2_SVC_GET_NAME(svc, env);
+    if(NULL == tempname)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_SVC, 
+        AXIS2_FAILURE);
+    
+	axis2_hash_set (AXIS2_INTF_TO_IMPL(svc_grp)->svcs, 
+        AXIS2_QNAME_GET_LOCALPART(tempname, env), AXIS2_HASH_KEY_STRING, svc);
+    
 	return AXIS2_SUCCESS;
 }
 
-axis2_svc_t *axis2_svc_grp_ops_get_service
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env 
-		, const axis2_qname_t* service_name)
+axis2_svc_t * AXIS2_CALL 
+axis2_svc_grp_get_svc (axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env,
+		                const axis2_qname_t* svc_name)
 {
-	if(!env || !srvgrp_desc || ! service_name)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	return (axis2_svc_t *) (axis2_hash_get 
-		(srvgrp_desc->services, service_name->localpart
-		, AXIS2_HASH_KEY_STRING));
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, svc_name, NULL);
+	
+	return (axis2_svc_t *) (axis2_hash_get (AXIS2_INTF_TO_IMPL(svc_grp)->svcs, 
+        AXIS2_QNAME_GET_LOCALPART(svc_name, env), AXIS2_HASH_KEY_STRING));
 }
 
-axis2_status_t axis2_svc_grp_ops_remove_service
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_qname_t* service_name)
-{
-	if(!env || !srvgrp_desc || ! service_name)
-	{
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	}
-	axis2_hash_set (srvgrp_desc->services, service_name->localpart
-		, AXIS2_HASH_KEY_STRING, NULL);
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_remove_svc (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env,
+		                    const axis2_qname_t* svc_name)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    
+	AXIS2_PARAM_CHECK((*env)->error, svc_name, AXIS2_FAILURE);
+    
+	axis2_hash_set (AXIS2_INTF_TO_IMPL(svc_grp)->svcs, 
+        AXIS2_QNAME_GET_LOCALPART(svc_name, env), AXIS2_HASH_KEY_STRING, NULL);
 	
 	return AXIS2_SUCCESS;
 }
 
-axis2_status_t axis2_svc_grp_ops_add_param
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, axis2_param_t *param)
-{
-	if(!env || !srvgrp_desc || !srvgrp_desc->param_container || !param)
-	{
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	}
-	axis2_hash_set (axis2_param_container_get_params
-		(srvgrp_desc->param_container, env), axis2_param_get_name
-		(param, env)
-		, AXIS2_HASH_KEY_STRING, param);	
+axis2_status_t AXIS2_CALL 
+axis2_svc_grp_add_param (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env, 
+                            axis2_param_t *param)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    
+    if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+	    AXIS2_ERROR_SET((*env)->error, 
+            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
+    
+    AXIS2_PARAM_CHECK((*env)->error, param, AXIS2_FAILURE);
+	
+	axis2_hash_set (AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(
+        svc_grp)->param_container, env), AXIS2_PARAM_GET_NAME(param, env), 
+        AXIS2_HASH_KEY_STRING, param);
+	
 	return AXIS2_SUCCESS;
 }
 
-axis2_param_t *axis2_svc_grp_ops_get_param(
-		axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_char_t *name)
-{
-	if(!env || !srvgrp_desc || !srvgrp_desc->param_container)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
+axis2_param_t * AXIS2_CALL 
+axis2_svc_grp_get_param (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env,
+		                    const axis2_char_t *name)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    
+	if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+	    AXIS2_ERROR_SET((*env)->error
+        , AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, NULL);
+    
 	axis2_char_t *tempname = axis2_strdup(name);
-	if(!tempname)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
-	}
+    
+	if(NULL == tempname)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FALSE);
 		
-	return (axis2_param_t *)(axis2_hash_get 
-		(axis2_param_container_get_params
-		(srvgrp_desc->param_container, env), tempname, AXIS2_HASH_KEY_STRING));
+	return (axis2_param_t *)(axis2_hash_get (AXIS2_PARAM_CONTAINER_GET_PARAMS(
+        AXIS2_INTF_TO_IMPL(svc_grp)->param_container, env), tempname, 
+        AXIS2_HASH_KEY_STRING));
 	
 }
 
-axis2_hash_t *axis2_svc_grp_ops_get_params
-		(axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env)
+axis2_hash_t * AXIS2_CALL 
+axis2_svc_grp_get_params (axis2_svc_grp_t *svc_grp, 
+                            axis2_env_t **env)
 {
-	if(!env || !srvgrp_desc)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;		
-	}
-	return axis2_param_container_get_params(srvgrp_desc->param_container
-		, env);
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+	
+	return AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(svc_grp)->
+        param_container, env);
 	
 }
 
-axis2_bool_t axis2_svc_grp_ops_is_param_locked(
-		axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-		, const axis2_char_t *param_name)
+axis2_bool_t AXIS2_CALL 
+axis2_svc_grp_is_param_locked (axis2_svc_grp_t *svc_grp, 
+                                axis2_env_t **env,
+		                        const axis2_char_t *param_name)
 {
-	if(!env || !srvgrp_desc || !srvgrp_desc->param_container)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return AXIS2_FALSE;
-	}
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FALSE);
+	
+	if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+	    AXIS2_ERROR_SET((*env)->error
+        , AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FALSE);
+	
 	axis2_char_t *tempname = axis2_strdup(param_name);
-	if(!tempname)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return AXIS2_FALSE;
-	}
-		
-	return axis2_param_container_is_param_locked
-		(srvgrp_desc->param_container, env, param_name); 
+	if(NULL == tempname)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FALSE);
+	
+	return AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED
+		(AXIS2_INTF_TO_IMPL(svc_grp)->param_container, env, param_name); 
 	
 }

Modified: webservices/axis2/trunk/c/modules/core/engine/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/Makefile.am?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/Makefile.am Mon Nov  7 20:34:51 2005
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libaxis2_engine.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_engine_la_SOURCES = handler.c
+libaxis2_engine_la_SOURCES = handler.c msg_recv.c engine_config.c
 
 libaxis2_engine_la_LIBADD = $(LDFLAGS)
 INCLUDES = -I${CUTEST_HOME}/include \

Modified: webservices/axis2/trunk/c/modules/core/engine/src/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/Makefile.in?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/Makefile.in Mon Nov  7 20:34:51 2005
@@ -63,7 +63,8 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libaxis2_engine_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libaxis2_engine_la_OBJECTS = handler.lo
+am_libaxis2_engine_la_OBJECTS = handler.lo msg_recv.lo \
+	engine_config.lo
 libaxis2_engine_la_OBJECTS = $(am_libaxis2_engine_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
@@ -191,7 +192,7 @@
 target_vendor = @target_vendor@
 lib_LTLIBRARIES = libaxis2_engine.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_engine_la_SOURCES = handler.c
+libaxis2_engine_la_SOURCES = handler.c msg_recv.c engine_config.c
 libaxis2_engine_la_LIBADD = $(LDFLAGS)
 INCLUDES = -I${CUTEST_HOME}/include \
             -I$(top_builddir)/modules/xml/guththila/src \
@@ -267,7 +268,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/engine_config.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_recv.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Modified: webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c Mon Nov  7 20:34:51 2005
@@ -18,278 +18,268 @@
 
 #include <axis2_engine_config.h>
 
-typedef struct axis2_engine_impl_config_s axis2_engine_impl_config_t;
+typedef struct axis2_engine_config_impl_s axis2_engine_config_impl_t;
 
-/**
-  * @struct axis2_engine_impl_config
-  * @brief ENGINE engine_config impl
-  * This holds the information about engine.
-  */
-struct axis2_engine_impl_config_s
+/** 
+ * @brief Engine configuration struct impl
+ * Axis2 Engine Configuration impl  
+ */  
+struct axis2_engine_config_impl_s
 {
-	axis2_engine_config_t engine;
-    axis2_param_container_t * param_container;
-    axis2_hash_t *service_groups;
+	axis2_engine_config_t engine_config;
+    axis2_param_container_t *param_container;
+    axis2_hash_t *svc_grps;
 };
-	
+
+#define AXIS2_INTF_TO_IMPL(engine_config) \
+        ((axis2_engine_config_impl_t *)engine_config)
+
 /***************************** Function prototypes ****************************/
 
-axis2_status_t axis2_engine_config_ops_free(axis2_engine_config_t *engine_config
-		,axis2_env_t *env);
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_free (axis2_engine_config_t *engine_config, 
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_add_svc_grp (axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env,
+    	                            struct axis2_svc_grp_s *svc_grp);
+
+struct axis2_svc_grp_s * AXIS2_CALL 
+axis2_engine_config_get_svc_grp (axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env,
+		                            const axis2_char_t *svc_grp_name);
+
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_add_svc (axis2_engine_config_t *engine_config, 
+                                axis2_env_t **env,
+		                        struct axis2_svc_s *svc);
+
+struct axis2_svc_s * 
+AXIS2_CALL axis2_engine_config_get_svc (axis2_engine_config_t *engine_config, 
+                                        axis2_env_t **env,
+		                                const axis2_char_t* svc_name);
+
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_remove_svc (axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env,
+		                            const axis2_char_t *name);
 
-axis2_status_t axis2_engine_config_ops_add_service_group
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-    	, axis2_svc_grp_t *service_group_desc);
-
-axis2_svc_grp_t *axis2_engine_config_ops_get_servicegroup
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *servicegroup_name);
-
-axis2_status_t axis2_engine_config_ops_add_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, axis2_svc_t* service_desc);
-
-axis2_svc_t *axis2_engine_config_ops_get_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t* service_name);
-
-axis2_status_t axis2_engine_config_ops_remove_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *name);
-		
-axis2_status_t split_service_name(axis2_env_t *env
-		, const axis2_char_t *service_name, axis2_char_t **service_name_st);
+/**
+ * To split a given svc name into it's svc grp name and svc name.
+ * if the svc name is foo:bar then svc grp name is "foo" and 
+ * svc name is "bar" but if the svc name is only the "foo" we asume 
+ * svc grp name is "foo" and svc name is "foo"
+ * meaning foo := foo:foo
+ * @param svc_name
+ * @return svc name and grp name 
+ */
+axis2_status_t 
+split_svc_name(axis2_env_t **env,
+                const axis2_char_t *svc_name, 
+                axis2_char_t **svc_name_st);
 		
 
 /************************** End of function prototypes ************************/
 
-axis2_engine_config_t *axis2_engine_config_create 
-		(axis2_env_t **env)
+axis2_engine_config_t * AXIS2_CALL 
+axis2_engine_config_create (axis2_env_t **env)
 {
-	axis2_engine_impl_config_t *engine_impl_config
-		= (axis2_engine_impl_config_t *) AXIS2_MALLOC ((*env)->allocator
-		, sizeof(axis2_engine_impl_config_t));
-	
-	if(NULL == engine_impl_config)
-	{
-		/* set the error code*/
-		(*env)->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
-	}
-	
-	axis2_engine_config_ops_t *ops
-		= (axis2_engine_config_ops_t *) AXIS2_MALLOC (env->allocator
-		, sizeof(axis2_engine_config_ops_t));
-	if(NULL == ops)
-	{
-		(*env)->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		AXIS2_FREE((*env)->allocator, engine_impl_config);
-		return NULL;		
-	}
-	ops->free = axis2_engine_config_ops_free;
-	ops->add_service_group = axis2_engine_config_ops_add_service_group;
-	ops->get_service_group = axis2_engine_config_ops_get_servicegroup;
-	ops->add_service = axis2_engine_config_ops_add_service;
-	ops->get_service = axis2_engine_config_ops_get_service;
-	ops->remove_service = axis2_engine_config_ops_remove_service;
-	
-	(engine_impl_config->engine_config).ops = ops;
+    AXIS2_ENV_CHECK(env, NULL);
+	axis2_engine_config_impl_t *engine_config_impl
+		= (axis2_engine_config_impl_t *) AXIS2_MALLOC ((*env)->allocator
+		, sizeof(axis2_engine_config_impl_t));
+	
+	if(NULL == engine_config_impl)
+	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	
+	engine_config_impl->engine_config.ops->free = axis2_engine_config_free;
+	engine_config_impl->engine_config.ops->add_svc_grp = axis2_engine_config_add_svc_grp;
+	engine_config_impl->engine_config.ops->get_svc_grp = axis2_engine_config_get_svc_grp;
+	engine_config_impl->engine_config.ops->add_svc = axis2_engine_config_add_svc;
+	engine_config_impl->engine_config.ops->get_svc = axis2_engine_config_get_svc;
+	engine_config_impl->engine_config.ops->remove_svc = axis2_engine_config_remove_svc;
 
-	axis2_param_container_t *param_container 
-		= (axis2_param_container_t *)
+	axis2_param_container_t *param_container = (axis2_param_container_t *)
 		axis2_param_container_create(env);		
 	if(NULL == param_container)
 	{
-		(*env)->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        AXIS2_FREE((*env)->allocator, engine_config_impl);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
 
-	(engine_impl_config->engine_config).param_container = param_container;
+	engine_config_impl->param_container = param_container;
 	
-	(engine_impl_config->engine_config).service_groups = NULL;
+	engine_config_impl->svc_grps = NULL;
 	
-	return &(engine_impl_config->engine_config);	
+	return &(engine_config_impl->engine_config);	
 }	
 
 /**********************Start of operation impls********************************/
 
-axis2_status_t axis2_engine_config_ops_free (axis2_engine_config_t *engine_config
-		, axis2_env_t *env)
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_free (axis2_engine_config_t *engine_config, 
+                            axis2_env_t **env)
 {
-	if(engine_config)
-	{
-		AXIS2_FREE(env->allocator, engine_config);
-	}
-	return AXIS2_ERROR_UNALLOCATED_MEMEORY_RELEASE_REQUESTED;
+	AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    
+    if(NULL != engine_config->ops)
+		AXIS2_FREE((*env)->allocator, engine_config->ops);
+    
+	if(NULL != AXIS2_INTF_TO_IMPL(engine_config)->param_container)
+        AXIS2_PARAM_CONTAINER_FREE(AXIS2_INTF_TO_IMPL(engine_config)->
+            param_container, env);
+    
+    axis2_hash_free(AXIS2_INTF_TO_IMPL(engine_config)->svc_grps, env);
+    
+	AXIS2_FREE((*env)->allocator, engine_config);
+    
+	return AXIS2_SUCCESS;
 }
 
-axis2_status_t axis2_engine_config_ops_add_service_group
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-    	, axis2_svc_grp_t *servicegroup_desc)
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_add_svc_grp (axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env,
+    	                            struct axis2_svc_grp_s *svc_grp)
 {
-	if(!engine_config || !servicegroup_desc)
-	{
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	}
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc_grp, AXIS2_FAILURE);
+
+	axis2_char_t *tempname = AXIS2_SVC_GRP_GET_NAME(svc_grp, env);
+	axis2_hash_set (AXIS2_INTF_TO_IMPL(engine_config)->svc_grps, tempname, 
+        AXIS2_HASH_KEY_STRING, svc_grp);
 	
-	axis2_char_t *tempname = axis2_svc_grp_get_name
-			(servicegroup_desc, env);
-	axis2_hash_set (engine_config->service_groups
-		, tempname
-		, AXIS2_HASH_KEY_STRING, servicegroup_desc);	
 	return AXIS2_SUCCESS;
 }
 
-axis2_svc_grp_t *axis2_engine_config_ops_get_servicegroup
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *servicegroup_name)
+struct axis2_svc_grp_s * AXIS2_CALL 
+axis2_engine_config_get_svc_grp (axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env,
+		                            const axis2_char_t *svc_grp_name)
 {
-	if(!engine_config)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	axis2_char_t *tempname = axis2_strdup(servicegroup_name);
-	if(!tempname)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	return (axis2_svc_grp_t *) (axis2_hash_get 
-		(engine_config->service_groups, tempname
-		, AXIS2_HASH_KEY_STRING));
+	AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+	AXIS2_PARAM_CHECK((*env)->error, svc_grp_name, NULL);
+    
+	return (struct axis2_svc_grp_s *) (axis2_hash_get (
+        AXIS2_INTF_TO_IMPL(engine_config)->svc_grps, svc_grp_name, 
+            AXIS2_HASH_KEY_STRING));
 }
 
-axis2_status_t axis2_engine_config_ops_add_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, axis2_svc_t *srv_desc)
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_add_svc (axis2_engine_config_t *engine_config, 
+                                axis2_env_t **env, 
+                                struct axis2_svc_s *svc)
 {
-	if(NULL == engine_config || NULL == srv_desc) 
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc, AXIS2_FAILURE);
 	
-	axis2_svc_grp_t *servicegroup_desc 
-		= axis2_svc_grp_create(env);
+	struct axis2_svc_grp_s *svc_grp = axis2_svc_grp_create(env);
 	
-	if(!servicegroup_desc)
-		return AXIS2_ERROR_NO_MEMORY;
+	if(NULL == svc_grp)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE)
+    }
+		
 	
-	axis2_qname_t *servicegroup_qname = axis2_svc_get_name(srv_desc, env);
+	axis2_qname_t *svc_grp_qname = AXIS2_SVC_GET_NAME(svc, env);
+    if(NULL == svc_grp_qname)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_SVC, 
+            AXIS2_FAILURE);
 	
-	axis2_char_t *servicegroup_name = servicegroup_qname->localpart;
+	axis2_char_t *svc_grp_name = AXIS2_QNAME_GET_LOCALPART(svc_grp_qname, env);
 	
-	axis2_svc_grp_set_name(servicegroup_desc, env
-		, servicegroup_name);
+	AXIS2_SVC_GRP_SET_NAME(svc_grp, env, svc_grp_name);
 	
-	axis2_svc_grp_add_service(servicegroup_desc, env
-		, srv_desc);
+	AXIS2_SVC_GRP_ADD_SVC(svc_grp, env, svc);
 	
 	return AXIS2_SUCCESS;
 }
 
-axis2_svc_t *axis2_engine_config_ops_get_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t* service_name)
+struct axis2_svc_s * AXIS2_CALL 
+axis2_engine_config_get_svc (axis2_engine_config_t *engine_config, 
+                                axis2_env_t **env,
+		                        const axis2_char_t* svc_name)
 {
-	if(!env || !engine_config)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
-	axis2_char_t *tempname = axis2_strdup(service_name);
-	if(!tempname)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;
-	}
+	AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, svc_name, NULL);
 	
-	axis2_svc_grp_t *sg = NULL;
-	int len = strlen(service_name);
-	axis2_char_t *service_st[2];
-	service_st[1] = (axis2_char_t*) AXIS2_MALLOC
-		(env->allocator, len * sizeof(axis2_char_t));
-	service_st[2] = (axis2_char_t*) AXIS2_MALLOC
-		(env->allocator, len * sizeof(axis2_char_t));
-	if(AXIS2_SUCCESS == split_service_name(env, service_name, service_st))
-	{
-		axis2_char_t *grp_name = *(service_st + 2);
-		sg = axis2_engine_config_ops_get_servicegroup(engine_config, env
-			, grp_name);
-		if(!sg)
-			return NULL;
-	}
-	axis2_char_t *srv_name = *(service_st + 1);
-	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(env, srv_name, NULL, NULL); 
+	struct axis2_svc_grp_s *sg = NULL;
+	int len = strlen(svc_name);
+	axis2_char_t *svc_st[2];
+	svc_st[1] = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator,
+        len * sizeof(axis2_char_t));
+	svc_st[2] = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator, 
+        len * sizeof(axis2_char_t));
+    
+	if(AXIS2_SUCCESS == split_svc_name(env, svc_name, svc_st))
+	{
+		axis2_char_t *grp_name = *(svc_st + 2);
+		sg = AXIS2_ENGINE_CONFIG_GET_SVC_GRP(engine_config, env, grp_name);
+		if(NULL == sg)
+			AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_SVC_GRP, NULL);
+	}
+	axis2_char_t *svc_name_l = *(svc_st + 1);
+	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(env, svc_name_l,
+        NULL, NULL); 
 	
-	return axis2_svc_grp_get_service(sg, env, qname);
-	return NULL;
-			
+	return AXIS2_SVC_GRP_GET_SVC(sg, env, qname);		
 }
 
-axis2_status_t axis2_engine_config_ops_remove_service
-		(axis2_engine_config_t *engine_config, axis2_env_t *env
-		, const axis2_char_t *service_name)
+axis2_status_t AXIS2_CALL 
+axis2_engine_config_remove_svc (axis2_engine_config_t *engine_config, 
+                                axis2_env_t **env,
+		                        const axis2_char_t *svc_name)
 {
-	if(!env || !engine_config)
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	axis2_char_t *tempname = axis2_strdup(service_name);
-	if(!tempname)
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
-	
-	axis2_svc_grp_t *sg = NULL;
-	int len = strlen(service_name);
-	axis2_char_t *service_st[2];
-	service_st[1] = (axis2_char_t*) AXIS2_MALLOC
-		(env->allocator, len * sizeof(axis2_char_t));
-	service_st[2] = (axis2_char_t*) AXIS2_MALLOC
-		(env->allocator, len * sizeof(axis2_char_t));
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc_name, AXIS2_FAILURE);
+	
+	struct axis2_svc_grp_s *sg = NULL;
+        
+	int len = strlen(svc_name);
+	axis2_char_t *svc_st[2];
+	svc_st[1] = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator,
+        len * sizeof(axis2_char_t));
+	svc_st[2] = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator, 
+        len * sizeof(axis2_char_t));
 	
-	if(AXIS2_SUCCESS == split_service_name(env, service_name, service_st))
+	if(AXIS2_SUCCESS == split_svc_name(env, svc_name, svc_st))
 	{
-		axis2_char_t *grp_name = *(service_st + 2);
-		sg = axis2_engine_config_ops_get_servicegroup(engine_config, env
-			, grp_name);
+		axis2_char_t *grp_name = *(svc_st + 2);
+		sg = AXIS2_ENGINE_CONFIG_GET_SVC_GRP(engine_config, env, grp_name);
 		if(!sg)
-			return AXIS2_ERROR_INVALID_NULL_PARAM;
+			AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_SVC_GRP, 
+                AXIS2_FAILURE);
 	}
-	axis2_char_t *srv_name = *(service_st + 1);
-	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(srv_name, env
+	axis2_char_t *svc_name_l = *(svc_st + 1);
+	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(svc_name_l, env
 		, NULL, NULL);
 	
-	axis2_svc_grp_remove_service(sg, env, qname);
-	
-	return AXIS2_SUCCESS;
+	return AXIS2_SVC_GRP_REMOVE_SVC(sg, env, qname);
 }
 	
-/**
- * To split a given service name into it's service group name and service name.
- * if the service name is foo:bar then service group name is "foo" and 
- * service name is "bar" but if the service name is only the "foo" we asume 
- * service group name is "foo" and service name is "foo"
- * meaning foo := foo:foo
- * @param service_name
- * @return service name and group name 
- */
-axis2_status_t split_service_name
-		(axis2_env_t *env, const axis2_char_t *service_name, axis2_char_t **service_name_st)
+axis2_status_t 
+split_svc_name (axis2_env_t **env, 
+                const axis2_char_t *svc_name, 
+                axis2_char_t **svc_name_st)
 {
-	axis2_char_t *srv_name_temp = axis2_strdup(service_name);
-	if(!service_name_st)
+	axis2_char_t *svc_name_temp = axis2_strdup(svc_name);
+	if(!svc_name_st)
     {
         return AXIS2_ERROR_INVALID_NULL_PARAM;
     }
-    axis2_char_t *srv_name_l = strpbrk(srv_name_temp, SERVICE_NAME_SPLIT_CHAR);
-    if(NULL == srv_name_l)
+    axis2_char_t *svc_name_l = strpbrk(svc_name_temp, SERVICE_NAME_SPLIT_CHAR);
+    if(NULL == svc_name_l)
     {
-        *(service_name_st + 1) = srv_name_temp;
-        *(service_name_st + 2) = srv_name_temp;
+        *(svc_name_st + 1) = svc_name_temp;
+        *(svc_name_st + 2) = svc_name_temp;
         return AXIS2_SUCCESS;
     }
-    srv_name_l[0] = AXIS2_EOLN;
-    axis2_char_t *grp_name = AXIS2_MALLOC(env->allocator, strlen(srv_name_temp));
-    sscanf(srv_name_temp, "%s", grp_name);
-    srv_name_l = srv_name_l + 1;
-    *(service_name_st + 1) = srv_name_l;
-    *(service_name_st + 2) = grp_name;
+    svc_name_l[0] = AXIS2_EOLN;
+    axis2_char_t *grp_name = AXIS2_MALLOC((*env)->allocator, strlen(svc_name_temp));
+    sscanf(svc_name_temp, "%s", grp_name);
+    svc_name_l = svc_name_l + 1;
+    *(svc_name_st + 1) = svc_name_l;
+    *(svc_name_st + 2) = grp_name;
 	
     return AXIS2_SUCCESS;	
 }

Modified: webservices/axis2/trunk/c/modules/core/engine/src/msg_recv.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/msg_recv.c?rev=331679&r1=331678&r2=331679&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/msg_recv.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/msg_recv.c Mon Nov  7 20:34:51 2005
@@ -14,81 +14,79 @@
  * limitations under the License.
  */
  
-#include <axis2_engine_msg_recv.h>
+#include <axis2_msg_recv.h>
 
-/**
-  * @struct axis2_engine_msg_recv_s
-  * @brief ENGINE msg_recv
-  * This holds the information about msg_recv.
-  */
-struct axis2_engine_msg_recv_s
+typedef struct axis2_msg_recv_impl_s axis2_msg_recv_impl_t;
+/** 
+ * @brief Message Receiver struct impl
+ * Axis2 Message Receiver impl  
+ */ 
+struct axis2_msg_recv_impl_s
 {
-	axis2_engine_msg_recv_ops_t *ops;
+	axis2_msg_recv_t msg_recv;
 };
+
+#define AXIS2_INTF_TO_IMPL(msg_recv) ((axis2_msg_recv_impl_t *) msg_recv)
 	
 /*************************** Function headers *********************************/
 
-axis2_status_t axis2_engine_msg_recv_ops_free (axis2_env_t *env
-		, axis2_engine_msg_recv_t *msg_recv);	
-
-axis2_status_t axis2_engine_msg_recv_ops_receive (axis2_env_t *env
-		, axis2_engine_msg_recv_t *msg_recv
-		, axis2_context_msg_ctx_t *msg_ctx);
+axis2_status_t AXIS2_CALL
+axis2_msg_recv_free (axis2_msg_recv_t *msg_recv,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_msg_recv_receive (axis2_msg_recv_t *msg_recv,
+                                axis2_env_t **env,
+		                        struct axis2_msg_ctx_s *msg_ctx);
 		
 /************************* End of function headers ****************************/	
 
-axis2_engine_msg_recv_t *axis2_engine_msg_recv_get_ops
-		(axis2_env_t *env, axis2_engine_msg_recv_t *msg_recv)
-{
-	if(!msg_recv)
-	{
-		env->error->error_number = AXIS2_ERROR_INVALID_NULL_PARAM;
-		return NULL;	
-	}
-	return (axis2_engine_msg_recv_t *) msg_recv->ops;
-}
-
-axis2_engine_msg_recv_t *axis2_engine_msg_recv_create 
-		(axis2_env_t *env)
+axis2_msg_recv_t * AXIS2_CALL
+axis2_msg_recv_create (axis2_env_t **env)
 {
-	axis2_engine_msg_recv_ops_t *ops = NULL;
-	axis2_engine_msg_recv_t *msg_recv = 
-		(axis2_engine_msg_recv_t *) AXIS2_MALLOC (env->allocator
-		, sizeof (axis2_engine_msg_recv_t));
-	if(!msg_recv)
+    AXIS2_ENV_CHECK(env, NULL);
+    
+	axis2_msg_recv_ops_t *ops = NULL;
+	axis2_msg_recv_impl_t *msg_recv_impl = 
+        (axis2_msg_recv_impl_t *) AXIS2_MALLOC ((*env)->allocator
+		    , sizeof (axis2_msg_recv_impl_t));
+	if(NULL == msg_recv_impl)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	ops = (axis2_msg_recv_ops_t *) AXIS2_MALLOC((*env)->allocator,
+		sizeof(axis2_msg_recv_ops_t));
+    
+    msg_recv_impl->msg_recv.ops = (axis2_msg_recv_ops_t *) AXIS2_MALLOC(
+        (*env)->allocator, sizeof(axis2_msg_recv_ops_t));
+	if(NULL == msg_recv_impl->msg_recv.ops)
 	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
+        AXIS2_FREE((*env)->allocator, msg_recv_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
-	ops = (axis2_engine_msg_recv_ops_t *) AXIS2_MALLOC(env->allocator,
-		sizeof(axis2_engine_msg_recv_ops_t));
-	if(!ops)
-	{
-		env->error->error_number = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
-	}	
-	ops->free = axis2_engine_msg_recv_ops_free;
-	
-	msg_recv->ops = ops;
+    
+	msg_recv_impl->msg_recv.ops->free = axis2_msg_recv_free;
 						
-	return msg_recv;
+	return &(msg_recv_impl->msg_recv);
 }
 
 /******************************************************************************/
 
-axis2_status_t axis2_engine_msg_recv_ops_free (axis2_env_t *env
-		, axis2_engine_msg_recv_t *msg_recv)
+axis2_status_t AXIS2_CALL
+axis2_msg_recv_free (axis2_msg_recv_t *msg_recv,
+                        axis2_env_t **env)
 {
-	if(msg_recv){
-		free(msg_recv);
-		return AXIS2_SUCCESS;
-	}
-	return AXIS2_ERROR_UNALLOCATED_MEMEORY_RELEASE_REQUESTED;
+    AXIS2_FUNC_PARAM_CHECK(msg_recv, env, AXIS2_FAILURE);
+	if(NULL != msg_recv->ops)
+		AXIS2_FREE((*env)->allocator, msg_recv->ops);
+    
+    AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(msg_recv));
+    
+	return AXIS2_SUCCESS;
 }
 
-axis2_status_t axis2_engine_msg_receive(axis2_env_t *env
-		, axis2_engine_msg_recv_t *msg_recv
-		, axis2_context_msg_ctx_t *msg_ctx)
+axis2_status_t AXIS2_CALL
+axis2_msg_receive (axis2_msg_recv_t *msg_recv,
+                    axis2_env_t **env,
+		            struct axis2_msg_ctx_s *msg_ctx)
 {
 	return AXIS2_SUCCESS;
 }



Mime
View raw message