From bbc0611099d7193e484b43d878956433380b9377 Mon Sep 17 00:00:00 2001 From: Leorize Date: Thu, 18 Jun 2020 00:09:06 -0500 Subject: [PATCH] docs: Add docs for BUrlProtocolAsynchronousListener Change-Id: Ib9df07d42d0153a7e0135acae85c00f3a1e6bd93 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2930 Reviewed-by: waddlesplash --- .../net/UrlProtocolAsynchronousListener.dox | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 docs/user/net/UrlProtocolAsynchronousListener.dox diff --git a/docs/user/net/UrlProtocolAsynchronousListener.dox b/docs/user/net/UrlProtocolAsynchronousListener.dox new file mode 100644 index 0000000000..676fd34f37 --- /dev/null +++ b/docs/user/net/UrlProtocolAsynchronousListener.dox @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Leorize, leorize+oss@disroot.org + * + * Corresponds to: + * headers/os/net/UrlProtocolAsynchronousListener.h hrev54280 + * src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp hrev54280 + */ + + +/*! + \file UrlProtocolAsynchronousListener.h + \ingroup network + \brief Provides the BUrlProtocolAsynchronousListener interface. +*/ + + +/*! + \class BUrlProtocolAsynchronousListener + \ingroup network + \brief Provides a handler for BUrlProtocolDispatchingListener. + + BUrlProtocolAsynchronousListener transparently handles BMessage issued by + BUrlProtocolDispatchingListener via callbacks from the BUrlProtocolListener + interface. +*/ + + +/*! + \fn BUrlProtocolAsynchronousListener::BUrlProtocolAsynchronousListener(bool transparent = false) + \brief Create a BUrlProtocolAsynchronousListener. + + This constructor will also add the created object to the list of be_app + handlers. + + \param transparent Whether a BUrlProtocolListener object should be created + in conjunction with the current object. This object can be accessed via + SynchronousListener(). +*/ + +/*! + \fn virtual BUrlProtocolAsynchronousListener::~BUrlProtocolAsynchronousListener() + \brief Default destructor for BUrlProtocolAsynchronousListener. + + This destructor will free resources associated with the current object. +*/ + +/*! + \fn BUrlProtocolListener* BUrlProtocolAsynchronousListener::SynchronousListener() + \brief The synchronous listener created from the current object. + + \returns A pointer to a BUrlProtocolListener object, or \c NULL if + \c transparent was \c false on object creation and/or memory couldn't + be allocated for the object at the time of creation. + + \warning The returned pointer lifetime is associated with the current object. + Do not attempt to delete this pointer. +*/ + +/*! + \fn virtual void BUrlProtocolAsynchronousListener::MessageReceived(BMessage* message) + \brief 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. +*/