ws-axis-cvs mailing list archives

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

URL: http://svn.apache.org/viewcvs?rev=391575&view=rev
Log:
Added the ability for user to define an error function on callback
AXIS2C-119

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=391575&r1=391574&r2=391575&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_callback.h (original)
+++ webservices/axis2/trunk/c/include/axis2_callback.h Wed Apr  5 02:24:15 2006
@@ -59,7 +59,7 @@
         				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
+     * Users could provide this method so that they can define what to be done
      * when the callback returns on completion 
      */
     axis2_status_t (AXIS2_CALL *
@@ -75,6 +75,15 @@
         		  axis2_env_t **env, 
                   int exception);
     /**
+     * This Method is called by report_error.
+     * Users could provide this method so that they can define what to be done
+     * when the callback returns an error
+     */
+    axis2_status_t (AXIS2_CALL *
+	on_error)(struct axis2_callback *callback, 
+        		  axis2_env_t **env, 
+                  int exception);
+    /**
      * This says has the Async Operation is completed or not. this could be useful for poleing

      * with a special callback written for poleing (checking repeatedly time to time).
      * e.g.
@@ -151,6 +160,9 @@
 
 #define AXIS2_CALLBACK_REPORT_ERROR(callback, env, error) \
 		((callback)->ops->report_error(callback, env, error))
+
+#define AXIS2_CALLBACK_ON_ERROR(callback, env, error) \
+		((callback)->ops->on_error(callback, env, error))
 
 #define AXIS2_CALLBACK_GET_COMPLETE(callback, env)\
 		((callback)->ops->get_complete(callback, env))

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=391575&r1=391574&r2=391575&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:24:15 2006
@@ -48,6 +48,11 @@
                             axis2_env_t **env, 
                             int exception);
                             
+axis2_status_t AXIS2_CALL 
+axis2_callback_on_error(struct axis2_callback *callback, 
+                            axis2_env_t **env, 
+                            int exception);
+                            
 axis2_bool_t AXIS2_CALL 
 axis2_callback_get_complete(struct axis2_callback *callback, 
                             axis2_env_t **env);
@@ -118,6 +123,9 @@
     callback_impl->callback.ops->report_error = 
         axis2_callback_report_error;
         
+    callback_impl->callback.ops->on_error = 
+        axis2_callback_on_error;
+        
     callback_impl->callback.ops->get_complete = 
         axis2_callback_get_complete;
         
@@ -158,7 +166,8 @@
                             axis2_env_t **env, 
                             int exception)
 {
-    return axis2_callback_set_error(callback, env, exception);
+    axis2_callback_set_error(callback, env, exception);
+    return AXIS2_CALLBACK_ON_ERROR(callback, env, exception);
 }
 
 axis2_bool_t AXIS2_CALL 
@@ -242,4 +251,12 @@
 {
     return AXIS2_SUCCESS;
 }
-                                  
+
+axis2_status_t AXIS2_CALL 
+axis2_callback_on_error(struct axis2_callback *callback, 
+                            axis2_env_t **env, 
+                            int exception)
+{
+    return AXIS2_SUCCESS;
+}
+



Mime
View raw message