axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r494763 - in /webservices/axis2/trunk/c: include/axis2_op_ctx.h include/axis2_svc_ctx.h include/axis2_svc_grp_ctx.h modules/core/context/op_ctx.c modules/core/context/svc_ctx.c modules/core/context/svc_grp_ctx.c
Date Wed, 10 Jan 2007 08:22:11 GMT
Author: samisa
Date: Wed Jan 10 00:22:01 2007
New Revision: 494763

URL: http://svn.apache.org/viewvc?view=rev&rev=494763
Log:
Removed ops, fixed formatting

Modified:
    webservices/axis2/trunk/c/include/axis2_op_ctx.h
    webservices/axis2/trunk/c/include/axis2_svc_ctx.h
    webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h
    webservices/axis2/trunk/c/modules/core/context/op_ctx.c
    webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
    webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c

Modified: webservices/axis2/trunk/c/include/axis2_op_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op_ctx.h?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op_ctx.h Wed Jan 10 00:22:01 2007
@@ -47,183 +47,12 @@
 {
 #endif
 
-    /** Type name for struct axis2_op_ctx_ops */
-    typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
     /** Type name for struct axis2_op_ctx */
     typedef struct axis2_op_ctx axis2_op_ctx_t;
         
     struct axis2_svc_ctx;
 
     /**
-     * operation context ops struct.
-     * Encapsulator struct for ops of axis2_op_ctx.
-     */
-    struct axis2_op_ctx_ops
-    {
-       /**
-        * Gets base which is of context type.
-        * @param op_ctx pointer to operation context
-        * @param env pointer to environment struct
-        * @return pointer to base context
-        */
-        axis2_ctx_t *(AXIS2_CALL *
-                get_base)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env);
-
-       /**
-        * Frees operation context.
-        * @param op_ctx pointer to operation context
-        * @param env pointer to environment struct
-        * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-        */
-        axis2_status_t (AXIS2_CALL *
-                free)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Initializes operation context. This method traverses through all the 
-         * message contexts stored within it and initialize them all.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @param conf pointer to conf configuration
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                init)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env,
-                    struct axis2_conf *conf);
-
-        /**
-         * Gets operation the operation context is related to.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @return pointer to operation
-         */
-        struct axis2_op *(AXIS2_CALL *
-                get_op)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Gets parent which is of service context type. 
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @return pointer to service context within which this operation 
-         * context lives
-         */
-        struct axis2_svc_ctx *(AXIS2_CALL *
-                get_parent)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Adds a message context. 
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @param msg_ctx pointer to message context struct, message context 
-         * does not assume the ownership of the struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                add_msg_ctx)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env,
-                    axis2_msg_ctx_t *msg_ctx);
-
-        /**
-         * Gets message context with the given message ID.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @param message_id message ID string
-         * @return pointer to message context with given ID
-         */
-        axis2_msg_ctx_t *(AXIS2_CALL *
-                get_msg_ctx)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env,
-                    const axis2_char_t *message_id);
-
-        /**
-         * Gets the bool value indicating if the MEP is complete.
-         * MEP is considered complete when all the messages that
-         * are associated with the MEP has arrived.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @return AXIS2_TRUE if MEP invocation is complete, else AXIS2_FALSE
-         */
-        axis2_bool_t (AXIS2_CALL *
-                get_is_complete)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets the bool value indicating if the MEP is complete.
-         * MEP is considered complete when all the messages that
-         * are associated with the MEP has arrived.
-         * @param op_ctx pointer to operating context
-         * @param env pointer to environment struct
-         * @param is_complete AXIS2_TRUE if MEP invocation is complete, else 
-         * AXIS2_FALSE
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_complete)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env,
-                    axis2_bool_t is_complete);
-
-        /**
-         * Cleans up the operation context. Clean up includes removing all 
-         * message context references recorded in operation context.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                cleanup)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets parent service context.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @param svc_ctx pointer to service context, message context does not
-         * assume the ownership of the struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_parent)(
-                    struct axis2_op_ctx *op_ctx,
-                    const axis2_env_t *env,
-                    struct axis2_svc_ctx *svc_ctx);
-
-        /**
-         * Gets the message context map.
-         * @param op_ctx pointer to operation context
-         * @param env pointer to environment struct
-         * @return pointer to hash table containing message contexts
-         */
-        axis2_hash_t *(AXIS2_CALL *
-                get_msg_ctx_map)(
-                    const axis2_op_ctx_t *op_ctx,
-                    const axis2_env_t *env);
-
-    };
-
-    /**
-     * operation context struct.
-     */
-    struct axis2_op_ctx
-    {
-        /** operations of operation context struct */
-        axis2_op_ctx_ops_t *ops;
-    };
-
-    /**
      * Creates an operation context struct instance.
      * @param env pointer to environment struct
      * @param op pointer to operation that is related to operation context. 
@@ -232,71 +61,197 @@
      * @return pointer to newly created operation context
      */
     AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
-    axis2_op_ctx_create(
-       const axis2_env_t *env,
+    axis2_op_ctx_create(const axis2_env_t *env,
        struct axis2_op *op,
        struct axis2_svc_ctx *svc_ctx);
 
+   /**
+    * Gets base which is of context type.
+    * @param op_ctx pointer to operation context
+    * @param env pointer to environment struct
+    * @return pointer to base context
+    */
+    AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+    axis2_op_ctx_get_base(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
+
+   /**
+    * Frees operation context.
+    * @param op_ctx pointer to operation context
+    * @param env pointer to environment struct
+    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_free(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Initializes operation context. This method traverses through all the 
+     * message contexts stored within it and initialize them all.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @param conf pointer to conf configuration
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_init(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env,
+        struct axis2_conf *conf);
+
+    /**
+     * Gets operation the operation context is related to.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @return pointer to operation
+     */
+    AXIS2_EXTERN struct axis2_op *AXIS2_CALL
+    axis2_op_ctx_get_op(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Gets parent which is of service context type. 
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @return pointer to service context within which this operation 
+     * context lives
+     */
+    AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+    axis2_op_ctx_get_parent(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Adds a message context. 
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context struct, message context 
+     * does not assume the ownership of the struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_add_msg_ctx(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Gets message context with the given message ID.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @param message_id message ID string
+     * @return pointer to message context with given ID
+     */
+    AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
+    axis2_op_ctx_get_msg_ctx(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env,
+        const axis2_char_t *message_id);
+
+    /**
+     * Gets the bool value indicating if the MEP is complete.
+     * MEP is considered complete when all the messages that
+     * are associated with the MEP has arrived.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @return AXIS2_TRUE if MEP invocation is complete, else AXIS2_FALSE
+     */
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_op_ctx_get_is_complete(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Sets the bool value indicating if the MEP is complete.
+     * MEP is considered complete when all the messages that
+     * are associated with the MEP has arrived.
+     * @param op_ctx pointer to operating context
+     * @param env pointer to environment struct
+     * @param is_complete AXIS2_TRUE if MEP invocation is complete, else 
+     * AXIS2_FALSE
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_set_complete(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env,
+        axis2_bool_t is_complete);
+
+    /**
+     * Cleans up the operation context. Clean up includes removing all 
+     * message context references recorded in operation context.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_cleanup(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Sets parent service context.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @param svc_ctx pointer to service context, message context does not
+     * assume the ownership of the struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_set_parent(struct axis2_op_ctx *op_ctx,
+        const axis2_env_t *env,
+        struct axis2_svc_ctx *svc_ctx);
+
+    /**
+     * Gets the message context map.
+     * @param op_ctx pointer to operation context
+     * @param env pointer to environment struct
+     * @return pointer to hash table containing message contexts
+     */
+    AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+    axis2_op_ctx_get_msg_ctx_map(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
 
-/** Gets base context struct.
-    @sa axis2_op_ctx_ops#get_base */
+/** Gets base context struct. */
 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
-      ((op_ctx)->ops->get_base(op_ctx, env))
+      axis2_op_ctx_get_base(op_ctx, env)
 
-/** Frees operation context.
-    @sa axis2_op_ctx_ops#free */
+/** Frees operation context. */
 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
-      ((op_ctx)->ops->free(op_ctx, env))
+      axis2_op_ctx_free(op_ctx, env)
 
-/** Initializes operation context.
-    @sa axis2_op_ctx_ops#init */
+/** Initializes operation context. */
 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
-      ((op_ctx)->ops->init(op_ctx, env, conf))
+      axis2_op_ctx_init(op_ctx, env, conf)
 
-/** Gets operating related to operation context.
-    @sa axis2_op_ctx_ops#get_op */
+/** Gets operating related to operation context. */
 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
-      ((op_ctx)->ops->get_op(op_ctx, env))
+      axis2_op_ctx_get_op(op_ctx, env)
 
-/** Gets parent which is of type service context.
-    @sa axis2_op_ctx_ops#get_parent */
+/** Gets parent which is of type service context. */
 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
-      ((op_ctx)->ops->get_parent(op_ctx, env))
+      axis2_op_ctx_get_parent(op_ctx, env)
 
-/** Adds message context.
-    @sa axis2_op_ctx_ops#add_msg_ctx */
+/** Adds message context. */
 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
-      ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
+      axis2_op_ctx_add_msg_ctx(op_ctx, env, msg_ctx)
 
-/** Gets message context with given message ID.
-    @sa axis2_op_ctx_ops#get_msg_ctx */
+/** Gets message context with given message ID. */
 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
-      ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
+      axis2_op_ctx_get_msg_ctx(op_ctx, env, message_id)
 
-/** Gets bool value indicating the complete status.
-    @sa axis2_op_ctx_ops#get_is_complete */
+/** Gets bool value indicating the complete status. */
 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
-      ((op_ctx)->ops->get_is_complete(op_ctx, env))
+      axis2_op_ctx_get_is_complete(op_ctx, env)
 
-/** Sets bool value indicating the complete status.
-    @sa axis2_op_ctx_ops#set_is_complete */
+/** Sets bool value indicating the complete status. */
 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
-      ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
+      axis2_op_ctx_set_complete(op_ctx, env, is_complete)
 
-/** Cleans up operation context.
-    @sa axis2_op_ctx_ops#cleanup */
+/** Cleans up operation context. */
 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
-      ((op_ctx)->ops->cleanup(op_ctx, env))
+      axis2_op_ctx_cleanup(op_ctx, env)
 
-/** Sets parent service context.
-    @sa axis2_op_ctx_ops#set_parent */
+/** Sets parent service context. */
 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
-      ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
+      axis2_op_ctx_set_parent(op_ctx, env, svc_ctx)
 
-/** Gets message context map.
-    @sa axis2_op_ctx_ops#get_msg_ctx */
+/** Gets message context map. */
 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
-      ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))
+      axis2_op_ctx_get_msg_ctx_map(op_ctx, env)
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/include/axis2_svc_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc_ctx.h?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_ctx.h Wed Jan 10 00:22:01 2007
@@ -40,147 +40,9 @@
 {
 #endif
 
-
-    /** Type name for struct axis2_svc_ctx_ops */
-    typedef struct axis2_svc_ctx_ops axis2_svc_ctx_ops_t;
     /** Type name for struct axis2_svc_ctx */
     typedef struct axis2_svc_ctx axis2_svc_ctx_t;
 
-
-    /**
-     * service context ops struct.
-     * Encapsulator struct for ops of axis2_svc_ctx.
-     */
-    struct axis2_svc_ctx_ops
-    {
-        /**
-         * Gets base which is of type context.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return pointer to context, returns a reference, not a cloned copy
-         */
-        axis2_ctx_t *(AXIS2_CALL *
-                get_base)(
-                    const axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Gets parent which is of type service group context.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return pointer to parent service group context
-         */
-        struct axis2_svc_grp_ctx *(AXIS2_CALL *
-                get_parent)(
-                    const axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Frees service context instance.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                free)(
-                    struct axis2_svc_ctx *svc_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Initializes service context. This method locates the corresponding 
-         * service that is related to the service context from configuration
-         * using service qname and keeps a reference to it for future use.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @param conf pointer to configuration
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                init)(
-                    struct axis2_svc_ctx *svc_ctx,
-                    const axis2_env_t *env,
-                    struct axis2_conf *conf);
-
-        /**
-         * Gets the ID of the service that this service context is an instance 
-         * of.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return service ID string.
-         */
-        const axis2_char_t *(AXIS2_CALL *
-                get_svc_id)(
-                    const axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Gets the service that this service context represents.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return pointer to service, returns a reference, not a cloned copy
-         */
-        struct axis2_svc *(AXIS2_CALL *
-                get_svc)(
-                    const axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets the service that this service context represents.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @param svc pointer to service struct, service context does not assume
-         * the ownership of the struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_svc)(
-                    axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env,
-                    struct axis2_svc *svc);
-
-
-        /**
-         * Gets configuration context which is the super root (super most parent)
-         * of the context hierarchy to which this service context belongs.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @return pointer to configuration context
-         */
-        struct axis2_conf_ctx *(AXIS2_CALL *
-                get_conf_ctx)(
-                    const axis2_svc_ctx_t *svc_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Creates an operation context for the named operation. The named 
-         * operation should be one of the operations in the service related
-         * to this service context.
-         * @param svc_ctx pointer to service context
-         * @param env pointer to environment struct
-         * @param qname pointer to qname that represents the operation name.
-         * @return pointer to operation context
-         */
-        struct axis2_op_ctx *(AXIS2_CALL *
-                create_op_ctx)(
-                    struct axis2_svc_ctx *svc_ctx,
-                    const axis2_env_t *env,
-                    const axis2_qname_t *qname);
-    };
-
-    /**
-     * service context struct.
-     */
-    struct axis2_svc_ctx
-    {
-        /** operations of service context */
-        axis2_svc_ctx_ops_t *ops;
-    };
-
     /** 
      * Creates a service context struct that corresponds to the given service
      * and with the given parent service group context.
@@ -193,56 +55,154 @@
      * @return pointer to newly created service context
      */
     AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL 
-    axis2_svc_ctx_create(
-        const axis2_env_t *env,
+    axis2_svc_ctx_create(const axis2_env_t *env,
         struct axis2_svc *svc,
         struct axis2_svc_grp_ctx *svc_grp_ctx);
 
+    /**
+     * Gets base which is of type context.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return pointer to context, returns a reference, not a cloned copy
+     */
+    AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+    axis2_svc_ctx_get_base(const axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Gets parent which is of type service group context.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return pointer to parent service group context
+     */
+    AXIS2_EXTERN struct axis2_svc_grp_ctx *AXIS2_CALL
+    axis2_svc_ctx_get_parent(const axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Frees service context instance.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_ctx_free(struct axis2_svc_ctx *svc_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Initializes service context. This method locates the corresponding 
+     * service that is related to the service context from configuration
+     * using service qname and keeps a reference to it for future use.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @param conf pointer to configuration
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_ctx_init(struct axis2_svc_ctx *svc_ctx,
+        const axis2_env_t *env,
+        struct axis2_conf *conf);
+
+    /**
+     * Gets the ID of the service that this service context is an instance 
+     * of.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return service ID string.
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_svc_ctx_get_svc_id(const axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Gets the service that this service context represents.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return pointer to service, returns a reference, not a cloned copy
+     */
+    AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
+    axis2_svc_ctx_get_svc(const axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Sets the service that this service context represents.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @param svc pointer to service struct, service context does not assume
+     * the ownership of the struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_ctx_set_svc(axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env,
+        struct axis2_svc *svc);
+
+
+    /**
+     * Gets configuration context which is the super root (super most parent)
+     * of the context hierarchy to which this service context belongs.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @return pointer to configuration context
+     */
+    AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+    axis2_svc_ctx_get_conf_ctx(const axis2_svc_ctx_t *svc_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Creates an operation context for the named operation. The named 
+     * operation should be one of the operations in the service related
+     * to this service context.
+     * @param svc_ctx pointer to service context
+     * @param env pointer to environment struct
+     * @param qname pointer to qname that represents the operation name.
+     * @return pointer to operation context
+     */
+    AXIS2_EXTERN struct axis2_op_ctx *AXIS2_CALL
+    axis2_svc_ctx_create_op_ctx(struct axis2_svc_ctx *svc_ctx,
+        const axis2_env_t *env,
+        const axis2_qname_t *qname);
 
-/** Gets base which is of type context.
-    @sa axis2_svc_ctx_ops#get_base */
+/** Gets base which is of type context. */
 #define AXIS2_SVC_CTX_GET_BASE(svc_ctx, env) \
-      ((svc_ctx)->ops->get_base(svc_ctx, env))
+      axis2_svc_ctx_get_base(svc_ctx, env)
 
-/** Gets parent which is of type service group context.
-    @sa axis2_svc_ctx_ops#get_parent */
+/** Gets parent which is of type service group context. */
 #define AXIS2_SVC_CTX_GET_PARENT(svc_ctx, env) \
-      ((svc_ctx)->ops->get_parent(svc_ctx, env))
+      axis2_svc_ctx_get_parent(svc_ctx, env)
 
-/** Frees service context.
-    @sa axis2_svc_ctx_ops#free */
+/** Frees service context. */
 #define AXIS2_SVC_CTX_FREE(svc_ctx, env) \
-      ((svc_ctx)->ops->free(svc_ctx, env))
+      axis2_svc_ctx_free(svc_ctx, env)
 
-/** Initializes service context.
-    @sa axis2_svc_ctx_ops#init */
+/** Initializes service context. */
 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) \
-      ((svc_ctx)->ops->init(svc_ctx, env, conf))
+      axis2_svc_ctx_init(svc_ctx, env, conf)
 
-/** Gets service id of the related service.
-    @sa axis2_svc_ctx_ops#get_svc_id */
+/** Gets service id of the related service. */
 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) \
-      ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
+      axis2_svc_ctx_get_svc_id(svc_ctx, env)
 
-/** Gets service that this service context is an instance of.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Gets service that this service context is an instance of. */
 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) \
-      ((svc_ctx)->ops->get_svc(svc_ctx, env))
+      axis2_svc_ctx_get_svc(svc_ctx, env)
 
-/** Sets service that this service context is an instance of..
-    @sa axis2_svc_ctx_ops#set_svc */
+/** Sets service that this service context is an instance of. */
 #define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
-        ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
+        axis2_svc_ctx_set_svc(svc_ctx, env, svc)
 
-/** Gets configuration context.
-    @sa axis2_svc_ctx_ops#get_conf_ctx */
+/** Gets configuration context. */
 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) \
-      ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
+      axis2_svc_ctx_get_conf_ctx(svc_ctx, env)
 
-/** Creates operation context for the named service.
-    @sa axis2_svc_ctx_ops#create_op_ctx */
+/** Creates operation context for the named service. */
 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) \
-      ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
+      axis2_svc_ctx_create_op_ctx(svc_ctx, env, qname)
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h Wed Jan 10 00:22:01 2007
@@ -42,153 +42,9 @@
 #endif
 
     struct axis2_svc_grp;
-    /** Type name for struct svc_grp_ctx_ops */
-    typedef struct axis2_svc_grp_ctx_ops axis2_svc_grp_ctx_ops_t;
     /** Type name for struct svc_grp_ctx */
     typedef struct axis2_svc_grp_ctx axis2_svc_grp_ctx_t;
 
-
-    /**
-     * service group context ops struct.
-     * Encapsulator struct for ops of axis2_svc_grp_ctx.
-     */
-    struct axis2_svc_grp_ctx_ops
-    {
-        /**
-         * Gets base which is of type context.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment
-         * @return pointer to base context struct, returns a reference not a 
-         * cloned copy
-         */
-        axis2_ctx_t *(AXIS2_CALL *
-                get_base)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Gets parent. configuration context is the parent of any service group 
-         * context instance.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return pointer to configuration context, parent of service group 
-         */
-        struct axis2_conf_ctx *(AXIS2_CALL *
-                get_parent)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-
-        /**
-         * Frees service group context.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
-         */
-        axis2_status_t (AXIS2_CALL *
-                free)(
-                    struct axis2_svc_grp_ctx *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Initializes service group context. In this method, it pics the 
-         * related service group from configuration and keeps a reference
-         * for future use. 
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @param conf pointer to configuration
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
-         */
-        axis2_status_t (AXIS2_CALL *
-                init)(
-                    struct axis2_svc_grp_ctx *svc_grp_ctx,
-                    const axis2_env_t *env,
-                    struct axis2_conf *conf);
-
-        /**
-         * Gets service group context ID.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return service group context ID string
-         */
-        const axis2_char_t *(AXIS2_CALL *
-                get_id)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets service group context ID.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return id service group context ID
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_id)(
-                    struct axis2_svc_grp_ctx *svc_grp_ctx,
-                    const axis2_env_t *env,
-                    const axis2_char_t *id);
-
-        /** 
-         * Gets named service context.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @param svc_name name of service context to be retrieved
-         * @return pointer to named service context
-         */
-        struct axis2_svc_ctx *(AXIS2_CALL *
-                get_svc_ctx)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env,
-                    const axis2_char_t *svc_name);
-
-        /**
-         * Fills service context map. This will create one service context per 
-         * each service in the service group related to this service context.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
-         */
-        axis2_status_t (AXIS2_CALL *
-                fill_svc_ctx_map)(
-                    struct axis2_svc_grp_ctx *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Gets service group related to this service context. 
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return pointer to service group that this service group context 
-         * represents
-         */
-        struct axis2_svc_grp *(AXIS2_CALL *
-                get_svc_grp)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env);
-
-        /**
-         * Gets service context map containing all service contexts.
-         * @param svc_grp_ctx pointer to service group context
-         * @param env pointer to environment struct
-         * @return pointer to hash table containing the service context map
-         */
-        axis2_hash_t *(AXIS2_CALL *
-                get_svc_ctx_map)(
-                    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                    const axis2_env_t *env);
-    };
-
-    /**
-     * service group context struct.
-     */
-    struct axis2_svc_grp_ctx
-    {
-        /** operations of service group context */
-        axis2_svc_grp_ctx_ops_t *ops;
-    };
-
-
     /**
      * Creates a service group context struct.
      * @param env pointer to environment struct
@@ -205,56 +61,159 @@
         struct axis2_svc_grp *svc_grp,
         struct axis2_conf_ctx *conf_ctx);
 
+    /**
+     * Gets base which is of type context.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment
+     * @return pointer to base context struct, returns a reference not a 
+     * cloned copy
+     */
+    AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
+    axis2_svc_grp_ctx_get_base(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Gets parent. configuration context is the parent of any service group 
+     * context instance.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return pointer to configuration context, parent of service group 
+     */
+    AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
+    axis2_svc_grp_ctx_get_parent(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env);
+
+
+    /**
+     * Frees service group context.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_grp_ctx_free(struct axis2_svc_grp_ctx *svc_grp_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Initializes service group context. In this method, it pics the 
+     * related service group from configuration and keeps a reference
+     * for future use. 
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @param conf pointer to configuration
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_grp_ctx_init(struct axis2_svc_grp_ctx *svc_grp_ctx,
+        const axis2_env_t *env,
+        struct axis2_conf *conf);
+
+    /**
+     * Gets service group context ID.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return service group context ID string
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_svc_grp_ctx_get_id(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Sets service group context ID.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return id service group context ID
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_grp_ctx_set_id(struct axis2_svc_grp_ctx *svc_grp_ctx,
+        const axis2_env_t *env,
+        const axis2_char_t *id);
+
+    /** 
+     * Gets named service context.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @param svc_name name of service context to be retrieved
+     * @return pointer to named service context
+     */
+    AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
+    axis2_svc_grp_ctx_get_svc_ctx(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env,
+        const axis2_char_t *svc_name);
+
+    /**
+     * Fills service context map. This will create one service context per 
+     * each service in the service group related to this service context.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_grp_ctx_fill_svc_ctx_map(struct axis2_svc_grp_ctx *svc_grp_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Gets service group related to this service context. 
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return pointer to service group that this service group context 
+     * represents
+     */
+    AXIS2_EXTERN struct axis2_svc_grp *AXIS2_CALL
+    axis2_svc_grp_ctx_get_svc_grp(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env);
+
+    /**
+     * Gets service context map containing all service contexts.
+     * @param svc_grp_ctx pointer to service group context
+     * @param env pointer to environment struct
+     * @return pointer to hash table containing the service context map
+     */
+    AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+    axis2_svc_grp_ctx_get_svc_ctx_map(const axis2_svc_grp_ctx_t *svc_grp_ctx,
+        const axis2_env_t *env);
 
-/** Gets base context.
-    @sa axis2_grp_ctx_ops#get_base */
+/** Gets base context. */
 #define AXIS2_SVC_GRP_CTX_GET_BASE(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->get_base(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_get_base(svc_grp_ctx, env)
 
-/** Gets parent configuration context.
-    @sa axis2_grp_ctx_ops#get_parent */
+/** Gets parent configuration context. */
 #define AXIS2_SVC_GRP_CTX_GET_PARENT(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->get_parent(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_get_parent(svc_grp_ctx, env)
 
-/** Frees service group context.
-    @sa axis2_grp_ctx_ops#free */
+/** Frees service group context. */
 #define AXIS2_SVC_GRP_CTX_FREE(svc_grp_ctx, env)\
-      ((svc_grp_ctx)->ops->free(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_free(svc_grp_ctx, env)
 
-/** Initializes service group context.
-    @sa axis2_grp_ctx_ops#init */
+/** Initializes service group context. */
 #define AXIS2_SVC_GRP_CTX_INIT(svc_grp_ctx, env, conf)\
-      ((svc_grp_ctx)->ops->init(svc_grp_ctx, env, conf))
+      axis2_svc_grp_ctx_init(svc_grp_ctx, env, conf)
 
-/** Gets ID.
-    @sa axis2_grp_ctx_ops#get_id */
+/** Gets ID. */
 #define AXIS2_SVC_GRP_CTX_GET_ID(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->get_id(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_get_id(svc_grp_ctx, env)
 
-/** Sets ID.
-    @sa axis2_grp_ctx_ops#set id */
+/** Sets ID. */
 #define AXIS2_SVC_GRP_CTX_SET_ID(svc_grp_ctx, env, id) \
-      ((svc_grp_ctx)->ops->set_id(svc_grp_ctx, env, id))
+      axis2_svc_grp_ctx_set_id(svc_grp_ctx, env, id)
 
-/** Gets named service context.
-    @sa axis2_grp_ctx_ops#get_svc_ctx */
+/** Gets named service context. */
 #define AXIS2_SVC_GRP_CTX_GET_SVC_CTX(svc_grp_ctx, env, svc_name) \
-      ((svc_grp_ctx)->ops->get_svc_ctx(svc_grp_ctx, env, svc_name))
+      axis2_svc_grp_ctx_get_svc_ctx(svc_grp_ctx, env, svc_name)
 
-/** Gets service context map.
-    @sa axis2_grp_ctx_ops#fill_svc_ctx_map */
+/** Gets service context map. */
 #define AXIS2_SVC_GRP_CTX_FILL_SVC_CTX_MAP(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->fill_svc_ctx_map(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_fill_svc_ctx_map(svc_grp_ctx, env)
 
-/** Gets service group related to service group context.
-    @sa axis2_grp_ctx_ops#get_svc_grp */
+/** Gets service group related to service group context. */
 #define AXIS2_SVC_GRP_GET_SVC_GRP(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->get_svc_grp(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_get_svc_grp(svc_grp_ctx, env)
 
-/** Gets service context map.
-    @sa axis2_grp_ctx_ops#get_svc_ctx_map */
+/** Gets service context map. */
 #define AXIS2_SVC_GRP_GET_SVC_CTX_MAP(svc_grp_ctx, env) \
-      ((svc_grp_ctx)->ops->get_svc_ctx_map(svc_grp_ctx, env))
+      axis2_svc_grp_ctx_get_svc_ctx_map(svc_grp_ctx, env)
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/core/context/op_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/op_ctx.c?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/op_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/op_ctx.c Wed Jan 10 00:22:01 2007
@@ -21,10 +21,8 @@
 #include <axis2_const.h>
 #include <axis2_hash.h>
 
-typedef struct axis2_op_ctx_impl
+struct axis2_op_ctx
 {
-    /** context base struct */
-    axis2_op_ctx_t op_ctx;
     /** base context struct */
     axis2_ctx_t *base;
     /** parent of operation context is a service context instance */
@@ -50,221 +48,100 @@
     axis2_qname_t *svc_qname;
     /* mutex to synchronize the read/write operations */
     axis2_thread_mutex_t *mutex;
-}
-axis2_op_ctx_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(op_ctx) ((axis2_op_ctx_impl_t *)op_ctx)
-
-
-axis2_ctx_t *AXIS2_CALL
-axis2_op_ctx_get_base(
-    const axis2_op_ctx_t *op_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_free(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_init(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env,
-    struct axis2_conf *conf);
-
-axis2_op_t *AXIS2_CALL
-axis2_op_ctx_getAxisOperation(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env);
-
-struct axis2_svc_ctx *AXIS2_CALL
-            axis2_op_ctx_get_parent(
-                const axis2_op_ctx_t *op_ctx,
-                const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_add_msg_ctx(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env,
-    axis2_msg_ctx_t *msg_ctx);
-
-axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_ctx_get_msg_ctx(
-    const axis2_op_ctx_t *op_ctx,
-    const axis2_env_t *env,
-    const axis2_char_t *messageLabel);
-
-axis2_bool_t AXIS2_CALL
-axis2_op_ctx_get_is_complete(
-    const axis2_op_ctx_t *op_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_set_complete(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env,
-    axis2_bool_t is_complete);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_cleanup(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_op_ctx_set_parent(
-    struct axis2_op_ctx *op_ctx,
-    const axis2_env_t *env,
-    struct axis2_svc_ctx *svc_ctx);
-
-axis2_op_t *AXIS2_CALL
-axis2_op_ctx_get_op(
-    const axis2_op_ctx_t *op_ctx,
-    const axis2_env_t *env);
-
-axis2_hash_t *AXIS2_CALL
-axis2_op_ctx_get_msg_ctx_map(
-    const axis2_op_ctx_t *op_ctx,
-    const axis2_env_t *env);
+};
 
 AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
-axis2_op_ctx_create(
-    const axis2_env_t *env,
+axis2_op_ctx_create(const axis2_env_t *env,
     axis2_op_t *op,
     struct axis2_svc_ctx *svc_ctx)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
+    axis2_op_ctx_t *op_ctx = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    op_ctx_impl = AXIS2_MALLOC(env->allocator, sizeof(axis2_op_ctx_impl_t));
-    if (!op_ctx_impl)
+    op_ctx = AXIS2_MALLOC(env->allocator, sizeof(axis2_op_ctx_t));
+    if (!op_ctx)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    op_ctx_impl->op_ctx.ops = NULL;
-    op_ctx_impl->base = NULL;
-    op_ctx_impl->parent = NULL;
-    op_ctx_impl->msg_ctx_map = NULL;
-    op_ctx_impl->op = NULL;
-    op_ctx_impl->op_mep = 0;
-    op_ctx_impl->is_complete = AXIS2_FALSE;
-    op_ctx_impl->op_ctx_map = NULL;
-    op_ctx_impl->op_qname = NULL;
-    op_ctx_impl->svc_qname = NULL;
-    op_ctx_impl->mutex = axis2_thread_mutex_create(env->allocator,
+    op_ctx->base = NULL;
+    op_ctx->parent = NULL;
+    op_ctx->msg_ctx_map = NULL;
+    op_ctx->op = NULL;
+    op_ctx->op_mep = 0;
+    op_ctx->is_complete = AXIS2_FALSE;
+    op_ctx->op_ctx_map = NULL;
+    op_ctx->op_qname = NULL;
+    op_ctx->svc_qname = NULL;
+    op_ctx->mutex = axis2_thread_mutex_create(env->allocator,
             AXIS2_THREAD_MUTEX_DEFAULT);
 
-    if (NULL == op_ctx_impl->mutex)
+    if (NULL == op_ctx->mutex)
     {
-        axis2_op_ctx_free(&(op_ctx_impl->op_ctx), env);
+        axis2_op_ctx_free(op_ctx, env);
         return NULL;
     }
 
-    op_ctx_impl->base = axis2_ctx_create(env);
-    if (!(op_ctx_impl->base))
+    op_ctx->base = axis2_ctx_create(env);
+    if (!(op_ctx->base))
     {
-        axis2_op_ctx_free(&(op_ctx_impl->op_ctx), env);
+        axis2_op_ctx_free(op_ctx, env);
         return NULL;
     }
 
     if (op)
     {
-        op_ctx_impl->op = op;
+        op_ctx->op = op;
     }
 
-    op_ctx_impl->msg_ctx_map = axis2_hash_make(env);
-    if (!(op_ctx_impl->msg_ctx_map))
+    op_ctx->msg_ctx_map = axis2_hash_make(env);
+    if (!(op_ctx->msg_ctx_map))
     {
-        axis2_op_ctx_free(&(op_ctx_impl->op_ctx), env);
+        axis2_op_ctx_free(op_ctx, env);
         return NULL;
     }
 
-    if (op_ctx_impl->op)
+    if (op_ctx->op)
     {
-        op_ctx_impl->op_qname = (axis2_qname_t *)AXIS2_OP_GET_QNAME(op_ctx_impl->op, env);
-        op_ctx_impl->op_mep = AXIS2_OP_GET_AXIS_SPECIFIC_MEP_CONST(op_ctx_impl->op, env);
+        op_ctx->op_qname = (axis2_qname_t *)AXIS2_OP_GET_QNAME(op_ctx->op, env);
+        op_ctx->op_mep = AXIS2_OP_GET_AXIS_SPECIFIC_MEP_CONST(op_ctx->op, env);
     }
 
-    axis2_op_ctx_set_parent(&(op_ctx_impl->op_ctx), env, svc_ctx);
+    axis2_op_ctx_set_parent(op_ctx, env, svc_ctx);
 
-    /* initialize ops */
-    op_ctx_impl->op_ctx.ops  = AXIS2_MALLOC(env->allocator, sizeof(axis2_op_ctx_ops_t));
-    if (!op_ctx_impl->op_ctx.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_op_ctx_free(&(op_ctx_impl->op_ctx), env);
-        return NULL;
-    }
-
-    op_ctx_impl->op_ctx.ops->get_base =
-        axis2_op_ctx_get_base;
-    op_ctx_impl->op_ctx.ops->free =
-        axis2_op_ctx_free;
-    op_ctx_impl->op_ctx.ops->init =
-        axis2_op_ctx_init;
-    op_ctx_impl->op_ctx.ops->get_op =
-        axis2_op_ctx_get_op;
-    op_ctx_impl->op_ctx.ops->get_parent =
-        axis2_op_ctx_get_parent;
-    op_ctx_impl->op_ctx.ops->add_msg_ctx =
-        axis2_op_ctx_add_msg_ctx;
-    op_ctx_impl->op_ctx.ops->get_msg_ctx =
-        axis2_op_ctx_get_msg_ctx;
-    op_ctx_impl->op_ctx.ops->get_is_complete =
-        axis2_op_ctx_get_is_complete;
-    op_ctx_impl->op_ctx.ops->set_complete =
-        axis2_op_ctx_set_complete;
-    op_ctx_impl->op_ctx.ops->cleanup =
-        axis2_op_ctx_cleanup;
-    op_ctx_impl->op_ctx.ops->set_parent =
-        axis2_op_ctx_set_parent;
-    op_ctx_impl->op_ctx.ops->get_msg_ctx_map =
-        axis2_op_ctx_get_msg_ctx_map;
-
-    return &(op_ctx_impl->op_ctx);
+    return op_ctx;
 }
 
-axis2_ctx_t *AXIS2_CALL
+AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
 axis2_op_ctx_get_base(
     const axis2_op_ctx_t *op_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op_ctx)->base;
+    return op_ctx->base;
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_free(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
-    if (op_ctx_impl->op_ctx.ops)
-    {
-        AXIS2_FREE(env->allocator, op_ctx_impl->op_ctx.ops);
-        op_ctx_impl->op_ctx.ops = NULL;
-    }
-
-    if (op_ctx_impl->base)
+    if (op_ctx->base)
     {
-        AXIS2_CTX_FREE(op_ctx_impl->base, env);
-        op_ctx_impl->base = NULL;
+        AXIS2_CTX_FREE(op_ctx->base, env);
+        op_ctx->base = NULL;
     }
 
-    if (op_ctx_impl->msg_ctx_map)
+    if (op_ctx->msg_ctx_map)
     {
         axis2_hash_index_t *hi = NULL;
         void *ctx = NULL;
-        for (hi = axis2_hash_first(op_ctx_impl->msg_ctx_map, env);
+        for (hi = axis2_hash_first(op_ctx->msg_ctx_map, env);
             hi; hi = axis2_hash_next(env, hi))
         {
             axis2_hash_this(hi, NULL, NULL, &ctx);
@@ -275,42 +152,39 @@
             }
         }
 
-        axis2_hash_free(op_ctx_impl->msg_ctx_map, env);
-        op_ctx_impl->msg_ctx_map = NULL;
+        axis2_hash_free(op_ctx->msg_ctx_map, env);
+        op_ctx->msg_ctx_map = NULL;
     }
 
-    if (op_ctx_impl->mutex)
+    if (op_ctx->mutex)
     {
-        axis2_thread_mutex_destroy(op_ctx_impl->mutex);
-        op_ctx_impl->mutex = NULL;
+        axis2_thread_mutex_destroy(op_ctx->mutex);
+        op_ctx->mutex = NULL;
     }
 
-    AXIS2_FREE(env->allocator, op_ctx_impl);
-    op_ctx_impl = NULL;
+    AXIS2_FREE(env->allocator, op_ctx);
+    op_ctx = NULL;
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_init(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env,
     struct axis2_conf *conf)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
     axis2_hash_index_t *hi = NULL;
     void *ctx = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
-    if (op_ctx_impl->op_qname && op_ctx_impl->svc_qname)
+    if (op_ctx->op_qname && op_ctx->svc_qname)
     {
         axis2_svc_t *svc = NULL;
         axis2_char_t *svc_name = NULL;
 
-        svc_name = AXIS2_QNAME_GET_LOCALPART(op_ctx_impl->svc_qname, env);
+        svc_name = AXIS2_QNAME_GET_LOCALPART(op_ctx->svc_qname, env);
 
         if (svc_name)
         {
@@ -318,16 +192,16 @@
 
             if (svc)
             {
-                op_ctx_impl->op =
-                    AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, op_ctx_impl->op_qname);
+                op_ctx->op =
+                    AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, op_ctx->op_qname);
             }
         }
     }
 
-    if (!(op_ctx_impl->msg_ctx_map))
+    if (!(op_ctx->msg_ctx_map))
         return AXIS2_SUCCESS;
 
-    for (hi = axis2_hash_first(op_ctx_impl->msg_ctx_map, env);
+    for (hi = axis2_hash_first(op_ctx->msg_ctx_map, env);
             hi; hi = axis2_hash_next(env, hi))
     {
         axis2_hash_this(hi, NULL, NULL, &ctx);
@@ -341,38 +215,34 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_op_t *AXIS2_CALL
+AXIS2_EXTERN axis2_op_t *AXIS2_CALL
 axis2_op_ctx_get_op(
     const axis2_op_ctx_t *op_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op_ctx)->op;
+    return op_ctx->op;
 }
 
-struct axis2_svc_ctx *AXIS2_CALL
+AXIS2_EXTERN struct axis2_svc_ctx *AXIS2_CALL
             axis2_op_ctx_get_parent(
                 const axis2_op_ctx_t *op_ctx,
                 const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op_ctx)->parent;
+    return op_ctx->parent;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_add_msg_ctx(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env,
     axis2_msg_ctx_t *msg_ctx)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
-    axis2_thread_mutex_lock(op_ctx_impl->mutex);
-    if (op_ctx_impl->msg_ctx_map)
+    axis2_thread_mutex_lock(op_ctx->mutex);
+    if (op_ctx->msg_ctx_map)
     {
         axis2_msg_ctx_t *out_msg_ctx = NULL;
         axis2_msg_ctx_t *in_msg_ctx = NULL;
@@ -380,13 +250,13 @@
         /*const axis2_char_t *message_id = AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env);
         if (message_id)
         {
-            axis2_hash_set(op_ctx_impl->msg_ctx_map, 
+            axis2_hash_set(op_ctx->msg_ctx_map, 
                 message_id, AXIS2_HASH_KEY_STRING, msg_ctx); 
         }*/
 
-        out_msg_ctx = axis2_hash_get(op_ctx_impl->msg_ctx_map,
+        out_msg_ctx = axis2_hash_get(op_ctx->msg_ctx_map,
                 AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING);
-        in_msg_ctx = axis2_hash_get(op_ctx_impl->msg_ctx_map,
+        in_msg_ctx = axis2_hash_get(op_ctx->msg_ctx_map,
                 AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING);
 
         if (out_msg_ctx && in_msg_ctx)
@@ -397,83 +267,76 @@
 
         if (!out_msg_ctx)
         {
-            axis2_hash_set(op_ctx_impl->msg_ctx_map,
+            axis2_hash_set(op_ctx->msg_ctx_map,
                 AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING,
                     msg_ctx);
         }
         else
         {
-            axis2_hash_set(op_ctx_impl->msg_ctx_map,
+            axis2_hash_set(op_ctx->msg_ctx_map,
                 AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING,
                     msg_ctx);
         }
     }
-    axis2_thread_mutex_unlock(op_ctx_impl->mutex);
+    axis2_thread_mutex_unlock(op_ctx->mutex);
     return AXIS2_SUCCESS;
 }
 
-axis2_msg_ctx_t *AXIS2_CALL
+AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
 axis2_op_ctx_get_msg_ctx(
     const axis2_op_ctx_t *op_ctx,
     const axis2_env_t *env,
     const axis2_char_t *message_id)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
-    axis2_thread_mutex_lock(op_ctx_impl->mutex);
-    if (op_ctx_impl->msg_ctx_map)
+    axis2_thread_mutex_lock(op_ctx->mutex);
+    if (op_ctx->msg_ctx_map)
     {
         axis2_msg_ctx_t *rv = NULL;
-        rv = axis2_hash_get(op_ctx_impl->msg_ctx_map, message_id,
+        rv = axis2_hash_get(op_ctx->msg_ctx_map, message_id,
                 AXIS2_HASH_KEY_STRING);
-        axis2_thread_mutex_unlock(op_ctx_impl->mutex);
+        axis2_thread_mutex_unlock(op_ctx->mutex);
         return rv;
     }
-    axis2_thread_mutex_unlock(op_ctx_impl->mutex);
+    axis2_thread_mutex_unlock(op_ctx->mutex);
     return NULL;
 }
 
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axis2_op_ctx_get_is_complete(
     const axis2_op_ctx_t *op_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(op_ctx)->is_complete;
+    return op_ctx->is_complete;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_set_complete(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env,
     axis2_bool_t is_complete)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(op_ctx)->is_complete = is_complete;
+    op_ctx->is_complete = is_complete;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_cleanup(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
     axis2_hash_index_t *hi = NULL;
     void *ctx = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
-    if (!(op_ctx_impl->msg_ctx_map))
+    if (!(op_ctx->msg_ctx_map))
         return AXIS2_SUCCESS;
 
-    for (hi = axis2_hash_first(op_ctx_impl->msg_ctx_map, env);
+    for (hi = axis2_hash_first(op_ctx->msg_ctx_map, env);
             hi; hi = axis2_hash_next(env, hi))
     {
         axis2_hash_this(hi, NULL, NULL, &ctx);
@@ -483,7 +346,7 @@
             const axis2_char_t *message_id = AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env);
             if (message_id)
             {
-                axis2_hash_set(op_ctx_impl->msg_ctx_map,
+                axis2_hash_set(op_ctx->msg_ctx_map,
                         message_id, AXIS2_HASH_KEY_STRING, NULL);
                 return AXIS2_MSG_CTX_FREE(msg_ctx, env);
             }
@@ -493,44 +356,40 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_op_ctx_set_parent(
     struct axis2_op_ctx *op_ctx,
     const axis2_env_t *env,
     struct axis2_svc_ctx *svc_ctx)
 {
-    axis2_op_ctx_impl_t *op_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    op_ctx_impl = AXIS2_INTF_TO_IMPL(op_ctx);
-
     if (svc_ctx)
     {
-        op_ctx_impl->parent = svc_ctx;
+        op_ctx->parent = svc_ctx;
     }
 
-    if (op_ctx_impl->parent) /* that is if there is a service context associated */
+    if (op_ctx->parent) /* that is if there is a service context associated */
     {
         axis2_conf_ctx_t *conf_ctx = NULL;
-        conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_ctx_impl->parent, env);
+        conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_ctx->parent, env);
         if (conf_ctx)
         {
-            op_ctx_impl->op_ctx_map =
+            op_ctx->op_ctx_map =
                 AXIS2_CONF_CTX_GET_OP_CTX_MAP(conf_ctx, env);
         }
-        op_ctx_impl->svc_qname =
-            (axis2_qname_t *)AXIS2_SVC_GET_QNAME(AXIS2_SVC_CTX_GET_SVC(op_ctx_impl->parent, env), env);
+        op_ctx->svc_qname =
+            (axis2_qname_t *)AXIS2_SVC_GET_QNAME(AXIS2_SVC_CTX_GET_SVC(op_ctx->parent, env), env);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_hash_t *AXIS2_CALL
+AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
 axis2_op_ctx_get_msg_ctx_map(
     const axis2_op_ctx_t *op_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op_ctx)->msg_ctx_map;
+    return op_ctx->msg_ctx_map;
 }

Modified: webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/svc_ctx.c?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_ctx.c Wed Jan 10 00:22:01 2007
@@ -20,10 +20,8 @@
 #include <axis2_const.h>
 #include <axis2_hash.h>
 
-typedef struct axis2_svc_ctx_impl
+struct axis2_svc_ctx
 {
-    /** context base struct */
-    axis2_svc_ctx_t svc_ctx;
     /** base context struct */
     axis2_ctx_t *base;
     /** parent of op context is a service context instance */
@@ -34,60 +32,7 @@
     axis2_char_t *svc_id;
     /** service qname */
     axis2_qname_t *svc_qname;
-}
-axis2_svc_ctx_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(svc_ctx) ((axis2_svc_ctx_impl_t *)svc_ctx)
-
-axis2_ctx_t *AXIS2_CALL
-axis2_svc_ctx_get_base(
-    const axis2_svc_ctx_t *svc_ctx,
-    const axis2_env_t *env);
-
-struct axis2_svc_grp_ctx *AXIS2_CALL
-            axis2_svc_ctx_get_parent(
-                const axis2_svc_ctx_t *svc_ctx,
-                const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_ctx_free(
-    struct axis2_svc_ctx *svc_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_ctx_init(
-    struct axis2_svc_ctx *svc_ctx,
-    const axis2_env_t *env,
-    axis2_conf_t *conf);
-
-const axis2_char_t *AXIS2_CALL
-axis2_svc_ctx_get_svc_id(
-    const axis2_svc_ctx_t *svc_ctx,
-    const axis2_env_t *env);
-
-axis2_svc_t *AXIS2_CALL
-axis2_svc_ctx_get_svc(
-    const axis2_svc_ctx_t *svc_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_ctx_set_svc(
-    axis2_svc_ctx_t *svc_ctx,
-    const axis2_env_t *env,
-    axis2_svc_t *svc);
-
-
-struct axis2_conf_ctx *AXIS2_CALL
-            axis2_svc_ctx_get_conf_ctx(
-                const axis2_svc_ctx_t *svc_ctx,
-                const axis2_env_t *env);
-
-axis2_op_ctx_t *AXIS2_CALL
-axis2_svc_ctx_create_op_ctx(
-    struct axis2_svc_ctx *svc_ctx,
-    const axis2_env_t *env,
-    const axis2_qname_t *qname);
+};
 
 AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
 axis2_svc_ctx_create(
@@ -95,67 +40,46 @@
     axis2_svc_t *svc,
     struct axis2_svc_grp_ctx *svc_grp_ctx)
 {
-    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
+    axis2_svc_ctx_t *svc_ctx = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_ctx_impl = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_ctx_impl_t));
-    if (!svc_ctx_impl)
+    svc_ctx = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_ctx_t));
+    if (!svc_ctx)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    svc_ctx_impl->svc_ctx.ops = NULL;
-    svc_ctx_impl->base = NULL;
-    svc_ctx_impl->parent = NULL;
-    svc_ctx_impl->svc = NULL;
-    svc_ctx_impl->svc_id = NULL;
-    svc_ctx_impl->svc_qname = NULL;
+    svc_ctx->base = NULL;
+    svc_ctx->parent = NULL;
+    svc_ctx->svc = NULL;
+    svc_ctx->svc_id = NULL;
+    svc_ctx->svc_qname = NULL;
 
-    svc_ctx_impl->base = axis2_ctx_create(env);
-    if (!(svc_ctx_impl->base))
+    svc_ctx->base = axis2_ctx_create(env);
+    if (!(svc_ctx->base))
     {
-        axis2_svc_ctx_free(&(svc_ctx_impl->svc_ctx), env);
+        axis2_svc_ctx_free(svc_ctx, env);
         return NULL;
     }
 
     if (svc)
     {
-        svc_ctx_impl->svc = svc;
-        svc_ctx_impl->svc_qname = (axis2_qname_t *)AXIS2_SVC_GET_QNAME(svc, env);
-        if (svc_ctx_impl->svc_qname)
+        svc_ctx->svc = svc;
+        svc_ctx->svc_qname = (axis2_qname_t *)AXIS2_SVC_GET_QNAME(svc, env);
+        if (svc_ctx->svc_qname)
         {
-            svc_ctx_impl->svc_id = AXIS2_QNAME_GET_LOCALPART(svc_ctx_impl->svc_qname, env);
+            svc_ctx->svc_id = AXIS2_QNAME_GET_LOCALPART(svc_ctx->svc_qname, env);
         }
     }
 
     if (svc_grp_ctx)
     {
-        svc_ctx_impl->parent = svc_grp_ctx;
+        svc_ctx->parent = svc_grp_ctx;
     }
 
-    /* initialize ops */
-
-    svc_ctx_impl->svc_ctx.ops  = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_ctx_ops_t));
-    if (!svc_ctx_impl->svc_ctx.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_svc_ctx_free(&(svc_ctx_impl->svc_ctx), env);
-        return NULL;
-    }
-
-    svc_ctx_impl->svc_ctx.ops->get_base = axis2_svc_ctx_get_base;
-    svc_ctx_impl->svc_ctx.ops->get_parent = axis2_svc_ctx_get_parent;
-    svc_ctx_impl->svc_ctx.ops->free = axis2_svc_ctx_free;
-    svc_ctx_impl->svc_ctx.ops->init = axis2_svc_ctx_init;
-    svc_ctx_impl->svc_ctx.ops->get_svc_id = axis2_svc_ctx_get_svc_id;
-    svc_ctx_impl->svc_ctx.ops->get_svc = axis2_svc_ctx_get_svc;
-    svc_ctx_impl->svc_ctx.ops->set_svc = axis2_svc_ctx_set_svc;
-    svc_ctx_impl->svc_ctx.ops->get_conf_ctx = axis2_svc_ctx_get_conf_ctx;
-    svc_ctx_impl->svc_ctx.ops->create_op_ctx = axis2_svc_ctx_create_op_ctx;
-
-    return &(svc_ctx_impl->svc_ctx);
+    return svc_ctx;
 }
 
 axis2_ctx_t *AXIS2_CALL
@@ -164,7 +88,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_ctx)->base;
+    return svc_ctx->base;
 }
 
 
@@ -174,7 +98,7 @@
                 const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_ctx)->parent;
+    return svc_ctx->parent;
 }
 
 axis2_status_t AXIS2_CALL
@@ -182,26 +106,16 @@
     struct axis2_svc_ctx *svc_ctx,
     const axis2_env_t *env)
 {
-    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_ctx_impl = AXIS2_INTF_TO_IMPL(svc_ctx);
-
-    if (svc_ctx_impl->svc_ctx.ops)
+    if (svc_ctx->base)
     {
-        AXIS2_FREE(env->allocator, svc_ctx_impl->svc_ctx.ops);
-        svc_ctx_impl->svc_ctx.ops = NULL;
+        AXIS2_CTX_FREE(svc_ctx->base, env);
+        svc_ctx->base = NULL;
     }
 
-    if (svc_ctx_impl->base)
-    {
-        AXIS2_CTX_FREE(svc_ctx_impl->base, env);
-        svc_ctx_impl->base = NULL;
-    }
-
-    AXIS2_FREE(env->allocator, svc_ctx_impl);
-    svc_ctx_impl = NULL;
+    AXIS2_FREE(env->allocator, svc_ctx);
+    svc_ctx = NULL;
 
     return AXIS2_SUCCESS;
 }
@@ -212,16 +126,12 @@
     const axis2_env_t *env,
     axis2_conf_t *conf)
 {
-    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_ctx_impl = AXIS2_INTF_TO_IMPL(svc_ctx);
-
-    if (svc_ctx_impl->svc_qname)
+    if (svc_ctx->svc_qname)
     {
-        axis2_char_t *svc_name = AXIS2_QNAME_GET_LOCALPART(svc_ctx_impl->svc_qname, env);
-        svc_ctx_impl->svc = AXIS2_CONF_GET_SVC(conf, env, svc_name);
+        axis2_char_t *svc_name = AXIS2_QNAME_GET_LOCALPART(svc_ctx->svc_qname, env);
+        svc_ctx->svc = AXIS2_CONF_GET_SVC(conf, env, svc_name);
     }
 
     return AXIS2_SUCCESS;
@@ -233,7 +143,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_ctx)->svc_id;
+    return svc_ctx->svc_id;
 }
 
 
@@ -243,7 +153,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_ctx)->svc;
+    return svc_ctx->svc;
 }
 
 axis2_status_t AXIS2_CALL
@@ -252,17 +162,14 @@
     const axis2_env_t *env,
     axis2_svc_t *svc)
 {
-    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc, AXIS2_FAILURE);
-    svc_ctx_impl = AXIS2_INTF_TO_IMPL(svc_ctx);
 
-    svc_ctx_impl->svc = svc;
-    svc_ctx_impl->svc_qname = (axis2_qname_t *)AXIS2_SVC_GET_QNAME(svc, env);
-    if (svc_ctx_impl->svc_qname)
+    svc_ctx->svc = svc;
+    svc_ctx->svc_qname = (axis2_qname_t *)AXIS2_SVC_GET_QNAME(svc, env);
+    if (svc_ctx->svc_qname)
     {
-        svc_ctx_impl->svc_id = AXIS2_QNAME_GET_LOCALPART(svc_ctx_impl->
+        svc_ctx->svc_id = AXIS2_QNAME_GET_LOCALPART(svc_ctx->
                 svc_qname, env);
     }
     return AXIS2_SUCCESS;
@@ -274,7 +181,7 @@
                 const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_SVC_GRP_CTX_GET_PARENT(AXIS2_INTF_TO_IMPL(svc_ctx)->parent, env);
+    return AXIS2_SVC_GRP_CTX_GET_PARENT(svc_ctx->parent, env);
 }
 
 axis2_op_ctx_t *AXIS2_CALL
@@ -283,16 +190,13 @@
     const axis2_env_t *env,
     const axis2_qname_t *qname)
 {
-    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
     axis2_op_t *op = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_ctx_impl = AXIS2_INTF_TO_IMPL(svc_ctx);
-
-    if (svc_ctx_impl->svc)
+    if (svc_ctx->svc)
     {
-        op = AXIS2_SVC_GET_OP_WITH_QNAME(svc_ctx_impl->svc, env, qname);
+        op = AXIS2_SVC_GET_OP_WITH_QNAME(svc_ctx->svc, env, qname);
         return axis2_op_ctx_create(env, op, svc_ctx);
     }
 

Modified: webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c?view=diff&rev=494763&r1=494762&r2=494763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c Wed Jan 10 00:22:01 2007
@@ -20,10 +20,8 @@
 #include <axis2_const.h>
 #include <axis2_hash.h>
 
-typedef struct axis2_svc_grp_ctx_impl
+struct axis2_svc_grp_ctx
 {
-    /** context base struct */
-    axis2_svc_grp_ctx_t svc_grp_ctx;
     /** base context struct */
     axis2_ctx_t *base;
     /** parent of service group context is a configuration context instance */
@@ -36,65 +34,7 @@
     axis2_svc_grp_t *svc_grp;
     /** name of the service group associated with this context */
     axis2_char_t *svc_grp_name;
-}
-axis2_svc_grp_ctx_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(svc_grp_ctx) ((axis2_svc_grp_ctx_impl_t *)svc_grp_ctx)
-
-
-axis2_ctx_t *AXIS2_CALL
-axis2_svc_grp_ctx_get_base(
-    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-    const axis2_env_t *env);
-
-struct axis2_conf_ctx *AXIS2_CALL
-            axis2_svc_grp_ctx_get_parent(
-                const axis2_svc_grp_ctx_t *svc_grp_ctx,
-                const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_ctx_free(
-    struct axis2_svc_grp_ctx *svc_grp_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_ctx_init(
-    struct axis2_svc_grp_ctx *svc_grp_ctx,
-    const axis2_env_t *env,
-    axis2_conf_t *conf);
-
-const axis2_char_t *AXIS2_CALL
-axis2_svc_grp_ctx_get_id(
-    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_ctx_set_id(
-    struct axis2_svc_grp_ctx *svc_grp_ctx,
-    const axis2_env_t *env,
-    const axis2_char_t *id);
-
-axis2_svc_ctx_t *AXIS2_CALL
-axis2_svc_grp_ctx_get_svc_ctx(
-    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-    const axis2_env_t *env,
-    const axis2_char_t *svc_name);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_grp_ctx_fill_svc_ctx_map(
-    struct axis2_svc_grp_ctx *svc_grp_ctx,
-    const axis2_env_t *env);
-
-axis2_svc_grp_t *AXIS2_CALL
-axis2_svc_grp_ctx_get_svc_grp(
-    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-    const axis2_env_t *env);
-
-axis2_hash_t *AXIS2_CALL
-axis2_svc_grp_ctx_get_svc_ctx_map(
-    const axis2_svc_grp_ctx_t *svc_grp_ctx,
-    const axis2_env_t *env);
+};
 
 AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
 axis2_svc_grp_ctx_create(
@@ -102,139 +42,97 @@
     axis2_svc_grp_t *svc_grp,
     struct axis2_conf_ctx *conf_ctx)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
+    axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_grp_ctx_impl = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_ctx_impl_t));
-    if (!svc_grp_ctx_impl)
+    svc_grp_ctx = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_ctx_t));
+    if (!svc_grp_ctx)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    svc_grp_ctx_impl->svc_grp_ctx.ops = NULL;
-    svc_grp_ctx_impl->base = NULL;
-    svc_grp_ctx_impl->parent = NULL;
-    svc_grp_ctx_impl->id = NULL;
-    svc_grp_ctx_impl->svc_ctx_map = NULL;
-    svc_grp_ctx_impl->svc_grp = NULL;
-    svc_grp_ctx_impl->svc_grp_name = NULL;
+    svc_grp_ctx->base = NULL;
+    svc_grp_ctx->parent = NULL;
+    svc_grp_ctx->id = NULL;
+    svc_grp_ctx->svc_ctx_map = NULL;
+    svc_grp_ctx->svc_grp = NULL;
+    svc_grp_ctx->svc_grp_name = NULL;
 
 
-    svc_grp_ctx_impl->base = axis2_ctx_create(env);
-    if (!(svc_grp_ctx_impl->base))
+    svc_grp_ctx->base = axis2_ctx_create(env);
+    if (!(svc_grp_ctx->base))
     {
-        axis2_svc_grp_ctx_free(&(svc_grp_ctx_impl->svc_grp_ctx), env);
+        axis2_svc_grp_ctx_free(svc_grp_ctx, env);
         return NULL;
     }
 
     if (svc_grp)
     {
-        svc_grp_ctx_impl->svc_grp = svc_grp;
-        svc_grp_ctx_impl->svc_grp_name = (axis2_char_t *)AXIS2_SVC_GRP_GET_NAME(svc_grp_ctx_impl->svc_grp, env);
+        svc_grp_ctx->svc_grp = svc_grp;
+        svc_grp_ctx->svc_grp_name = (axis2_char_t *)AXIS2_SVC_GRP_GET_NAME(svc_grp_ctx->svc_grp, env);
     }
 
     if (conf_ctx)
     {
-        svc_grp_ctx_impl->parent = conf_ctx;
+        svc_grp_ctx->parent = conf_ctx;
     }
 
-    svc_grp_ctx_impl->svc_ctx_map = axis2_hash_make(env);
-    if (!(svc_grp_ctx_impl->svc_ctx_map))
+    svc_grp_ctx->svc_ctx_map = axis2_hash_make(env);
+    if (!(svc_grp_ctx->svc_ctx_map))
     {
-        axis2_svc_grp_ctx_free(&(svc_grp_ctx_impl->svc_grp_ctx), env);
+        axis2_svc_grp_ctx_free(svc_grp_ctx, env);
         return NULL;
     }
 
-    axis2_svc_grp_ctx_fill_svc_ctx_map((&(svc_grp_ctx_impl->svc_grp_ctx)), env);
-
-    /* initialize ops */
-
-    svc_grp_ctx_impl->svc_grp_ctx.ops  = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_ctx_ops_t));
-    if (!svc_grp_ctx_impl->svc_grp_ctx.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_svc_grp_ctx_free(&(svc_grp_ctx_impl->svc_grp_ctx), env);
-        return NULL;
-    }
+    axis2_svc_grp_ctx_fill_svc_ctx_map((svc_grp_ctx), env);
 
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_base =
-        axis2_svc_grp_ctx_get_base;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_parent =
-        axis2_svc_grp_ctx_get_parent;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->free =
-        axis2_svc_grp_ctx_free;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->init =
-        axis2_svc_grp_ctx_init;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_id =
-        axis2_svc_grp_ctx_get_id;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->set_id =
-        axis2_svc_grp_ctx_set_id;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_svc_ctx =
-        axis2_svc_grp_ctx_get_svc_ctx;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->fill_svc_ctx_map =
-        axis2_svc_grp_ctx_fill_svc_ctx_map;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_svc_grp =
-        axis2_svc_grp_ctx_get_svc_grp;
-    svc_grp_ctx_impl->svc_grp_ctx.ops->get_svc_ctx_map =
-        axis2_svc_grp_ctx_get_svc_ctx_map;
-
-    return &(svc_grp_ctx_impl->svc_grp_ctx);
+    return svc_grp_ctx;
 }
 
-axis2_ctx_t *AXIS2_CALL
+AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL
 axis2_svc_grp_ctx_get_base(
     const axis2_svc_grp_ctx_t *svc_grp_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->base;
+    return svc_grp_ctx->base;
 }
 
-struct axis2_conf_ctx *AXIS2_CALL
+AXIS2_EXTERN struct axis2_conf_ctx *AXIS2_CALL
             axis2_svc_grp_ctx_get_parent(
                 const axis2_svc_grp_ctx_t *svc_grp_ctx,
                 const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->parent;
+    return svc_grp_ctx->parent;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_ctx_free(
     struct axis2_svc_grp_ctx *svc_grp_ctx,
     const axis2_env_t *env)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_grp_ctx_impl = AXIS2_INTF_TO_IMPL(svc_grp_ctx);
-
-    if (svc_grp_ctx_impl->svc_grp_ctx.ops)
+    if (svc_grp_ctx->id)
     {
-        AXIS2_FREE(env->allocator, svc_grp_ctx_impl->svc_grp_ctx.ops);
-        svc_grp_ctx_impl->svc_grp_ctx.ops = NULL;
+        AXIS2_FREE(env->allocator, svc_grp_ctx->id);
+        svc_grp_ctx->id = NULL;
     }
 
-    if (svc_grp_ctx_impl->id)
+    if (svc_grp_ctx->base)
     {
-        AXIS2_FREE(env->allocator, svc_grp_ctx_impl->id);
-        svc_grp_ctx_impl->id = NULL;
+        AXIS2_CTX_FREE(svc_grp_ctx->base, env);
+        svc_grp_ctx->base = NULL;
     }
 
-    if (svc_grp_ctx_impl->base)
-    {
-        AXIS2_CTX_FREE(svc_grp_ctx_impl->base, env);
-        svc_grp_ctx_impl->base = NULL;
-    }
-
-    if (svc_grp_ctx_impl->svc_ctx_map)
+    if (svc_grp_ctx->svc_ctx_map)
     {
         axis2_hash_index_t *hi = NULL;
         void *val = NULL;
-        for (hi = axis2_hash_first(svc_grp_ctx_impl->svc_ctx_map, env);
+        for (hi = axis2_hash_first(svc_grp_ctx->svc_ctx_map, env);
                 hi; hi = axis2_hash_next(env, hi))
         {
             axis2_hash_this(hi, NULL, NULL, &val);
@@ -246,103 +144,88 @@
             }
         }
 
-        axis2_hash_free(svc_grp_ctx_impl->svc_ctx_map, env);
-        svc_grp_ctx_impl->base = NULL;
+        axis2_hash_free(svc_grp_ctx->svc_ctx_map, env);
+        svc_grp_ctx->base = NULL;
     }
 
-    AXIS2_FREE(env->allocator, svc_grp_ctx_impl);
-    svc_grp_ctx_impl = NULL;
+    AXIS2_FREE(env->allocator, svc_grp_ctx);
+    svc_grp_ctx = NULL;
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_ctx_init(
     struct axis2_svc_grp_ctx *svc_grp_ctx,
     const axis2_env_t *env,
     axis2_conf_t *conf)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_grp_ctx_impl = AXIS2_INTF_TO_IMPL(svc_grp_ctx);
-
-    if (svc_grp_ctx_impl->svc_grp_name)
+    if (svc_grp_ctx->svc_grp_name)
     {
-        svc_grp_ctx_impl->svc_grp =
-            AXIS2_CONF_GET_SVC_GRP(conf, env, svc_grp_ctx_impl->svc_grp_name);
+        svc_grp_ctx->svc_grp =
+            AXIS2_CONF_GET_SVC_GRP(conf, env, svc_grp_ctx->svc_grp_name);
     }
 
     return AXIS2_SUCCESS;
 }
 
-const axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
 axis2_svc_grp_ctx_get_id(
     const axis2_svc_grp_ctx_t *svc_grp_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->id;
+    return svc_grp_ctx->id;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_ctx_set_id(
     struct axis2_svc_grp_ctx *svc_grp_ctx,
     const axis2_env_t *env,
     const axis2_char_t *id)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_grp_ctx_impl = AXIS2_INTF_TO_IMPL(svc_grp_ctx);
-
-    if (svc_grp_ctx_impl->id)
+    if (svc_grp_ctx->id)
     {
-        AXIS2_FREE(env->allocator, svc_grp_ctx_impl->id);
-        svc_grp_ctx_impl->id = NULL;
+        AXIS2_FREE(env->allocator, svc_grp_ctx->id);
+        svc_grp_ctx->id = NULL;
     }
 
     if (id)
     {
-        svc_grp_ctx_impl->id = AXIS2_STRDUP(id, env);
+        svc_grp_ctx->id = AXIS2_STRDUP(id, env);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_svc_ctx_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
 axis2_svc_grp_ctx_get_svc_ctx(
     const axis2_svc_grp_ctx_t *svc_grp_ctx,
     const axis2_env_t *env,
     const axis2_char_t *svc_name)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_grp_ctx_impl = AXIS2_INTF_TO_IMPL(svc_grp_ctx);
-
-    return (axis2_svc_ctx_t *) axis2_hash_get(svc_grp_ctx_impl->svc_ctx_map, svc_name, AXIS2_HASH_KEY_STRING);
+    return (axis2_svc_ctx_t *) axis2_hash_get(svc_grp_ctx->svc_ctx_map, svc_name, AXIS2_HASH_KEY_STRING);
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_grp_ctx_fill_svc_ctx_map(
     struct axis2_svc_grp_ctx *svc_grp_ctx,
     const axis2_env_t *env)
 {
-    axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
     axis2_hash_index_t *hi = NULL;
     void *next_svc = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_SUCCESS);
 
-    svc_grp_ctx_impl = AXIS2_INTF_TO_IMPL(svc_grp_ctx);
-
-    if (svc_grp_ctx_impl->svc_grp)
+    if (svc_grp_ctx->svc_grp)
     {
-        axis2_hash_t *service_map = AXIS2_SVC_GRP_GET_ALL_SVCS(svc_grp_ctx_impl->svc_grp, env);
+        axis2_hash_t *service_map = AXIS2_SVC_GRP_GET_ALL_SVCS(svc_grp_ctx->svc_grp, env);
         if (service_map)
         {
             for (hi = axis2_hash_first(service_map, env);
@@ -358,7 +241,7 @@
                     svc_ctx = axis2_svc_ctx_create(env, svc, svc_grp_ctx);
                     svc_name = AXIS2_QNAME_GET_LOCALPART(AXIS2_SVC_GET_QNAME(svc, env), env);
                     if (svc_name)
-                        axis2_hash_set(svc_grp_ctx_impl->svc_ctx_map, svc_name, AXIS2_HASH_KEY_STRING, svc_ctx);
+                        axis2_hash_set(svc_grp_ctx->svc_ctx_map, svc_name, AXIS2_HASH_KEY_STRING, svc_ctx);
                 }
             }
         }
@@ -366,20 +249,20 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_svc_grp_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
 axis2_svc_grp_ctx_get_svc_grp(
     const axis2_svc_grp_ctx_t *svc_grp_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->svc_grp;
+    return svc_grp_ctx->svc_grp;
 }
 
-axis2_hash_t *AXIS2_CALL
+AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
 axis2_svc_grp_ctx_get_svc_ctx_map(
     const axis2_svc_grp_ctx_t *svc_grp_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->svc_ctx_map;
+    return svc_grp_ctx->svc_ctx_map;
 }



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