Author: jbevain
Date: 2007-11-09 08:14:24 -0500 (Fri, 09 Nov 2007)
New Revision: 89312

Modified:
   trunk/moon/plugin/ChangeLog
   trunk/moon/plugin/browser-http.cpp
   trunk/moon/plugin/browser-http.h
Log:
2007-11-09  Jb Evain  <[EMAIL PROTECTED]>

        * browser-http.cpp|h: make browser_http_request_get_async_response
        return a boolean.




Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-11-09 12:59:54 UTC (rev 89311)
+++ trunk/moon/plugin/ChangeLog 2007-11-09 13:14:24 UTC (rev 89312)
@@ -1,3 +1,9 @@
+2007-11-09  Jb Evain  <[EMAIL PROTECTED]>
+
+       * browser-http.cpp|h: make browser_http_request_get_async_response
+       return a boolean.
+
+
 2007-11-08  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * plugin.cpp (PluginInstance::Properties): Spice this bad boy up.

Modified: trunk/moon/plugin/browser-http.cpp
===================================================================
--- trunk/moon/plugin/browser-http.cpp  2007-11-09 12:59:54 UTC (rev 89311)
+++ trunk/moon/plugin/browser-http.cpp  2007-11-09 13:14:24 UTC (rev 89312)
@@ -211,13 +211,15 @@
        return new SyncBrowserHttpResponse (channel, input);
 }
 
-void
+bool
 BrowserHttpRequest::GetAsyncResponse (AsyncResponseAvailableHandler handler, 
gpointer context)
 {
+       nsresult rs = NS_OK;
        AsyncBrowserHttpResponse *response;
 
        response = new AsyncBrowserHttpResponse (channel, handler, context);
-       channel->AsyncOpen (response, (BrowserHttpResponse *) response);
+       rs = channel->AsyncOpen (response, (BrowserHttpResponse *) response);
+       return !NS_FAILED (rs);
 }
 
 void
@@ -294,10 +296,10 @@
        return request->GetResponse ();
 }
 
-void
+bool
 browser_http_request_get_async_response (BrowserHttpRequest *request, 
AsyncResponseAvailableHandler handler, gpointer context)
 {
-       request->GetAsyncResponse (handler, context);
+       return request->GetAsyncResponse (handler, context);
 }
 
 void

Modified: trunk/moon/plugin/browser-http.h
===================================================================
--- trunk/moon/plugin/browser-http.h    2007-11-09 12:59:54 UTC (rev 89311)
+++ trunk/moon/plugin/browser-http.h    2007-11-09 13:14:24 UTC (rev 89312)
@@ -136,7 +136,7 @@
 
        void Abort ();
        BrowserHttpResponse *GetResponse ();
-       void GetAsyncResponse (AsyncResponseAvailableHandler handler, gpointer 
context);
+       bool GetAsyncResponse (AsyncResponseAvailableHandler handler, gpointer 
context);
        void SetHttpHeader (const char *name, const char *value);
        void SetBody (const char *body, int size);
 };
@@ -149,7 +149,7 @@
 void browser_http_request_set_header (BrowserHttpRequest *request, const char 
*name, const char *value);
 void browser_http_request_set_body (BrowserHttpRequest *request, const char 
*body, int size);
 BrowserHttpResponse *browser_http_request_get_response (BrowserHttpRequest 
*request);
-void browser_http_request_get_async_response (BrowserHttpRequest *request, 
AsyncResponseAvailableHandler handler, gpointer context);
+bool browser_http_request_get_async_response (BrowserHttpRequest *request, 
AsyncResponseAvailableHandler handler, gpointer context);
 void *browser_http_response_read (BrowserHttpResponse *response, int *size);
 void browser_http_response_visit_headers (BrowserHttpResponse *response, 
HttpHeaderHandler handler);
 char *browser_http_response_get_status (BrowserHttpResponse *response, int 
*code);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to