axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r428345 - in /webservices/axis2/trunk/c: include/axis2_stub.h modules/core/clientapi/stub.c
Date Thu, 03 Aug 2006 11:22:25 GMT
Author: samisa
Date: Thu Aug  3 04:22:25 2006
New Revision: 428345

URL: http://svn.apache.org/viewvc?rev=428345&view=rev
Log:
More fixes in the lines of doc comments better API

Modified:
    webservices/axis2/trunk/c/include/axis2_stub.h
    webservices/axis2/trunk/c/modules/core/clientapi/stub.c

Modified: webservices/axis2/trunk/c/include/axis2_stub.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_stub.h?rev=428345&r1=428344&r2=428345&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_stub.h (original)
+++ webservices/axis2/trunk/c/include/axis2_stub.h Thu Aug  3 04:22:25 2006
@@ -19,14 +19,14 @@
 
 /** @defgroup axis2_stub stub
  * @ingroup axis2_client_api
- * description
+ * stub is a wrapper API for service client that helps users to use client API 
+ * easily. 
+ * @sa axis2_svc_client
  * @{
  */
 
 /**
  * @file axis2_stub.h
- * @brief Axis2c service skeleton that should be implemented by actual service
- * wrappers
  */
 
 #include <axis2_endpoint_ref.h>
@@ -35,9 +35,9 @@
 #include <axiom_xml_reader.h>
 #include <axis2_property.h>
 
-/** definition soap 11 */
+/** Constant value representing SOAP version 1.1 */
 #define AXIOM_SOAP_11 0
-/** definition soap 12 */
+/** Constant value representing SOAP version 1.2 */
 #define AXIOM_SOAP_12 1
 
 #ifdef __cplusplus
@@ -51,28 +51,30 @@
     typedef struct axis2_stub axis2_stub_t;
 
     /**
-     * service client ops struct.
+     * stub ops struct.
      * Encapsulator struct for operations of axis2_svc_client
      */
-
     AXIS2_DECLARE_DATA struct axis2_stub_ops
     {
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-	 */
+         * Frees stub struct.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 free)(
                     axis2_stub_t *stub,
                     const axis2_env_t *env);
 
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 * @param enpoint_ref pointer to enpoint reference
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-	 */
+         * Sets the endpont reference.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @param enpoint_ref pointer to enpoint reference. stub assumes the 
+         * ownership of the endpoint reference struct
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 set_endpoint_ref)(
                     axis2_stub_t *stub,
@@ -80,78 +82,88 @@
                     axis2_endpoint_ref_t *endpoint_ref);
 
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 * @param enpoint_uri pointer to endpoint uri
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-	 */
+         * Sets the endpoint reference, represented by a string.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @param enpoint_uri pointer to endpoint uri string
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 set_endpoint_uri)(
                     axis2_stub_t *stub,
                     const axis2_env_t *env,
-                    axis2_char_t *endpoint_uri);
+                    const axis2_char_t *endpoint_uri);
 
 
         /**
+         * Sets the bool value specifying whether to use a separate listener 
+         * for recieve channel.
          * @param stub pointer to stub struct
          * @param env pointer to environment struct
-	 * @param use_seperate listener 
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         * @param use_separate whether to use a separate listener
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
          */
         axis2_status_t (AXIS2_CALL *
-                set_use_seperate_listener)(
+                set_use_separate_listener)(
                     axis2_stub_t *stub,
                     const axis2_env_t *env,
-                    axis2_bool_t use_separate_listener);
+                    const axis2_bool_t use_separate_listener);
 
         /**
+         * Sets the SOAP version.
          * @param stub pointer to stub struct
          * @param env pointer to environment struct
-	 * @param soap_version
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         * @param soap_version int value representing the SOAP version 
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
          */
         axis2_status_t (AXIS2_CALL *
                 set_soap_version)(
                     axis2_stub_t *stub,
                     const axis2_env_t *env,
-                    int soap_version);
+                    const int soap_version);
 
 
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 */
-        axis2_char_t *(AXIS2_CALL *
+         * Gets the service context ID.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @return service context ID if set, else NULL
+         */
+        const axis2_char_t *(AXIS2_CALL *
                 get_svc_ctx_id)(
                     const axis2_stub_t *stub,
                     const axis2_env_t *env);
 
-
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 * @param module_name pointer to module_name struct
-	 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-	 */
+         * Engages the named module.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @param module_name string representing the name of the module
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
         axis2_status_t (AXIS2_CALL *
                 engage_module)(
                     axis2_stub_t *stub,
                     const axis2_env_t *env,
-                    axis2_char_t *module_name);
+                    const axis2_char_t *module_name);
 
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 */
+         * Gets the service client instance used by this stub.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @return pointer to service client struct used by the stub
+         */
         axis2_svc_client_t *(AXIS2_CALL *
                 get_svc_client)(
                     const axis2_stub_t *stub,
                     const axis2_env_t *env);
 
         /**
-	 * @param stub pointer to stub struct
-	 * @param env pointer to environment struct
-	 */
+         * Gets the options used on top of the service client used by this stub.
+         * @param stub pointer to stub struct
+         * @param env pointer to environment struct
+         * @return pointer to options used by the service client of this stub
+         */
         axis2_options_t *(AXIS2_CALL *
                 get_options)(
                     const axis2_stub_t *stub,
@@ -159,80 +171,90 @@
 
     } ;
 
+    /**
+     * stub struct. 
+     */
     AXIS2_DECLARE_DATA struct axis2_stub
     {
+        /** operations of stub */
         axis2_stub_ops_t *ops;
     };
 
     /**
-     * Creates axis2_stub struct
-     * @param endpoint reference
+     * Creates a stub instance.
+     * @param env pointer to environment struct
+     * @param endpoint_ref pointer to endpoint reference stuct representing the 
+     * stub endpoint. Newly created stub assumes ownership of the endpoint
+     * @param client_home name of the directory that contains the Axis2/C repository
      * @return pointer to newly created axis2_stub struct
      */
     AXIS2_EXTERN axis2_stub_t * AXIS2_CALL
-    axis2_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env,
-            axis2_endpoint_ref_t *endpoint_ref,
-            const axis2_char_t *client_home);
+    axis2_stub_create_with_endpoint_ref_and_client_home(
+        const axis2_env_t *env,
+        axis2_endpoint_ref_t *endpoint_ref,
+        const axis2_char_t *client_home);
 
     /**
-     * Creates axis2_stub struct
-     * @param endpoint uri
+     * Creates a stub instance.
+     * @param env pointer to environment struct
+     * @param endpoint_uri string representing the endpoint reference 
+     * @param client_home name of the directory that contains the Axis2/C repository
      * @return pointer to newly created axis2_stub struct
      */
     AXIS2_EXTERN axis2_stub_t * AXIS2_CALL
-    axis2_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env,
-            const axis2_char_t *endpoint_uri,
-            const axis2_char_t *client_home);
+    axis2_stub_create_with_endpoint_uri_and_client_home(
+        const axis2_env_t *env,
+        const axis2_char_t *endpoint_uri,
+        const axis2_char_t *client_home);
 
-/*************************** Function macros **********************************/
 
 /** Frees the axis2 stub.
     @sa axis2_stub_ops#free */
 #define AXIS2_STUB_FREE(stub, env) \
       ((stub)->ops->free (stub, env))
 
-/** Sets the end point reference.
+/** Sets the endpoint reference.
     @sa axis2_stub_ops#set_endpoint_ref*/
 #define AXIS2_STUB_SET_ENDPOINT_REF(stub, env, endpoint_ref) \
       ((stub)->ops->set_endpoint_ref (stub, env, endpoint_ref))
 
-/** Sets the end point uri.
+/** Sets the endpoint uri.
     @sa axis2_stub_ops#set_endpoint_uri*/
 #define AXIS2_STUB_SET_ENDPOINT_URI(stub, env, endpoint_uri) \
       ((stub)->ops->set_endpoint_uri (stub, env, endpoint_uri))
 
-/** Sets the use seperate listener.
-    @sa axis2_stub_ops#set_use_seperate_listener*/
+/** Sets bool value indicating whether to use a separate listener.
+    @sa axis2_stub_ops#set_use_separate_listener*/
 #define AXIS2_STUB_SET_USE_SEPERATE_LISTENER(stub, env, use_separate_listener) \
-      ((stub)->ops->set_transport_info (stub, env, use_separate_listener))
+      ((stub)->ops->set_use_separate_listener (stub, env, use_separate_listener))
 
 /** Engages the module.
     @sa axis2_stub_ops#engage_module*/
 #define AXIS2_STUB_ENGAGE_MODULE(stub, env, module_name) \
       ((stub)->ops->engage_module (stub, env, module_name))
 
-/** Sets the soap version.
+/** Sets the SOAP version.
     @sa axis2_stub_ops#set_soap_version*/
 #define AXIS2_STUB_SET_SOAP_VERSION(stub, env, soap_version) \
       ((stub)->ops->set_soap_version (stub, env, soap_version))
 
-/** Gets the service context id
+/** Gets the service context id.
     @sa axis2_stub_ops#get_svc_ctx_id*/
 #define AXIS2_STUB_GET_SVC_CTX_ID(stub, env) \
       ((stub)->ops->get_svc_ctx_id (stub, env))
 
-/** Gets the service client
+/** Gets the service client that this stub wraps.
     @sa axis2_stub_ops#get_svc_client*/
 #define AXIS2_STUB_GET_SVC_CLIENT(stub, env) \
       ((stub)->ops->get_svc_client(stub, env))
 
-/** Gets the options
+/** Gets the options used by service client wrapped by this stub.
     @sa axis2_stub_ops#get_options*/
 #define AXIS2_STUB_GET_OPTIONS(stub, env) \
       ((stub)->ops->get_options(stub, env))
 
 
-    /** @} */
+/** @} */
 
 #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=428345&r1=428344&r2=428345&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Thu Aug  3 04:22:25 2006
@@ -45,13 +45,13 @@
 axis2_status_t AXIS2_CALL
 axis2_stub_set_endpoint_uri (axis2_stub_t *stub,
                                 const axis2_env_t *env,
-                                axis2_char_t *endpoint_uri);
+                                const axis2_char_t *endpoint_uri);
                         
 /**
  * @param use_separate_transport
  */
 axis2_status_t AXIS2_CALL 
-axis2_stub_set_use_seperate_listener(axis2_stub_t *stub,
+axis2_stub_set_use_separate_listener(axis2_stub_t *stub,
                                 const axis2_env_t *env,
                                 axis2_bool_t use_separate_listener);
 
@@ -59,7 +59,7 @@
 axis2_status_t AXIS2_CALL
 axis2_stub_engage_module(axis2_stub_t *stub,
                             const axis2_env_t *env,
-                            axis2_char_t *module_name);
+                            const axis2_char_t *module_name);
 
 /**
  * Set the soap version
@@ -71,7 +71,7 @@
                             int soap_version);
 
 
-axis2_char_t *AXIS2_CALL
+const axis2_char_t *AXIS2_CALL
 axis2_stub_get_svc_ctx_id(const axis2_stub_t *stub,
                             const axis2_env_t *env);
 
@@ -117,7 +117,7 @@
     stub_impl->stub.ops->free = axis2_stub_free;
     stub_impl->stub.ops->set_endpoint_ref = axis2_stub_set_endpoint_ref;
     stub_impl->stub.ops->set_endpoint_uri = axis2_stub_set_endpoint_uri;
-    stub_impl->stub.ops->set_use_seperate_listener = axis2_stub_set_use_seperate_listener;
+    stub_impl->stub.ops->set_use_separate_listener = axis2_stub_set_use_separate_listener;
     stub_impl->stub.ops->engage_module = axis2_stub_engage_module;
     stub_impl->stub.ops->set_soap_version = axis2_stub_set_soap_version;
     stub_impl->stub.ops->get_svc_ctx_id = axis2_stub_get_svc_ctx_id;
@@ -252,7 +252,7 @@
 axis2_status_t AXIS2_CALL
 axis2_stub_set_endpoint_uri (axis2_stub_t *stub,
                                 const axis2_env_t *env,
-                                axis2_char_t *endpoint_uri)
+                                const axis2_char_t *endpoint_uri)
 {
     axis2_stub_impl_t *stub_impl = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
@@ -275,7 +275,7 @@
  * @param use_separate_transport
  */
 axis2_status_t AXIS2_CALL
-axis2_stub_set_use_seperate_listener(axis2_stub_t *stub,
+axis2_stub_set_use_separate_listener(axis2_stub_t *stub,
                                 const axis2_env_t *env,
                                 axis2_bool_t use_separate_listener)
 {
@@ -292,7 +292,7 @@
 axis2_status_t AXIS2_CALL
 axis2_stub_engage_module(axis2_stub_t *stub,
                             const axis2_env_t *env,
-                            axis2_char_t *module_name)
+                            const axis2_char_t *module_name)
 {
     axis2_stub_impl_t *stub_impl = NULL;
     
@@ -325,7 +325,7 @@
                                  env, soap_version );
 }
 
-axis2_char_t *AXIS2_CALL
+const axis2_char_t *AXIS2_CALL
 axis2_stub_get_svc_ctx_id(const axis2_stub_t *stub,
                             const axis2_env_t *env)
 {



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