1ec7d71e6SNiels Sascha Reedijk/* 2ec7d71e6SNiels Sascha Reedijk * Copyright 2021 Haiku, Inc. All rights reserved. 3ec7d71e6SNiels Sascha Reedijk * Distributed under the terms of the MIT License. 4ec7d71e6SNiels Sascha Reedijk * 5ec7d71e6SNiels Sascha Reedijk * Authors: 6ec7d71e6SNiels Sascha Reedijk * Niels Sascha Reedijk, niels.reedijk@gmail.com 7ec7d71e6SNiels Sascha Reedijk * 8ec7d71e6SNiels Sascha Reedijk * Corresponds to: 9ec7d71e6SNiels Sascha Reedijk * headers/private/netservices2/NetServicesDefs.h hrev????? 10ec7d71e6SNiels Sascha Reedijk */ 11ec7d71e6SNiels Sascha Reedijk 12ec7d71e6SNiels Sascha Reedijk 13ec7d71e6SNiels Sascha Reedijk#if __cplusplus >= 201703L 14ec7d71e6SNiels Sascha Reedijk 15ec7d71e6SNiels Sascha Reedijknamespace BPrivate { 16ec7d71e6SNiels Sascha Reedijk 17ec7d71e6SNiels Sascha Reedijknamespace Network { 18ec7d71e6SNiels Sascha Reedijk 19ec7d71e6SNiels Sascha Reedijk 20ec7d71e6SNiels Sascha Reedijk/*! 213b2aa6c3SNiels Sascha Reedijk \file NetServicesDefs.h 223b2aa6c3SNiels Sascha Reedijk \ingroup netservices 233b2aa6c3SNiels Sascha Reedijk \brief Various standardized error and notification types used by multiple protocols of the 243b2aa6c3SNiels Sascha Reedijk Network Services Kit. 253b2aa6c3SNiels Sascha Reedijk 263b2aa6c3SNiels Sascha Reedijk \since Haiku R1 273b2aa6c3SNiels Sascha Reedijk*/ 283b2aa6c3SNiels Sascha Reedijk 293b2aa6c3SNiels Sascha Reedijk 303b2aa6c3SNiels Sascha Reedijk/*! 31ec7d71e6SNiels Sascha Reedijk \class BUnsupportedProtocol 32ec7d71e6SNiels Sascha Reedijk \ingroup netservices 33ec7d71e6SNiels Sascha Reedijk \brief Error that indicates that the protocol is not supported. 34ec7d71e6SNiels Sascha Reedijk 35ec7d71e6SNiels Sascha Reedijk \since Haiku R1 36ec7d71e6SNiels Sascha Reedijk*/ 37ec7d71e6SNiels Sascha Reedijk 38ec7d71e6SNiels Sascha Reedijk 39ec7d71e6SNiels Sascha Reedijk/*! 40ec7d71e6SNiels Sascha Reedijk \fn BUnsupportedProtocol::BUnsupportedProtocol(const char* origin, 41ec7d71e6SNiels Sascha Reedijk BUrl url, BStringList supportedProtocols) 423b2aa6c3SNiels Sascha Reedijk \brief Create a new unsupported protocol error. 43ec7d71e6SNiels Sascha Reedijk 44ec7d71e6SNiels Sascha Reedijk \param origin A string representing where this error occured. It is advised 45ec7d71e6SNiels Sascha Reedijk to initialize it to \c __PRETTY_FUNCTION__ by default. 46ec7d71e6SNiels Sascha Reedijk \param url The URL object with the unsupported protocol. 47ec7d71e6SNiels Sascha Reedijk \param supportedProtocols A list with the supported protocols. 48ec7d71e6SNiels Sascha Reedijk 49ec7d71e6SNiels Sascha Reedijk \since Haiku R1 50ec7d71e6SNiels Sascha Reedijk*/ 51ec7d71e6SNiels Sascha Reedijk 52ec7d71e6SNiels Sascha Reedijk 53ec7d71e6SNiels Sascha Reedijk/*! 54ec7d71e6SNiels Sascha Reedijk \fn BUnsupportedProtocol::BUnsupportedProtocol(BString origin, BUrl url, 55ec7d71e6SNiels Sascha Reedijk BStringList supportedProtocols) 56ec7d71e6SNiels Sascha Reedijk \copydoc BUnsupportedProtocol(const char*, BUrl, BStringList) 57ec7d71e6SNiels Sascha Reedijk 58ec7d71e6SNiels Sascha Reedijk \since Haiku R1 59ec7d71e6SNiels Sascha Reedijk*/ 60ec7d71e6SNiels Sascha Reedijk 61ec7d71e6SNiels Sascha Reedijk 62ec7d71e6SNiels Sascha Reedijk/*! 63ec7d71e6SNiels Sascha Reedijk \fn virtual const char* BUnsupportedProtocol::Message() const noexcept override 64ec7d71e6SNiels Sascha Reedijk \brief Access the string representation of the message. 65ec7d71e6SNiels Sascha Reedijk 66ec7d71e6SNiels Sascha Reedijk \since Haiku R1 67ec7d71e6SNiels Sascha Reedijk*/ 68ec7d71e6SNiels Sascha Reedijk 69ec7d71e6SNiels Sascha Reedijk 70ec7d71e6SNiels Sascha Reedijk/*! 71ec7d71e6SNiels Sascha Reedijk \fn const BUrl& BUnsupportedProtocol::Url() const 72ec7d71e6SNiels Sascha Reedijk \brief The URL that caused the issue. 73ec7d71e6SNiels Sascha Reedijk 74ec7d71e6SNiels Sascha Reedijk \since Haiku R1 75ec7d71e6SNiels Sascha Reedijk*/ 76ec7d71e6SNiels Sascha Reedijk 77ec7d71e6SNiels Sascha Reedijk 78ec7d71e6SNiels Sascha Reedijk/*! 79ec7d71e6SNiels Sascha Reedijk \fn const BStringList& BUnsupportedProtocol::SupportedProtocols() const 80ec7d71e6SNiels Sascha Reedijk \brief A list of protocols that are supported. 81ec7d71e6SNiels Sascha Reedijk 82ec7d71e6SNiels Sascha Reedijk \since Haiku R1 83ec7d71e6SNiels Sascha Reedijk*/ 84ec7d71e6SNiels Sascha Reedijk 85ec7d71e6SNiels Sascha Reedijk 86ec7d71e6SNiels Sascha Reedijk/*! 87ec7d71e6SNiels Sascha Reedijk \class BInvalidUrl 88ec7d71e6SNiels Sascha Reedijk \ingroup netservices 89ec7d71e6SNiels Sascha Reedijk \brief Error that indicates that the URL is not valid. 90ec7d71e6SNiels Sascha Reedijk 91ec7d71e6SNiels Sascha Reedijk This error is raised as an exception when the caller tries to pass a 92ec7d71e6SNiels Sascha Reedijk \ref BUrl object that does not contain a valid URL. 93ec7d71e6SNiels Sascha Reedijk 94ec7d71e6SNiels Sascha Reedijk \see \ref BUrl::IsValid() 95ec7d71e6SNiels Sascha Reedijk 96ec7d71e6SNiels Sascha Reedijk \since Haiku R1 97ec7d71e6SNiels Sascha Reedijk*/ 98ec7d71e6SNiels Sascha Reedijk 99ec7d71e6SNiels Sascha Reedijk 100ec7d71e6SNiels Sascha Reedijk/*! 101ec7d71e6SNiels Sascha Reedijk \fn BInvalidUrl::BInvalidUrl(const char* origin, BUrl url) 102ec7d71e6SNiels Sascha Reedijk \brief Create a new error invalid URL error. 103ec7d71e6SNiels Sascha Reedijk 104ec7d71e6SNiels Sascha Reedijk \param origin A string representing where this error occured. It is advised 105ec7d71e6SNiels Sascha Reedijk to initialize it to \c __PRETTY_FUNCTION__ by default. 106ec7d71e6SNiels Sascha Reedijk \param url The URL object that did not contain a valid URL. 107ec7d71e6SNiels Sascha Reedijk 108ec7d71e6SNiels Sascha Reedijk \since Haiku R1 109ec7d71e6SNiels Sascha Reedijk*/ 110ec7d71e6SNiels Sascha Reedijk 111ec7d71e6SNiels Sascha Reedijk 112ec7d71e6SNiels Sascha Reedijk/*! 113ec7d71e6SNiels Sascha Reedijk \fn BInvalidUrl::BInvalidUrl(BString origin, BUrl url) 114ec7d71e6SNiels Sascha Reedijk \copydoc BInvalidUrl::BInvalidUrl(const char* origin, BUrl url) 115ec7d71e6SNiels Sascha Reedijk*/ 116ec7d71e6SNiels Sascha Reedijk 117ec7d71e6SNiels Sascha Reedijk 118ec7d71e6SNiels Sascha Reedijk/*! 119ec7d71e6SNiels Sascha Reedijk \fn virtual const char* BInvalidUrl::Message() const noexcept override 120ec7d71e6SNiels Sascha Reedijk \brief Access the string representation of the message. 121ec7d71e6SNiels Sascha Reedijk 122ec7d71e6SNiels Sascha Reedijk \since Haiku R1 123ec7d71e6SNiels Sascha Reedijk*/ 124ec7d71e6SNiels Sascha Reedijk 125ec7d71e6SNiels Sascha Reedijk 126ec7d71e6SNiels Sascha Reedijk/*! 127ec7d71e6SNiels Sascha Reedijk \fn const BUrl& BInvalidUrl::Url() const 128ec7d71e6SNiels Sascha Reedijk \brief The URL that caused the issue. 129ec7d71e6SNiels Sascha Reedijk 130ec7d71e6SNiels Sascha Reedijk \since Haiku R1 131ec7d71e6SNiels Sascha Reedijk*/ 132ec7d71e6SNiels Sascha Reedijk 133ec7d71e6SNiels Sascha Reedijk 1343b2aa6c3SNiels Sascha Reedijk/*! 1353b2aa6c3SNiels Sascha Reedijk \class BNetworkRequestError 1363b2aa6c3SNiels Sascha Reedijk \ingroup netservices 1373b2aa6c3SNiels Sascha Reedijk \brief Error that indicates there was an issue executing the network request. 1383b2aa6c3SNiels Sascha Reedijk 1393b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1403b2aa6c3SNiels Sascha Reedijk*/ 1413b2aa6c3SNiels Sascha Reedijk 1423b2aa6c3SNiels Sascha Reedijk 1433b2aa6c3SNiels Sascha Reedijk/*! 1443b2aa6c3SNiels Sascha Reedijk \enum BNetworkRequestError::ErrorType 1453b2aa6c3SNiels Sascha Reedijk \ingroup netservices 1463b2aa6c3SNiels Sascha Reedijk \brief A list of errors that can occur while executing a network request. 1473b2aa6c3SNiels Sascha Reedijk 1483b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1493b2aa6c3SNiels Sascha Reedijk*/ 1503b2aa6c3SNiels Sascha Reedijk 1513b2aa6c3SNiels Sascha Reedijk 1523b2aa6c3SNiels Sascha Reedijk/*! 1533b2aa6c3SNiels Sascha Reedijk \var BNetworkRequestError::ErrorType BNetworkRequestError::HostnameError 1543b2aa6c3SNiels Sascha Reedijk \brief Error resolving the hostname. 1553b2aa6c3SNiels Sascha Reedijk 1563b2aa6c3SNiels Sascha Reedijk \ref ErrorCode() will be set to contain the underlying error code. 1573b2aa6c3SNiels Sascha Reedijk 1583b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1593b2aa6c3SNiels Sascha Reedijk*/ 1603b2aa6c3SNiels Sascha Reedijk 1613b2aa6c3SNiels Sascha Reedijk 1623b2aa6c3SNiels Sascha Reedijk/*! 1633b2aa6c3SNiels Sascha Reedijk \var BNetworkRequestError::ErrorType BNetworkRequestError::NetworkError 1643b2aa6c3SNiels Sascha Reedijk \brief The request was interrupted due to a network error. 1653b2aa6c3SNiels Sascha Reedijk 1663b2aa6c3SNiels Sascha Reedijk This may occur when reading or writing fails due to an underlying network error, like an 1673b2aa6c3SNiels Sascha Reedijk unexpected closed connection. 1683b2aa6c3SNiels Sascha Reedijk 1693b2aa6c3SNiels Sascha Reedijk \ref ErrorCode() will be set to contain the underlying error code. 1703b2aa6c3SNiels Sascha Reedijk 1713b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1723b2aa6c3SNiels Sascha Reedijk*/ 1733b2aa6c3SNiels Sascha Reedijk 1743b2aa6c3SNiels Sascha Reedijk 1753b2aa6c3SNiels Sascha Reedijk/*! 1763b2aa6c3SNiels Sascha Reedijk \var BNetworkRequestError::ErrorType BNetworkRequestError::ProtocolError 1773b2aa6c3SNiels Sascha Reedijk \brief The request did not complete because the response did not conform to the protocol. 1783b2aa6c3SNiels Sascha Reedijk 1793b2aa6c3SNiels Sascha Reedijk The server gave an unexpected or incorrect response. The network request could not complete 1803b2aa6c3SNiels Sascha Reedijk because of this. 1813b2aa6c3SNiels Sascha Reedijk 1823b2aa6c3SNiels Sascha Reedijk There will not be any \ref ErrorCode() set. 1833b2aa6c3SNiels Sascha Reedijk 1843b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1853b2aa6c3SNiels Sascha Reedijk*/ 1863b2aa6c3SNiels Sascha Reedijk 1873b2aa6c3SNiels Sascha Reedijk 1883b2aa6c3SNiels Sascha Reedijk/*! 1893b2aa6c3SNiels Sascha Reedijk \var BNetworkRequestError::ErrorType BNetworkRequestError::SystemError 1903b2aa6c3SNiels Sascha Reedijk \brief Other internal error while handling the request. 1913b2aa6c3SNiels Sascha Reedijk 1923b2aa6c3SNiels Sascha Reedijk There could have been issues initializing buffers or decompression engines. 1933b2aa6c3SNiels Sascha Reedijk 1943b2aa6c3SNiels Sascha Reedijk \ref ErrorCode() will be set to contain the underlying error code. 1953b2aa6c3SNiels Sascha Reedijk 1963b2aa6c3SNiels Sascha Reedijk \since Haiku R1 1973b2aa6c3SNiels Sascha Reedijk*/ 1983b2aa6c3SNiels Sascha Reedijk 1993b2aa6c3SNiels Sascha Reedijk 2003b2aa6c3SNiels Sascha Reedijk/*! 2013b2aa6c3SNiels Sascha Reedijk \var BNetworkRequestError::ErrorType BNetworkRequestError::Canceled 2023b2aa6c3SNiels Sascha Reedijk \brief The request was canceled before it was completed. 2033b2aa6c3SNiels Sascha Reedijk 2043b2aa6c3SNiels Sascha Reedijk This could either have been done through the API, or because the session that schedules and 2053b2aa6c3SNiels Sascha Reedijk executes the requests was destroyed. 2063b2aa6c3SNiels Sascha Reedijk 2073b2aa6c3SNiels Sascha Reedijk There will not be any \ref ErrorCode() set. 2083b2aa6c3SNiels Sascha Reedijk 2093b2aa6c3SNiels Sascha Reedijk \since Haiku R1 2103b2aa6c3SNiels Sascha Reedijk*/ 2113b2aa6c3SNiels Sascha Reedijk 2123b2aa6c3SNiels Sascha Reedijk 2133b2aa6c3SNiels Sascha Reedijk/*! 2143b2aa6c3SNiels Sascha Reedijk \fn BNetworkRequestError::BNetworkRequestError(const char *origin, ErrorType type, 2159cb56a48SNiels Sascha Reedijk status_t errorCode, const BString& customMessage = BString()) 2163b2aa6c3SNiels Sascha Reedijk \brief Create a new network request error. 2173b2aa6c3SNiels Sascha Reedijk 2183b2aa6c3SNiels Sascha Reedijk \param origin A string representing where this error occured. It is advised 2193b2aa6c3SNiels Sascha Reedijk to initialize it to \c __PRETTY_FUNCTION__ by default. 2203b2aa6c3SNiels Sascha Reedijk \param type The error type that describes what the issue was that prevented the completion of 2213b2aa6c3SNiels Sascha Reedijk the request. 2229cb56a48SNiels Sascha Reedijk \param errorCode The underlying system error. See the \ref BNetworkRequestError::ErrorType 2233b2aa6c3SNiels Sascha Reedijk documentation on which error types expect a system error. 2249cb56a48SNiels Sascha Reedijk \param customMessage Optional custom message describing the reason or cause for the error. 2259cb56a48SNiels Sascha Reedijk 2269cb56a48SNiels Sascha Reedijk \since Haiku R1 2279cb56a48SNiels Sascha Reedijk*/ 2289cb56a48SNiels Sascha Reedijk 2299cb56a48SNiels Sascha Reedijk 2309cb56a48SNiels Sascha Reedijk/*! 2319cb56a48SNiels Sascha Reedijk \fn BNetworkRequestError::BNetworkRequestError(const char *origin, ErrorType type, 2329cb56a48SNiels Sascha Reedijk const BString& customMessage = BString()) 2339cb56a48SNiels Sascha Reedijk \brief Create a new network request error. 2349cb56a48SNiels Sascha Reedijk 2359cb56a48SNiels Sascha Reedijk \param origin A string representing where this error occured. It is advised 2369cb56a48SNiels Sascha Reedijk to initialize it to \c __PRETTY_FUNCTION__ by default. 2379cb56a48SNiels Sascha Reedijk \param type The error type that describes what the issue was that prevented the completion of 2389cb56a48SNiels Sascha Reedijk the request. 2399cb56a48SNiels Sascha Reedijk \param customMessage Optional custom message describing the reason or cause for the error. 2403b2aa6c3SNiels Sascha Reedijk 2413b2aa6c3SNiels Sascha Reedijk \since Haiku R1 2423b2aa6c3SNiels Sascha Reedijk*/ 2433b2aa6c3SNiels Sascha Reedijk 2443b2aa6c3SNiels Sascha Reedijk 2453b2aa6c3SNiels Sascha Reedijk/*! 2463b2aa6c3SNiels Sascha Reedijk \fn status_t BNetworkRequestError::ErrorCode() const noexcept 2473b2aa6c3SNiels Sascha Reedijk \brief Get the underlying system error code. 2483b2aa6c3SNiels Sascha Reedijk 2493b2aa6c3SNiels Sascha Reedijk \return A \c status_t error code when the associated \ref BNetworkRequestError::ErrorType sets 2503b2aa6c3SNiels Sascha Reedijk the system error, or \c B_OK if there is no additional error code available. 2513b2aa6c3SNiels Sascha Reedijk 2523b2aa6c3SNiels Sascha Reedijk \since Haiku R1 2533b2aa6c3SNiels Sascha Reedijk*/ 2543b2aa6c3SNiels Sascha Reedijk 2553b2aa6c3SNiels Sascha Reedijk 2563b2aa6c3SNiels Sascha Reedijk/*! 2573b2aa6c3SNiels Sascha Reedijk \fn ErrorType BNetworkRequestError::Type() const noexcept 2583b2aa6c3SNiels Sascha Reedijk \brief Get the error type. 2593b2aa6c3SNiels Sascha Reedijk 2603b2aa6c3SNiels Sascha Reedijk \return Get the \ref BNetworkRequestError::ErrorType that describes the cause for the request 2613b2aa6c3SNiels Sascha Reedijk to fail. 2623b2aa6c3SNiels Sascha Reedijk 2633b2aa6c3SNiels Sascha Reedijk \since Haiku R1 2643b2aa6c3SNiels Sascha Reedijk*/ 2653b2aa6c3SNiels Sascha Reedijk 2663b2aa6c3SNiels Sascha Reedijk 26760355daeSNiels Sascha Reedijk/*! 2689cb56a48SNiels Sascha Reedijk \fn const char* BNetworkRequestError::CustomMessage() const noexcept 2699cb56a48SNiels Sascha Reedijk \brief Get the custom error message. 2709cb56a48SNiels Sascha Reedijk 2719cb56a48SNiels Sascha Reedijk \return Get the custom error message. This may be an empty string if it was not set. 2729cb56a48SNiels Sascha Reedijk 2739cb56a48SNiels Sascha Reedijk \since Haiku R1 2749cb56a48SNiels Sascha Reedijk*/ 2759cb56a48SNiels Sascha Reedijk 2769cb56a48SNiels Sascha Reedijk 2779cb56a48SNiels Sascha Reedijk/*! 27860355daeSNiels Sascha Reedijk \fn BString encode_to_base64(const BString& string) 27960355daeSNiels Sascha Reedijk \brief Utility function that encodes a \a string to base64 and returns the result. 28060355daeSNiels Sascha Reedijk 28160355daeSNiels Sascha Reedijk \since Haiku R1 28260355daeSNiels Sascha Reedijk*/ 28360355daeSNiels Sascha Reedijk 28460355daeSNiels Sascha Reedijk 28560355daeSNiels Sascha Reedijk/*! 28660355daeSNiels Sascha Reedijk \namespace BPrivate::Network::UrlEvent 28760355daeSNiels Sascha Reedijk \brief Contains the message constants that are sent by the various protocols. 28860355daeSNiels Sascha Reedijk 28960355daeSNiels Sascha Reedijk Please see the \link netservices kit documentation \endlink for details which messages are sent 29060355daeSNiels Sascha Reedijk at which stage, and what data they contain. 29160355daeSNiels Sascha Reedijk 29260355daeSNiels Sascha Reedijk \since Haiku R1 29360355daeSNiels Sascha Reedijk*/ 29460355daeSNiels Sascha Reedijk 29560355daeSNiels Sascha Reedijk 29660355daeSNiels Sascha Reedijk/*! 29760355daeSNiels Sascha Reedijk \var UrlEvent::HostNameResolved 29860355daeSNiels Sascha Reedijk \brief The hostname for the request is resolved. 29960355daeSNiels Sascha Reedijk 30060355daeSNiels Sascha Reedijk \since Haiku R1 30160355daeSNiels Sascha Reedijk*/ 30260355daeSNiels Sascha Reedijk 30360355daeSNiels Sascha Reedijk 30460355daeSNiels Sascha Reedijk/*! 30560355daeSNiels Sascha Reedijk \var UrlEvent::ConnectionOpened 30660355daeSNiels Sascha Reedijk \brief The connection for the request is opened and the request will be sent. 30760355daeSNiels Sascha Reedijk 30860355daeSNiels Sascha Reedijk \since Haiku R1 30960355daeSNiels Sascha Reedijk*/ 31060355daeSNiels Sascha Reedijk 31160355daeSNiels Sascha Reedijk 31260355daeSNiels Sascha Reedijk/*! 31360355daeSNiels Sascha Reedijk \var UrlEvent::UploadProgress 31460355daeSNiels Sascha Reedijk \brief There is progress sending the body for the request. 31560355daeSNiels Sascha Reedijk 31660355daeSNiels Sascha Reedijk \since Haiku R1 31760355daeSNiels Sascha Reedijk*/ 31860355daeSNiels Sascha Reedijk 31960355daeSNiels Sascha Reedijk 32060355daeSNiels Sascha Reedijk/*! 32160355daeSNiels Sascha Reedijk \var UrlEvent::ResponseStarted 32260355daeSNiels Sascha Reedijk \brief The request was sent, and the response is now incoming. 32360355daeSNiels Sascha Reedijk 32460355daeSNiels Sascha Reedijk \since Haiku R1 32560355daeSNiels Sascha Reedijk*/ 32660355daeSNiels Sascha Reedijk 32760355daeSNiels Sascha Reedijk 32860355daeSNiels Sascha Reedijk/*! 32960355daeSNiels Sascha Reedijk \var UrlEvent::DownloadProgress 33060355daeSNiels Sascha Reedijk \brief There is progress receiving the body of the request. 33160355daeSNiels Sascha Reedijk 33260355daeSNiels Sascha Reedijk \since Haiku R1 33360355daeSNiels Sascha Reedijk*/ 33460355daeSNiels Sascha Reedijk 33560355daeSNiels Sascha Reedijk 33660355daeSNiels Sascha Reedijk/*! 33760355daeSNiels Sascha Reedijk \var UrlEvent::BytesWritten 33860355daeSNiels Sascha Reedijk \brief There are bytes written to the target of the body. 33960355daeSNiels Sascha Reedijk 34060355daeSNiels Sascha Reedijk \since Haiku R1 34160355daeSNiels Sascha Reedijk*/ 34260355daeSNiels Sascha Reedijk 34360355daeSNiels Sascha Reedijk 34460355daeSNiels Sascha Reedijk/*! 34560355daeSNiels Sascha Reedijk \var UrlEvent::RequestCompleted 34660355daeSNiels Sascha Reedijk \brief The request was completed. 34760355daeSNiels Sascha Reedijk 34860355daeSNiels Sascha Reedijk \since Haiku R1 34960355daeSNiels Sascha Reedijk*/ 35060355daeSNiels Sascha Reedijk 35160355daeSNiels Sascha Reedijk 35260355daeSNiels Sascha Reedijk/*! 35360355daeSNiels Sascha Reedijk \var UrlEvent::DebugMessage 35460355daeSNiels Sascha Reedijk \brief There is a debug message for a request or for a protocol. 35560355daeSNiels Sascha Reedijk 35660355daeSNiels Sascha Reedijk \since Haiku R1 35760355daeSNiels Sascha Reedijk*/ 35860355daeSNiels Sascha Reedijk 35960355daeSNiels Sascha Reedijk 36060355daeSNiels Sascha Reedijk/*! 36160355daeSNiels Sascha Reedijk \namespace BPrivate::Network::UrlEventData 36260355daeSNiels Sascha Reedijk \brief Contains the names of the data in the messages that are sent by the various protocols. 36360355daeSNiels Sascha Reedijk 36460355daeSNiels Sascha Reedijk Please see the \link netservices kit documentation \endlink for details which messages are sent 36560355daeSNiels Sascha Reedijk at which stage, and what data they contain. 36660355daeSNiels Sascha Reedijk 36760355daeSNiels Sascha Reedijk \since Haiku R1 36860355daeSNiels Sascha Reedijk*/ 36960355daeSNiels Sascha Reedijk 37060355daeSNiels Sascha Reedijk 37160355daeSNiels Sascha Reedijk/*! 37260355daeSNiels Sascha Reedijk \var const char* UrlEventData::Id 37360355daeSNiels Sascha Reedijk \brief An \c int32 that identifies the request the message pertains to. 37460355daeSNiels Sascha Reedijk 37560355daeSNiels Sascha Reedijk \since Haiku R1 37660355daeSNiels Sascha Reedijk*/ 37760355daeSNiels Sascha Reedijk 37860355daeSNiels Sascha Reedijk 37960355daeSNiels Sascha Reedijk/*! 38060355daeSNiels Sascha Reedijk \var const char* UrlEventData::HostName 38160355daeSNiels Sascha Reedijk \brief A \ref BString that represents the hostname that was resolved. 38260355daeSNiels Sascha Reedijk 38360355daeSNiels Sascha Reedijk \since Haiku R1 38460355daeSNiels Sascha Reedijk*/ 38560355daeSNiels Sascha Reedijk 38660355daeSNiels Sascha Reedijk 38760355daeSNiels Sascha Reedijk/*! 38860355daeSNiels Sascha Reedijk \var const char* UrlEventData::NumBytes 38960355daeSNiels Sascha Reedijk \brief An \c int64/off_t represening the number of bytes transferred to now. 39060355daeSNiels Sascha Reedijk 39160355daeSNiels Sascha Reedijk \since Haiku R1 39260355daeSNiels Sascha Reedijk*/ 39360355daeSNiels Sascha Reedijk 39460355daeSNiels Sascha Reedijk 39560355daeSNiels Sascha Reedijk/*! 39660355daeSNiels Sascha Reedijk \var const char* UrlEventData::TotalBytes 39760355daeSNiels Sascha Reedijk \brief An \c int64/off_t representing the total number of bytes that will be sent/received. 39860355daeSNiels Sascha Reedijk 39960355daeSNiels Sascha Reedijk \since Haiku R1 40060355daeSNiels Sascha Reedijk*/ 40160355daeSNiels Sascha Reedijk 40260355daeSNiels Sascha Reedijk 40360355daeSNiels Sascha Reedijk/*! 40460355daeSNiels Sascha Reedijk \var const char* UrlEventData::Success 40560355daeSNiels Sascha Reedijk \brief A \c bool that indicates whether an activity was succesful. 40660355daeSNiels Sascha Reedijk 40760355daeSNiels Sascha Reedijk \since Haiku R1 40860355daeSNiels Sascha Reedijk*/ 40960355daeSNiels Sascha Reedijk 41060355daeSNiels Sascha Reedijk 41160355daeSNiels Sascha Reedijk/*! 41260355daeSNiels Sascha Reedijk \var const char* UrlEventData::DebugType 413*8a16ecbcSNiels Sascha Reedijk \brief An \c uint32 representing a debug type constant. 414*8a16ecbcSNiels Sascha Reedijk 415*8a16ecbcSNiels Sascha Reedijk The value is one of \ref UrlEventData::DebugError, \ref UrlEventData::DebugWarning or 416*8a16ecbcSNiels Sascha Reedijk \ref UrlEventData::DebugInfo. 41760355daeSNiels Sascha Reedijk 41860355daeSNiels Sascha Reedijk \since Haiku R1 41960355daeSNiels Sascha Reedijk*/ 42060355daeSNiels Sascha Reedijk 42160355daeSNiels Sascha Reedijk 42260355daeSNiels Sascha Reedijk/*! 42360355daeSNiels Sascha Reedijk \var const char* UrlEventData::DebugMessage 42460355daeSNiels Sascha Reedijk \brief A \ref BString that contains the debug message. 42560355daeSNiels Sascha Reedijk 42660355daeSNiels Sascha Reedijk \since Haiku R1 42760355daeSNiels Sascha Reedijk*/ 42860355daeSNiels Sascha Reedijk 42960355daeSNiels Sascha Reedijk 430*8a16ecbcSNiels Sascha Reedijk/*! 431*8a16ecbcSNiels Sascha Reedijk \var UrlEventData::DebugInfo 432*8a16ecbcSNiels Sascha Reedijk \brief Value for \ref UrlEventData::DebugType indicating that the message is an info messsage. 433*8a16ecbcSNiels Sascha Reedijk 434*8a16ecbcSNiels Sascha Reedijk \since Haiku R1 435*8a16ecbcSNiels Sascha Reedijk*/ 436*8a16ecbcSNiels Sascha Reedijk 437*8a16ecbcSNiels Sascha Reedijk 438*8a16ecbcSNiels Sascha Reedijk/*! 439*8a16ecbcSNiels Sascha Reedijk \var UrlEventData::DebugWarning 440*8a16ecbcSNiels Sascha Reedijk \brief Value for \ref UrlEventData::DebugType indicating that the message is a warning 441*8a16ecbcSNiels Sascha Reedijk messsage. 442*8a16ecbcSNiels Sascha Reedijk 443*8a16ecbcSNiels Sascha Reedijk \since Haiku R1 444*8a16ecbcSNiels Sascha Reedijk*/ 445*8a16ecbcSNiels Sascha Reedijk 446*8a16ecbcSNiels Sascha Reedijk 447*8a16ecbcSNiels Sascha Reedijk/*! 448*8a16ecbcSNiels Sascha Reedijk \var UrlEventData::DebugError 449*8a16ecbcSNiels Sascha Reedijk \brief Value for \ref UrlEventData::DebugType indicating that the message is an error messsage. 450*8a16ecbcSNiels Sascha Reedijk 451*8a16ecbcSNiels Sascha Reedijk \since Haiku R1 452*8a16ecbcSNiels Sascha Reedijk*/ 453*8a16ecbcSNiels Sascha Reedijk 454*8a16ecbcSNiels Sascha Reedijk 455ec7d71e6SNiels Sascha Reedijk} // namespace Network 456ec7d71e6SNiels Sascha Reedijk 457ec7d71e6SNiels Sascha Reedijk} // namespace BPrivate 458ec7d71e6SNiels Sascha Reedijk 459ec7d71e6SNiels Sascha Reedijk#endif 460