ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r432980 - in /webservices/axis2/trunk/c: include/axis2_svc_ctx.h modules/core/clientapi/stub.c modules/core/context/svc_ctx.c
Date Sun, 20 Aug 2006 15:45:39 GMT
Author: samisa
Date: Sun Aug 20 08:45:38 2006
New Revision: 432980

URL: http://svn.apache.org/viewvc?rev=432980&view=rev
Log:
Fixed doc comments and API in service context

Modified:
    webservices/axis2/trunk/c/include/axis2_svc_ctx.h
    webservices/axis2/trunk/c/modules/core/clientapi/stub.c
    webservices/axis2/trunk/c/modules/core/context/svc_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=432980&r1=432979&r2=432980&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_ctx.h Sun Aug 20 08:45:38 2006
@@ -19,12 +19,14 @@
 
 /** @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 
+ * grouped. 
  * @{
  */
 
 /**
  * @file axis2_svc_ctx.h
- * @brief axis2 service context interface
  */
 
 #include <axis2_defines.h>
@@ -44,14 +46,16 @@
 
 
     /**
-     * @brief service context ops struct
-     * Encapsulator struct for ops of axis2_svc_ctx
+     * 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)(
@@ -60,8 +64,10 @@
 
 
         /**
+         * 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)(
@@ -70,6 +76,7 @@
 
 
         /**
+         * 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
@@ -81,10 +88,12 @@
 
 
         /**
-         * The method is used to do the intialization of the EngineContext
+         * 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 conf
+         * @param conf pointer to configuration
          * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
          */
         axis2_status_t (AXIS2_CALL *
@@ -93,21 +102,24 @@
                     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 Returns the svc_id.
+         * @return service ID string.
          */
-        axis2_char_t *(AXIS2_CALL *
+        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)(
@@ -115,9 +127,11 @@
                     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
+         * @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 *
@@ -128,8 +142,11 @@
 
 
         /**
+         * 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)(
@@ -138,19 +155,23 @@
 
 
         /**
+         * 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
+         * @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,
-                    axis2_qname_t *qname);
+                    const axis2_qname_t *qname);
     };
 
     /**
-     * service context struct
+     * service context struct.
      */
     struct axis2_svc_ctx
     {
@@ -159,10 +180,15 @@
     };
 
     /** 
-     * Creates a service context struct 
-     * @paraam env pointer to environment struct
-     * @param svc pointer to service
-     * @param svc_grp_ctx pointer to service group context
+     * Creates a service context struct that corresponds to the given service
+     * and with the given parent service group context.
+     * @param env pointer to environment struct
+     * @param svc pointer to service that this service context represents, 
+     * service context does not assume the ownership of service
+     * @param svc_grp_ctx pointer to service group context, the parent of the 
+     * newly created service context. service context does not assume the 
+     * ownership of parent
+     * @return pointer to newly created service context
      */
     AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL 
     axis2_svc_ctx_create(
@@ -170,54 +196,51 @@
         struct axis2_svc *svc,
         struct axis2_svc_grp_ctx *svc_grp_ctx);
 
-/************************** Start of function macros **************************/
 
-/** Gets the base.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Gets base which is of type context.
+    @sa axis2_svc_ctx_ops#get_base */
 #define AXIS2_SVC_CTX_GET_BASE(svc_ctx, env) \
       ((svc_ctx)->ops->get_base(svc_ctx, env))
 
-/** Gets the parent.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Gets parent which is of type service group context.
+    @sa axis2_svc_ctx_ops#get_parent */
 #define AXIS2_SVC_CTX_GET_PARENT(svc_ctx, env) \
       ((svc_ctx)->ops->get_parent(svc_ctx, env))
 
-/** Frees the service context.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Frees service context.
+    @sa axis2_svc_ctx_ops#free */
 #define AXIS2_SVC_CTX_FREE(svc_ctx, env) \
       ((svc_ctx)->ops->free(svc_ctx, env))
 
-/** Initialize the service context.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Initializes service context.
+    @sa axis2_svc_ctx_ops#init */
 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) \
       ((svc_ctx)->ops->init(svc_ctx, env, conf))
 
-/** Gets the service id.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Gets service id of the related service.
+    @sa axis2_svc_ctx_ops#get_svc_id */
 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) \
       ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
 
-/** Gets the service.
+/** Gets service that this service context is an instance of.
     @sa axis2_svc_ctx_ops#get_svc */
 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) \
       ((svc_ctx)->ops->get_svc(svc_ctx, env))
 
-/** Sets the service.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Sets service that this service context is an instance of..
+    @sa axis2_svc_ctx_ops#set_svc */
 #define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
         ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
 
-/** Gets the configuratoin context.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Gets configuration context.
+    @sa axis2_svc_ctx_ops#get_conf_ctx */
 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) \
       ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
 
-/** Creates the operations context.
-    @sa axis2_svc_ctx_ops#get_svc */
+/** Creates operation context for the named service.
+    @sa axis2_svc_ctx_ops#create_op_ctx */
 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) \
       ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
-
-/************************** End of function macros ****************************/
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=432980&r1=432979&r2=432980&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Sun Aug 20 08:45:38 2006
@@ -339,7 +339,7 @@
 {
     axis2_stub_impl_t *stub_impl = NULL;
     const axis2_svc_ctx_t *svc_ctx = NULL;
-    axis2_char_t *svc_ctx_id = NULL;
+    const axis2_char_t *svc_ctx_id = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     stub_impl = AXIS2_INTF_TO_IMPL(stub);

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?rev=432980&r1=432979&r2=432980&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_ctx.c Sun Aug 20 08:45:38 2006
@@ -59,7 +59,7 @@
     const axis2_env_t *env,
     axis2_conf_t *conf);
                    
-axis2_char_t *AXIS2_CALL 
+const axis2_char_t *AXIS2_CALL 
 axis2_svc_ctx_get_svc_id(
     const axis2_svc_ctx_t *svc_ctx, 
     const axis2_env_t *env);
@@ -85,7 +85,7 @@
 axis2_svc_ctx_create_op_ctx(
     struct axis2_svc_ctx *svc_ctx, 
     const axis2_env_t *env, 
-    axis2_qname_t *qname);
+    const axis2_qname_t *qname);
 
 AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
 axis2_svc_ctx_create(
@@ -204,10 +204,6 @@
     return AXIS2_SUCCESS;
 }
 
-
-/**
- * The method is used to do the intialization of the EngineContext
- */
 axis2_status_t AXIS2_CALL 
 axis2_svc_ctx_init(
     struct axis2_svc_ctx *svc_ctx, 
@@ -229,10 +225,7 @@
     return AXIS2_SUCCESS;
 }
 
-/**
- * @return Returns the svc_id.
- */
-axis2_char_t *AXIS2_CALL 
+const axis2_char_t *AXIS2_CALL 
 axis2_svc_ctx_get_svc_id(
     const axis2_svc_ctx_t *svc_ctx, 
     const axis2_env_t *env) 
@@ -286,7 +279,7 @@
 axis2_svc_ctx_create_op_ctx(
     struct axis2_svc_ctx *svc_ctx, 
     const axis2_env_t *env, 
-    axis2_qname_t *qname) 
+    const axis2_qname_t *qname) 
 {
     axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
     axis2_op_t *op = NULL;



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