axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r433165 - in /webservices/axis2/trunk/c: include/axis2_svc_ctx.h include/axis2_svc_grp_ctx.h modules/core/context/svc_grp_ctx.c
Date Mon, 21 Aug 2006 06:24:33 GMT
Author: samisa
Date: Sun Aug 20 23:24:31 2006
New Revision: 433165

URL: http://svn.apache.org/viewvc?rev=433165&view=rev
Log:
Fixed doc commenta and improved API

Modified:
    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/svc_grp_ctx.c

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?rev=433165&r1=433164&r2=433165&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_ctx.h Sun Aug 20 23:24:31 2006
@@ -17,7 +17,8 @@
 #ifndef AXIS2_SVC_CTX_H
 #define AXIS2_SVC_CTX_H
 
-/** @defgroup axis2_svc_ctx service context
+/** 
+ * @defgroup axis2_svc_ctx service context
  * @ingroup axis2_context
  * service context represents a running "instance" of a service.
  * service context allows instance of operations belonging to a service to be 

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?rev=433165&r1=433164&r2=433165&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_grp_ctx.h Sun Aug 20 23:24:31 2006
@@ -17,14 +17,17 @@
 #ifndef AXIS2_SVC_GRP_CTX_H
 #define AXIS2_SVC_GRP_CTX_H
 
-/** @defgroup axis2_svc_grp_ctx service group context
+/** 
+ * @defgroup axis2_svc_grp_ctx service group context
  * @ingroup axis2_context
+ * service group context represents a running "instance" of a service group.
+ * service group context allows instance of services belonging to a service
+ * group to be grouped.  
  * @{
  */
 
 /**
  * @file axis2_svc_grp_ctx.h
- * @brief axis2 service group context interface
  */
 
 #include <axis2_defines.h>
@@ -45,14 +48,17 @@
 
 
     /**
-     * service group context ops struct
-     * Encapsulator struct for ops of axis2_svc_grp_ctx
+     * 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)(
@@ -61,8 +67,11 @@
 
 
         /**
+         * 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)(
@@ -71,8 +80,10 @@
 
 
         /**
+         * 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)(
@@ -80,10 +91,13 @@
                     const axis2_env_t *env);
 
         /**
-         * The method is used to do the intialization of the EngineContext
+         * 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 conf
+         * @param conf pointer to configuration
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
          */
         axis2_status_t (AXIS2_CALL *
                 init)(
@@ -91,21 +105,23 @@
                     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_char_t *(AXIS2_CALL *
+        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
-         * @param id pointer to id
+         * @return id service group context ID
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 
          */
         axis2_status_t (AXIS2_CALL *
                 set_id)(
@@ -113,45 +129,48 @@
                     const axis2_env_t *env,
                     const axis2_char_t *id);
 
-
         /** 
-         * if the servic name is foo:bar , you should pass only bar 
+         * Gets named service context.
          * @param svc_grp_ctx pointer to service group context
          * @param env pointer to environment struct
-         * @param svc_name pointer to service name
+         * @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,
-                    axis2_char_t *svc_name);
+                    const axis2_char_t *svc_name);
 
         /**
-         * This will create one service context per each service in descrpition
-         * if service group has 2 service init , then two service contexts will be
-         * created
+         * 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)(
@@ -160,7 +179,7 @@
     };
 
     /**
-     * service group context struct
+     * service group context struct.
      */
     struct axis2_svc_grp_ctx
     {
@@ -170,10 +189,14 @@
 
 
     /**
-     * Creates a service group context struct
+     * Creates a service group context struct.
      * @param env pointer to environment struct
-     * @param svc_grp pointer to service group
-     * @param conf_ctx pointer to configuration context
+     * @param svc_grp pointer to service group that this service context 
+     * represents, service group context does not assume the ownership of the struct
+     * @param conf_ctx pointer to configuration context, the parent context 
+     * of the newly created service group context, service group context does not 
+     * assume the ownership of the struct
+     * @return pointer to newly created service group context
      */
     AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
     axis2_svc_grp_ctx_create(
@@ -181,59 +204,56 @@
         struct axis2_svc_grp *svc_grp,
         struct axis2_conf_ctx *conf_ctx);
 
-/****************** Start of function macros **************************/
 
-/** Gets the base.
+/** Gets base context.
     @sa axis2_grp_ctx_ops#get_base */
 #define AXIS2_SVC_GRP_CTX_GET_BASE(svc_grp_ctx, env) \
       ((svc_grp_ctx)->ops->get_base(svc_grp_ctx, env))
 
-/** Gets the parent.
+/** Gets parent configuration context.
     @sa axis2_grp_ctx_ops#get_parent */
 #define AXIS2_SVC_GRP_CTX_GET_PARENT(svc_grp_ctx, env) \
       ((svc_grp_ctx)->ops->get_parent(svc_grp_ctx, env))
 
-/** Frees the service group context.
+/** Frees service group context.
     @sa axis2_grp_ctx_ops#free */
 #define AXIS2_SVC_GRP_CTX_FREE(svc_grp_ctx, env)\
       ((svc_grp_ctx)->ops->free(svc_grp_ctx, env))
 
-/** Initialize the service group context.
+/** Initializes service group context.
     @sa axis2_grp_ctx_ops#init */
 #define AXIS2_SVC_GRP_CTX_INIT(svc_grp_ctx, env, conf)\
       ((svc_grp_ctx)->ops->init(svc_grp_ctx, env, conf))
 
-/** Gets the id.
+/** Gets ID.
     @sa axis2_grp_ctx_ops#get_id */
 #define AXIS2_SVC_GRP_CTX_GET_ID(svc_grp_ctx, env) \
       ((svc_grp_ctx)->ops->get_id(svc_grp_ctx, env))
 
-/** Set id.
+/** Sets ID.
     @sa axis2_grp_ctx_ops#set id */
 #define AXIS2_SVC_GRP_CTX_SET_ID(svc_grp_ctx, env, id) \
       ((svc_grp_ctx)->ops->set_id(svc_grp_ctx, env, id))
 
-/** Gets the service context.
+/** Gets named service context.
     @sa axis2_grp_ctx_ops#get_svc_ctx */
 #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))
 
-/** Gets the service context map.
+/** Gets service context map.
     @sa axis2_grp_ctx_ops#fill_svc_ctx_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))
 
-/** Gets the service group.
+/** Gets service group related to service group context.
     @sa axis2_grp_ctx_ops#get_svc_grp */
 #define AXIS2_SVC_GRP_GET_SVC_GRP(svc_grp_ctx, env) \
       ((svc_grp_ctx)->ops->get_svc_grp(svc_grp_ctx, env))
 
-/** Gets the service context map.
+/** Gets service context map.
     @sa axis2_grp_ctx_ops#get_svc_ctx_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))
-
-/************************** End of function macros ****************************/
 
 /** @} */
 #ifdef __cplusplus

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?rev=433165&r1=433164&r2=433165&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_grp_ctx.c Sun Aug 20 23:24:31 2006
@@ -29,7 +29,7 @@
     struct axis2_conf_ctx *parent;
     /** service group context ID */
     axis2_char_t *id;
-    /** map of service contexts belonging to this service contecxt group */
+    /** map of service contexts belonging to this service context group */
     axis2_hash_t *svc_ctx_map;
     /** service group associated with this service group context */
     axis2_svc_grp_t *svc_grp;
@@ -47,32 +47,27 @@
     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);
 
-                       
-axis2_char_t *AXIS2_CALL 
+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, 
@@ -83,9 +78,8 @@
 axis2_svc_grp_ctx_get_svc_ctx(
     const axis2_svc_grp_ctx_t *svc_grp_ctx, 
     const axis2_env_t *env,
-    axis2_char_t *svc_name);
+    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, 
@@ -166,31 +160,22 @@
 
     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;
     
@@ -206,7 +191,6 @@
     return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->base;
 }
 
-
 struct axis2_conf_ctx *AXIS2_CALL 
 axis2_svc_grp_ctx_get_parent(
     const axis2_svc_grp_ctx_t *svc_grp_ctx, 
@@ -216,8 +200,6 @@
     return AXIS2_INTF_TO_IMPL(svc_grp_ctx)->parent;
 }
 
-
-
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_ctx_free(
     struct axis2_svc_grp_ctx *svc_grp_ctx, 
@@ -273,9 +255,6 @@
     return AXIS2_SUCCESS;
 }
 
-/**
- * The method is used to do the intialization of the EngineContext
- */
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_ctx_init(
     struct axis2_svc_grp_ctx *svc_grp_ctx, 
@@ -297,8 +276,7 @@
     return AXIS2_SUCCESS;
 }
 
-
-axis2_char_t *AXIS2_CALL 
+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) 
@@ -333,12 +311,11 @@
     return AXIS2_SUCCESS;
 }
 
-/** if the servic name is foo:bar , you should pass only bar */
 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,
-    axis2_char_t *svc_name) 
+    const axis2_char_t *svc_name) 
 {
     axis2_svc_grp_ctx_impl_t *svc_grp_ctx_impl = NULL;
     
@@ -349,11 +326,6 @@
     return (axis2_svc_ctx_t *) axis2_hash_get(svc_grp_ctx_impl->svc_ctx_map, svc_name,
AXIS2_HASH_KEY_STRING);
 }
 
-/**
- * This will create one service context per each service in descrpition
- * if service group has 2 service init , then two service contexts will be
- * created
- */
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_ctx_fill_svc_ctx_map(
     struct axis2_svc_grp_ctx *svc_grp_ctx, 



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