[haiku-commits] haiku: hrev46233 - headers/os/net src/kits/network/libnetapi

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 15 Oct 2013 10:16:40 +0200 (CEST)

hrev46233 adds 1 changeset to branch 'master'
old head: 8035a8406cb4c1b0d73f265819961630610fb08c
new head: f6f14c5d1c0464f34a1a7637c1a9c356df4172aa
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=f6f14c5+%5E8035a84

----------------------------------------------------------------------------

f6f14c5: Make BUrlProtocolAsynchronousListener inherit BUrlProtocolListener
  
   * With so long class names, there's no way I'm going to follow the 64
  char limit on commit headlines.
   * The class share the same API, so having them separate is not very
  useful.
   * This makes it possible to use the same listener in either synchronous
  or asycnhronous mode (or both, for different requests)

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46233
Commit:      f6f14c5d1c0464f34a1a7637c1a9c356df4172aa
URL:         http://cgit.haiku-os.org/haiku/commit/?id=f6f14c5
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Tue Oct 15 08:11:59 2013 UTC

----------------------------------------------------------------------------

2 files changed, 3 insertions(+), 66 deletions(-)
headers/os/net/UrlProtocolAsynchronousListener.h | 17 +------
.../UrlProtocolAsynchronousListener.cpp          | 52 +-------------------

----------------------------------------------------------------------------

diff --git a/headers/os/net/UrlProtocolAsynchronousListener.h 
b/headers/os/net/UrlProtocolAsynchronousListener.h
index 37b616f..910cec0 100644
--- a/headers/os/net/UrlProtocolAsynchronousListener.h
+++ b/headers/os/net/UrlProtocolAsynchronousListener.h
@@ -11,26 +11,13 @@
 #include <UrlProtocolDispatchingListener.h>
 
 
-class BUrlProtocolAsynchronousListener : public BHandler {
+class BUrlProtocolAsynchronousListener : public BHandler,
+       public BUrlProtocolListener {
 public:
                                                                
BUrlProtocolAsynchronousListener(
                                                                        bool 
transparent = false);
        virtual                                         
~BUrlProtocolAsynchronousListener();
 
-       virtual void                            ConnectionOpened(BUrlRequest* 
caller);
-       virtual void                            HostnameResolved(BUrlRequest* 
caller,
-                                                                       const 
char* ip);
-       virtual void                            ResponseStarted(BUrlRequest* 
caller);
-       virtual void                            HeadersReceived(BUrlRequest* 
caller);
-       virtual void                            DataReceived(BUrlRequest* 
caller,
-                                                                       const 
char* data, ssize_t size);
-       virtual void                            DownloadProgress(BUrlRequest* 
caller,
-                                                                       ssize_t 
bytesReceived, ssize_t bytesTotal);
-       virtual void                            UploadProgress(BUrlRequest* 
caller,
-                                                                       ssize_t 
bytesSent, ssize_t bytesTotal);
-       virtual void                            RequestCompleted(BUrlRequest* 
caller,
-                                                                       bool 
success);
-                                                                       
        // Synchronous listener access
                        BUrlProtocolListener* SynchronousListener();
                                                                        
diff --git a/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp 
b/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp
index b577d56..b91d0fb 100644
--- a/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp
+++ b/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp
@@ -20,6 +20,7 @@ 
BUrlProtocolAsynchronousListener::BUrlProtocolAsynchronousListener(
        bool transparent) 
        :
        BHandler("UrlProtocolAsynchronousListener"),
+       BUrlProtocolListener(),
        fSynchronousListener(NULL)
 {
        if (be_app->Lock()) {
@@ -45,57 +46,6 @@ 
BUrlProtocolAsynchronousListener::~BUrlProtocolAsynchronousListener()
 }
 
 
-void
-BUrlProtocolAsynchronousListener::ConnectionOpened(BUrlRequest*)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::HostnameResolved(BUrlRequest*, const char*)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::ResponseStarted(BUrlRequest*)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::HeadersReceived(BUrlRequest*)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::DataReceived(BUrlRequest*, const char*,
-       ssize_t)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::DownloadProgress(BUrlRequest*, ssize_t,
-       ssize_t)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::UploadProgress(BUrlRequest*, ssize_t,
-       ssize_t)
-{
-}
-
-
-void
-BUrlProtocolAsynchronousListener::RequestCompleted(BUrlRequest*, bool)
-{
-}
-
-
 // #pragma mark Synchronous listener access
 
 


Other related posts: