ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r391573 - in /webservices/axis2/trunk/c: include/axis2_callback.h modules/core/clientapi/callback.c
Date Wed, 05 Apr 2006 09:00:30 GMT
Author: samisa
Date: Wed Apr  5 02:00:29 2006
New Revision: 391573

URL: http://svn.apache.org/viewcvs?rev=391573&view=rev
Log:
Added the capability to enable the user to set a callback function to be 
called on completion of callback. AXIS2C-119.
Thnaks to Nabeel for his suggestions

Modified:
    webservices/axis2/trunk/c/include/axis2_callback.h
    webservices/axis2/trunk/c/modules/core/clientapi/callback.c

Modified: webservices/axis2/trunk/c/include/axis2_callback.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_callback.h?rev=391573&r1=391572&r2=391573&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_callback.h (original)
+++ webservices/axis2/trunk/c/include/axis2_callback.h Wed Apr  5 02:00:29 2006
@@ -58,6 +58,14 @@
         				axis2_env_t **env, 
         				axis2_async_result_t *result);
     /**
+     * This Method is called by invoke_on_complete.
+     * Users could provide this method to so that they can define what to be done
+     * when the callback returns on completion 
+     */
+    axis2_status_t (AXIS2_CALL *
+	on_complete)(struct axis2_callback *callback, 
+        				axis2_env_t **env);
+    /**
      * This Method is called by Axis2 once the Async Operation fails and the result returns
      *
      * @param e
@@ -137,6 +145,9 @@
 
 #define AXIS2_CALLBACK_INVOKE_ON_COMPLETE(callback, env, result) \
 		((callback)->ops->invoke_on_complete(callback, env, result))
+
+#define AXIS2_CALLBACK_ON_COMPLETE(callback, env) \
+		((callback)->ops->on_complete(callback, env))
 
 #define AXIS2_CALLBACK_REPORT_ERROR(callback, env, error) \
 		((callback)->ops->report_error(callback, env, error))

Modified: webservices/axis2/trunk/c/modules/core/clientapi/callback.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/callback.c?rev=391573&r1=391572&r2=391573&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/callback.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/callback.c Wed Apr  5 02:00:29 2006
@@ -40,6 +40,10 @@
                                   axis2_async_result_t *result);
                                   
 axis2_status_t AXIS2_CALL 
+axis2_callback_on_complete(struct axis2_callback *callback, 
+                                  axis2_env_t **env);
+                                  
+axis2_status_t AXIS2_CALL 
 axis2_callback_report_error(struct axis2_callback *callback, 
                             axis2_env_t **env, 
                             int exception);
@@ -108,6 +112,9 @@
     callback_impl->callback.ops->invoke_on_complete = 
         axis2_callback_invoke_on_complete;
         
+    callback_impl->callback.ops->on_complete = 
+        axis2_callback_on_complete;
+        
     callback_impl->callback.ops->report_error = 
         axis2_callback_report_error;
         
@@ -141,8 +148,9 @@
                                   axis2_async_result_t *result)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return axis2_callback_set_envelope(callback, env, 
+    axis2_callback_set_envelope(callback, env, 
                 AXIS2_ASYNC_RESULT_GET_ENVELOPE(result, env));
+    return AXIS2_CALLBACK_ON_COMPLETE(callback, env);
 }
 
 axis2_status_t AXIS2_CALL 
@@ -227,3 +235,11 @@
     
     return AXIS2_SUCCESS;
 }
+
+axis2_status_t AXIS2_CALL 
+axis2_callback_on_complete(struct axis2_callback *callback, 
+                                  axis2_env_t **env)
+{
+    return AXIS2_SUCCESS;
+}
+                                  



Mime
View raw message