Provides a handler for BUrlProtocolDispatchingListener. More...
Inherits BHandler, and BPrivate::Network::BUrlProtocolListener.
Public Member Functions | |
BUrlProtocolAsynchronousListener (bool transparent=false) | |
Create a BUrlProtocolAsynchronousListener. More... | |
virtual | ~BUrlProtocolAsynchronousListener () |
Default destructor for BUrlProtocolAsynchronousListener. More... | |
virtual void | MessageReceived (BMessage *message) |
Handle messages that has been received by the associated looper. More... | |
BUrlProtocolListener * | SynchronousListener () |
The synchronous listener created from the current object. More... | |
![]() | |
BHandler (const char *name=NULL) | |
Construct a new handler with a name. More... | |
virtual | ~BHandler () |
Free the filters of this handler, as well as the list of observers. More... | |
virtual status_t | Perform (perform_code d, void *arg) |
Perform some action (Internal method defined for binary compatibility purposes). | |
BHandler (BMessage *data) | |
Construct a handler from an archived message. More... | |
virtual status_t | Archive (BMessage *data, bool deep=true) const |
Archive a handler to a message. More... | |
BLooper * | Looper () const |
Return a pointer to the looper that this handler is associated with. More... | |
void | SetName (const char *name) |
Set or change the name of this handler. More... | |
const char * | Name () const |
Return the name of this handler. More... | |
virtual void | SetNextHandler (BHandler *handler) |
Set the next handler in the chain that the message is passed on to if this handler cannot process it. More... | |
BHandler * | NextHandler () const |
Return the next hander in the chain to which the message is passed on. More... | |
virtual void | AddFilter (BMessageFilter *filter) |
Add filter as a prerequisite to this handler. More... | |
virtual bool | RemoveFilter (BMessageFilter *filter) |
Remove filter from the filter list. More... | |
virtual void | SetFilterList (BList *filters) |
Set the internal list of filters to filters. More... | |
BList * | FilterList () |
Return a pointer to the list of filters. More... | |
bool | LockLooper () |
Lock the looper associated with this handler. More... | |
status_t | LockLooperWithTimeout (bigtime_t timeout) |
Lock the looper associated with this handler, with a time out value. More... | |
void | UnlockLooper () |
Unlock the looper. More... | |
virtual BHandler * | ResolveSpecifier (BMessage *message, int32 index, BMessage *specifier, int32 what, const char *property) |
Determine the proper handler for a scripting message. More... | |
virtual status_t | GetSupportedSuites (BMessage *data) |
Reports the suites of messages and specifiers that derived classes understand. More... | |
status_t | StartWatching (BMessenger target, uint32 what) |
Subscribe this handler to watch a specific state change of a target. More... | |
status_t | StartWatchingAll (BMessenger target) |
Subscribe this handler to watch a target for all events. More... | |
status_t | StopWatching (BMessenger target, uint32 what) |
Unsubscribe this handler from watching a specific state. More... | |
status_t | StopWatchingAll (BMessenger target) |
Unsubscribe this handler from watching all states. More... | |
status_t | StartWatching (BHandler *observer, uint32 what) |
Subscribe an observer for a specific state change of this handler. More... | |
status_t | StartWatchingAll (BHandler *observer) |
Subscribe an observer for a all state changes. More... | |
status_t | StopWatching (BHandler *observer, uint32 what) |
Unsubscribe an observer from watching a specific state. More... | |
status_t | StopWatchingAll (BHandler *observer) |
Unsubscribe an observer from watching all states. More... | |
virtual void | SendNotices (uint32 what, const BMessage *notice=NULL) |
Emit a state change to the observers. More... | |
bool | IsWatched () const |
Check if there are any observers watching this handler. More... | |
![]() | |
BArchivable () | |
Constructor. Does nothing. More... | |
BArchivable (BMessage *from) | |
Constructor. Does important behind-the-scenes work in the unarchiving process. More... | |
virtual | ~BArchivable () |
Destructor. Does nothing. More... | |
virtual status_t | AllArchived (BMessage *archive) const |
Method relating to the use of BArchiver . More... | |
virtual status_t | AllUnarchived (const BMessage *archive) |
Method relating to the use of BUnarchiver . More... | |
![]() | |
virtual bool | CertificateVerificationFailed (BUrlRequest *caller, BCertificate &certificate, const char *message) |
Called when cerificate verification failed. More... | |
virtual void | ConnectionOpened (BUrlRequest *caller) |
Called when the socket is opened. More... | |
virtual void | DataReceived (BUrlRequest *caller, const char *data, off_t position, ssize_t size) |
Called each time a block of data is received. More... | |
virtual void | DebugMessage (BUrlRequest *caller, BUrlProtocolDebugMessage type, const char *text) |
Called each time a debug message is emitted. More... | |
virtual void | DownloadProgress (BUrlRequest *caller, off_t bytesReceived, off_t bytesTotal) |
Called each time a block of data is downloaded. More... | |
virtual void | HeadersReceived (BUrlRequest *caller, const BUrlResult &result) |
Called when all of the server response metadata (such as headers) have been read and parsed. More... | |
virtual void | HostnameResolved (BUrlRequest *caller, const char *ip) |
Called when the final IP is discovered. More... | |
virtual void | RequestCompleted (BUrlRequest *caller, bool success) |
Called once the request is complete. More... | |
virtual void | ResponseStarted (BUrlRequest *caller) |
Called when the request has been emitted and the server begins to reply. More... | |
virtual void | UploadProgress (BUrlRequest *caller, off_t bytesSent, off_t bytesTotal) |
Called each time a block of data is sent. More... | |
Additional Inherited Members | |
![]() | |
static BArchivable * | Instantiate (BMessage *data) |
Static method to instantiate a handler from an archived message. More... | |
![]() | |
static BArchivable * | Instantiate (BMessage *archive) |
Static member to restore objects from messages. More... | |
Provides a handler for BUrlProtocolDispatchingListener.
BUrlProtocolAsynchronousListener transparently handles BMessage issued by BUrlProtocolDispatchingListener via callbacks from the BUrlProtocolListener interface.
BUrlProtocolAsynchronousListener::BUrlProtocolAsynchronousListener | ( | bool | transparent = false | ) |
Create a BUrlProtocolAsynchronousListener.
This constructor will also add the created object to the list of be_app handlers.
transparent | Whether a BUrlProtocolListener object should be created in conjunction with the current object. This object can be accessed via SynchronousListener(). |
|
virtual |
Default destructor for BUrlProtocolAsynchronousListener.
This destructor will free resources associated with the current object.
|
virtual |
Handle messages that has been received by the associated looper.
This handler handles messages received from BUrlProtocolDispatchingListener and handle them via callbacks as defined per BUrlProtocolListener.
Reimplemented from BHandler.
BUrlProtocolListener * BUrlProtocolAsynchronousListener::SynchronousListener | ( | ) |
The synchronous listener created from the current object.
NULL
if transparent
was false
on object creation and/or memory couldn't be allocated for the object at the time of creation.