/*!\mainpage Welcome to the Haiku BookBelow you will find documentation on the Application ProgrammingInterface (API) of the Haiku operating system. This API describesthe internals of the operating system allowing developers to writenative C++ applications and device drivers. See the<a href="https://api.haiku-os.org">online version</a> for the mostupdated version of this document. If you would like to help contributecontact the <a href="https://www.freelists.org/list/haiku-doc">documentationmailing list</a>. For guidelines on how to help document the API seethe \link apidoc Documenting the API\endlink page. A list ofcontributors can be found \ref credits page. Documenting the API isan ongoing process so contributions are greatly appreciated.The Haiku API is based on the BeOS R5 API but changes and additions havebeen included where appropriate. Important compatibility differences aredetailed on the \ref compatibility page. New classes and methodsand incompatible API changes to the BeOS R5 API are noted in theappropriate sections.A complete reference to the BeOS R5 API is available on the web in<a href="https://haiku-os.org/legacy-docs/bebook/">The Be Book</a>.The Be Book is used with permission from<a href="https://www.access-company.com/">Access Co.</a>, the currentowners of Be's intellectual property.\section book_kits Kits and ServersThe API is split into several kits and servers each detailing a differentaspect of the operating system.- The \ref app is the starting point for developing applicationsand includes classes for messaging and for interacting withthe rest of the system.- The \ref game provides classes for producing game sounds andworking with full screen apps.- The \ref interface is used to create responsive and attractivegraphical user interfaces building on the messaging facilitiesprovided by the Application Kit.- A \link interface_intro general introduction \endlink to theInterface Kit.- The \link layout_intro Layout API \endlink is a new additionto the Interface Kit in Haiku which provides resources tolayout your application flexibly and easily.- The \ref locale includes classes to localize your application todifferent languages, timezones, number formatting conventions andmuch more.- The \ref mail includes classes to work with e-mail files, folders,protocols, and filters, as part of Haiku's unique mail handling system.- The \ref media provides a unified and consistent interface for mediastreams and applications to intercommunicate.- The \ref midi2 describes an interface to generating, processing,and playing music in MIDI format. For reference documentation on the\ref midi1 is also included.- The \ref network handles everything network related, from interfaceIP address settings to HTTP connections.- The \ref storage is a collection of classes that deal with storing andretrieving information from disk.- The \ref support contains support classes to use in your applicationincluding resources for thread safety, IO, and serialization.- The \ref translation provides a framework for converting data streamsbetween media formats.\section book_special_topics Special Topics- \ref libroot- \ref drivers- \ref keyboard- \ref json- \ref netservices*////// Define main kits //////*!\defgroup app Application Kit\brief The Application Kit is the starting point for writing native HaikuGUI applications.The application kit is exactly what its name suggests — it is thebasis of Haiku applications. You should first read through this documentand the references here before moving on to the other parts of the API.The Application Kit classes can be divided into two groups: the messagingclasses and the system interaction classes. The larger of the two groups isthe messaging classes. Since the Haiku API relies on pervasivemultithreading messaging is an essential topic for any application. Have alook at the \link app_messaging Introduction to Messaging \endlink for moreinformation.The following messaging classes which allow you to easily and securelycommunicate between threads.- BHandler- BInvoker- BLooper- BMessage- BMessageFilter- BMessageQueue- BMessageRunner- BMessengerThe second group is the system interaction classes. These classesprovide hooks for your application to interact with the rest of the system.The most important class in this group is BApplication. Below is a list ofall system interaction classes:- BApplication- BClipboard- BCursor- BLaunchRoster- BNotification- BPropertyInfo- BRosterA third special category is the \link app_keystore Password and Key storageAPI:\endlink- BKey- BKeyStore\defgroup device Device Kit\brief The Device Kit provides access to devices such as joysticks and serial ports.\defgroup game Game Kit\brief The Game Kit provides classes for producing game sounds andworking with full screen apps.\defgroup interface Interface Kit\brief API for displaying a graphical user interface.\defgroup kernel Kernel Kit\brief The Kernel Kit provides low-level APIs mainly of use for writing device drivers andkernel modules.\defgroup locale Locale Kit\brief Collection of classes for localizing applications.\defgroup mail Mail Kit\brief API for working with e-mail messages and protocols.\defgroup media Media Kit\brief Collection of classes that deal with audio and video.\defgroup midi1 The old MIDI Kit (libmidi.so)\brief The old MIDI kit.\defgroup midi2 MIDI 2 Kit\brief The Midi Kit is the API that implements support for generating,processing, and playing music in MIDI format.<A HREF="https://www.midi.org/">MIDI</A>, which stands for 'MusicalInstrument Digital Interface', is a well-established standard forrepresenting and communicating musical data. This document serves asan overview. If you would like to see all the components, please lookat \link midi2 the list with classes \endlink.\section book_midi2twokits A Tale of Two MIDI KitsBeOS comes with two different, but compatible Midi Kits. Thisdocumentation focuses on the "new" Midi Kit, or midi2 as we like tocall it, that was introduced with BeOS R5. The old kit, which we'llrefer to as midi1, is more complete than the new kit, but less powerful.Both kits let you create so-called MIDI endpoints, but the endpointsfrom midi1 cannot be shared between different applications. The midi2kit solves that problem, but unlike midi1 it does not include a GeneralMIDI softsynth, nor does it have a facility for reading and playingStandard MIDI Files. Don't worry: both kits are compatible and you canmix-and-match them in your applications.The main differences between the two kits:- Instead of one BMidi object that both produces and consumes events,we have BMidiProducer and BMidiConsumer.- Applications are capable of sharing MIDI producers and consumerswith other applications via the centralized Midi Roster.- Physical MIDI ports are now sharable without apps "stealing" eventsfrom each other.- Applications can now send/receive raw MIDI byte streams (useful ifan application has its own MIDI parser/engine).- Channels are numbered 0–15, not 1–16- Timing is now specified in microseconds rather than milliseconds.\section book_midi2concepts Midi Kit ConceptsA brief overview of the elements that comprise the Midi Kit:- \b Endpoints. This is what the Midi Kit is all about: sending MIDImessages between endpoints. An endpoint is like a MIDI In or MIDIOut socket on your equipment; it either receives information or itsends information. Endpoints that send MIDI events are called\b producers; the endpoints that receive those events are called\b consumers. An endpoint that is created by your own applicationis called \b local; endpoints from other applications are\b remote. You can access remote endpoints using \b proxies.- \b Filters. A filter is an object that has a consumer and a producerendpoint. It reads incoming events from its consumer, performs someoperation, and tells its producer to send out the results. In itscurrent form, the Midi Kit doesn't provide any special facilitiesfor writing filters.- \b Midi \b Roster. The roster is the list of all published producersand consumers. By publishing an endpoint, you allow otherapplications to talk to it. You are not required to publish yourendpoints, in which case only your own application can use them.- \b Midi \b Server. The Midi Server does the behind-the-scenes work.It manages the roster, it connects endpoints, it makes sure thatendpoints can communicate, and so on. The Midi Server is startedautomatically when BeOS boots, and you never have to deal with itdirectly. Just remember that it runs the show.- \b libmidi. The BMidi* classes live inside two shared libraries:libmidi.so and libmidi2.so. If you write an application that usesold Midi Kit, you must link it to libmidi.so. Applications that usethe new Midi Kit must link to libmidi2.so. If you want tomix-and-match both kits, you should also link to both libraries.Here is a pretty picture:\image html midi2concepts.png\section book_midi2mediakit Midi Kit != Media KitBe chose not to integrate the Midi Kit into the Media Kit as another mediatype, mainly because MIDI doesn't require any of the format negotiation thatother media types need. Although the two kits look similar -- both have a"roster" for finding or registering "consumers" and "producers" -- there aresome very important differences.The first and most important point to note is that BMidiConsumer andBMidiProducer in the Midi Kit are \b NOT directly analogous toBBufferConsumer and BBufferProducer in the Media Kit! In the Media Kit,consumers and producers are the data consuming and producing propertiesof a media node. A filter in the Media Kit, therefore, inherits from bothBBufferConsumer and BBufferProducer, and implements their virtual memberfunctions to do its work.In the Midi Kit, consumers and producers act as endpoints of MIDI dataconnections, much as media_source and media_destination do in the Media Kit.Thus, a MIDI filter does not derive from BMidiConsumer and BMidiProducer;instead, it contains BMidiConsumer and BMidiProducer objects for each of itsdistinct endpoints that connect to other MIDI objects. The Midi Kit does notallow the use of multiple virtual inheritance, so you can't create an objectthat's both a BMidiConsumer and a BMidiProducer.This also contrasts with the old Midi Kit's conception of a BMidi object,which stood for an object that both received and sent MIDI data. In the newMidi Kit, the endpoints of MIDI connections are all that matters. What liesbetween the endpoints, i.e. how a MIDI filter is actually structured, isentirely at your discretion.Also, rather than use token structs like media_node to make connectionsvia the MediaRoster, the new kit makes the connections directly via theBMidiProducer object.\section book_midi2remotelocal Remote vs. Local ObjectsThe Midi Kit makes a distinction between remote and local MIDI objects.You can only create local MIDI endpoints, which derive from eitherBMidiLocalConsumer or BMidiLocalProducer. Remote endpoints are endpointsthat live in other applications, and you access them through BMidiRoster.BMidiRoster only gives you access to BMidiEndpoints, BMidiConsumers, andBMidiProducers. When you want to talk to remote MIDI objects, you do sothrough the proxy objects that BMidiRoster provides. UnlikeBMidiLocalConsumer and BMidiLocalProducer, these classes do not provide alot of functions. That is intentional. In order to hide the details ofcommunication with MIDI endpoints in other applications, the Midi Kit musthide the details of how a particular endpoint is implemented.So what can you do with remote objects? Only what BMidiConsumer,BMidiProducer, and BMidiEndpoint will let you do. You can connectobjects, get the properties of these objects -- and that's about it.\section book_midi2lifespan Creating and Destroying ObjectsThe constructors and destructors of most midi2 classes are private,which means that you cannot directly create them using the C++<CODE>new</CODE> operator, on the stack, or as globals. Nor can you<CODE>delete</CODE> them. Instead, these objects are obtained throughBMidiRoster. The only two exceptions to this rule are BMidiLocalConsumerand BMidiLocalProducer. These two objects may be directly created andsubclassed by developers.\section book_midi2refcount Reference CountingEach MIDI endpoint has a reference count associated with it, so thatthe Midi Roster can do proper bookkeeping. When you construct aBMidiLocalProducer or BMidiLocalConsumer endpoint, it starts with areference count of 1. In addition, BMidiRoster increments the referencecount of any object it hands to you as a result of\link BMidiRoster::NextEndpoint() NextEndpoint() \endlink or\link BMidiRoster::FindEndpoint() FindEndpoint() \endlink.Once the count hits 0, the endpoint will be deleted.This means that, to delete an endpoint, you don't call the<CODE>delete</CODE> operator directly; instead, you call\link BMidiEndpoint::Release() Release() \endlink.To balance this call, there's also an\link BMidiEndpoint::Acquire() Acquire() \endlink, in case you have twodisparate parts of your application working with the endpoint, and youdon't want to have to keep track of who needs to Release() the endpoint.When you're done with any endpoint object, you must Release() it.This is true for both local and remote objects. Repeat after me:Release() when you're done.\section book_midi2events MIDI EventsTo make some actual music, you need to\link BMidiProducer::Connect() Connect() \endlink your consumers toyour producers. Then you tell the producer to "spray" MIDI events to allthe connected consumers. The consumers are notified of these incomingevents through a set of hook functions.The Midi Kit already provides a set of commonly used spray functions,such as \link BMidiLocalProducer::SprayNoteOn() SprayNoteOn() \endlink,\link BMidiLocalProducer::SprayControlChange() SprayControlChange()\endlink, and so on. These correspond one-to-one with the message typesfrom the MIDI spec. You don't need to be a MIDI expert to use the kit, butof course some knowledge of the protocol helps. If you are really hardcore,you can also use the\link BMidiLocalProducer::SprayData() SprayData() \endlink to send raw MIDIevents to the consumers.At the consumer side, a dedicated thread invokes a hook function for everyincoming MIDI event. For every spray function, there is a corresponding hookfunction, e.g. \link BMidiLocalConsumer::NoteOn() NoteOn() \endlink and\link BMidiLocalConsumer::ControlChange() ControlChange() \endlink.The hardcore MIDI fanatics among you will be pleased to know that you canalso tap into the \link BMidiLocalConsumer::Data() Data() \endlink hook andget your hands dirty with the raw MIDI data.\section book_midi2time TimeThe spray and hook functions accept a bigtime_t parameter named "time". Thisindicates when the MIDI event should be performed. The time is given inmicroseconds since the computer booted. To get the current tick measurement,you call the system_time() function from the Kernel Kit.If you override a hook function in one of your consumer objects, it shouldlook at the time argument, wait until the designated time, and then performits action. The preferred method is to use the Kernel Kit's<CODE>snooze_until()</CODE> function, which sends the consumer thread tosleep until the requested time has come. (Or, if the time has alreadypassed, returns immediately.)Like this:\codevoid MyConsumer::NoteOn(uchar channel, uchar note, uchar velocity, bigtime_t time){snooze_until(time, B_SYSTEM_TIMEBASE);...do your thing...}\endcodeIf you want your producers to run in real time, i.e. they produce MIDI datathat needs to be performed immediately, you should pass time 0 to the sprayfunctions (which also happens to be the default value). Since time 0 hasalready passed, <CODE>snooze_until()</CODE> returns immediately, and theconsumer will process the events as soon as they are received.To schedule MIDI events for a performance time that lies somewhere in thefuture, the producer must take into account the consumer's latency.Producers should attempt to get notes to the consumer by or before<I>(scheduled_performance_time - latency)</I>. The time argument is stillthe scheduled performance time, so if your consumer has latency, it shouldsnooze like this before it starts to perform the events:\codesnooze_until(time - Latency(), B_SYSTEM_TIMEBASE);\endcodeNote that a typical producer sends out its events as soon as it can;unlike a consumer, it does not have to snooze.\section book_midi2ports Other Timing IssuesEach consumer object uses a Kernel Kit port to receive MIDI events fromconnected producers. The queue for this port is only 1 message deep.This means that if the consumer thread is asleep in a<CODE>snooze_until()</CODE>, it will not read its port. Consequently,any producer that tries to write a new event to this port will block untilthe consumer thread is ready to receive a new message. This is intentional,because it prevents producers from generating and queueing up thousands ofevents.This mechanism, while simple, puts on the producer the responsibilityfor sorting the events in time. Suppose your producer sends three NoteOn events, the first on t + 0, the second on t + 4, and the third on t + 2.This last event won't be received until after t + 4, so it will be two tickstoo late. If this sort of thing can happen with your producer, you shouldsomehow sort the events before you spray them. Of course, if you have two ormore producers connected to the same consumer, it is nearly impossible tosort this all out (pardon the pun). So it is not wise to send the same kindsof events from more than one producer to one consumer at the same time.The article Introduction to MIDI, Part 2 in <AHREF="https://www.haiku-os.org/legacy-docs/openbeosnewsletter/nsl36.html">OpenBeOSNewsletter 36</A> describes this problem in more detail, and provides asolution. Go read it now!\section book_midi2filters Writing a FilterA typical filter contains a consumer and a producer endpoint. It receivesevents from the consumer, processes them, and sends them out again using theproducer. The consumer endpoint is a subclass of BMidiLocalConsumer, whereasthe producer is simply a BMidiLocalProducer, not a subclass. This is acommon configuration, because consumers work by overriding the event hooksto do work when MIDI data arrives. Producers work by sending an event whenyou call their member functions. You should hardly ever need to derive fromBMidiLocalProducer (unless you need to know when the producer gets connectedor disconnected, perhaps), but you'll always have to override one or more ofBMidiLocalConsumer's member functions to do something useful with incomingdata.Filters should ignore the time argument from the spray and hook functions,and simply pass it on unchanged. Objects that only filter data shouldprocess the event as quickly as possible and be done with it. Do not<CODE>snooze_until()</CODE> in the consumer endpoint of a filter!\section book_midi2apidiffs API DifferencesAs far as the end user is concerned, the Haiku Midi Kit is mostly the sameas the BeOS R5 kits, although there are a few small differences in the API(mostly bug fixes):- BMidiEndpoint::IsPersistent() always returns false.- The B_MIDI_CHANGE_LATENCY notification is now properly sent. The Bekit incorrectly set be:op to B_MIDI_CHANGED_NAME, even though therest of the message was properly structured.- If creating a local endpoint fails, you can still Release() the objectwithout crashing into the debugger.\section book_midi2seealso See alsoMore about the Midi Kit:- \ref Midi2Defs.h- Be Newsletter Volume 3, Issue 47 - Motor Mix sample code- Be Newsletter Volume 4, Issue 3 - Overview of the new kit- <A HREF="https://haiku-os.org/documents/dev/introduction_to_midi_part_1">Newsletter33</A>, Introduction to MIDI, Part 1- <A HREF="https://haiku-os.org/documents/dev/introduction_to_midi_part_2">Newsletter36</A>, Introduction to MIDI, Part 2- Sample code and other goodies at the<A HREF="https://haiku-os.org/about/teams/midi_kit">Haiku Midi Kit team page</A>Information about MIDI in general:- <A HREF="https://www.midi.org">MIDI Manufacturers Association</A>- <A HREF="https://www.borg.com/~jglatt/tutr/miditutr.htm">MIDI Tutorials</A>- <A HREF="https://www.borg.com/~jglatt/tech/midispec.htm">MIDI Specification</A>- <A HREF="https://www.borg.com/~jglatt/tech/midifile.htm">Standard MIDI File Format</A>- <A HREF="https://www.io.com/~jimm/midi_ref.html">Jim Menard's MIDI Reference</A>\defgroup network Network Kit\brief Classes that deal with all network connections and communications.The Haiku Network Kit consists of:- A modular, add-ons based network stack- Two shared libraries, libnetwork.so and libnetapi.so- A stack driver, acting as interface between the network stack andlibnetwork.so- Basic network apps- A modular GUI prefletThe libnet.so shared library is the way that BeOS R5 provided POSIX/BSDAPI sockets to apps. Being binary compatible with BeOS R5 has made thislibrary implementation tedious. To counter this, the libnetapi.so sharedlibrary was developed. It contains thin C++ classes wrapping the Csockets POSIX/BSD API into these BNet* classes we're used under BeOS.The stack driver is the interface between libnet.so and the real stackbehind it, hosted by the network stack kernel modules. Its purposesinclude:-# Providing sockets to file descriptors translation support-# Providing support for select() on sockets-# Loading the network stack on first access, and then keeping it forfurther accessesThe following diagram illustrates the network stack design on Haiku:\image html obos_net_stack_design_1.gifThe Network Kit includes a handful of useful networking related appsincluding ping, ifconfig, route, traceroute, and arp.See the User Guide for more information about the<a href="https://haiku-os.org/docs/userguide/en/preferences/network.html">Network preferences app</a>included as part of the Network Kit.\defgroup storage Storage Kit\brief Collection of classes that deal with storing and retrievinginformation from disk.\defgroup support Support Kit\brief Collection of utility classes that are used throughout the API.The Support Kit provides a handy set of classes that you can use in yourapplications. These classes provide:- \b Thread \b Safety. Haiku can execute multiple threads of anapplication in parallel, letting certain parts of an applicationcontinue when one part is stalled, as well as letting an applicationprocess multiple pieces of data at the same time on multicore ormultiprocessor systems. However, there are times when multiplethreads desire to work on the same piece of data at the same time,potentially causing a conflict where variables or pointers arechanged by one thread causing another to execute incorrectly. Toprevent this, Haiku implements a \"locking\" mechanism, allowing onethread to \"lock out\" other threads from executing code that mightmodify the same data.- \b Archiving \b and \b IO. These classes allow a programmer toconvert objects into a form that can more easily be transferred toother applications or stored to disk, as well as performing basicinput and output operations.- \b Memory \b Allocation. This class allows a programmer to hand offsome of the duties of memory accounting and management.- \b Common \b Datatypes. To avoid unnecessary duplication of codeand to make life easier for programmers, Haiku includes classes thathandle management of ordered lists and strings.There are also a number of utility functions to time actions, play systemalert sounds, compare strings, and atomically manipulate integers. Have alook at the overview, or go straight to the complete\link support list of components \endlink of this kit.\section book_overview Overview- Thread Safety:- BLocker provides a semaphore-like locking mechanism allowing forrecursive locks.- BAutolock provides a simple method of automatically removing alock when a function ends.- \ref TLS.h "Thread Local Storage" allows a global variable\'scontent to be sensitive to thread context.- Archiving and IO:- BArchivable provides an interface for \"archiving\" objects sothat they may be sent to other applications where an identicalcopy will be recreated.- BArchiver simplifies archiving of BArchivable hierarchies.- BUnarchiver simplifies unarchiving hierarchies that have beenarchived using BArchiver.- BFlattenable provides an interface for \"flattening\" objects sothat they may be easily stored to disk.- BDataIO provides an interface for generalized read/write streams.- BPositionIO extends BDataIO to allow seeking within the data.- BBufferIO creates a buffer and attaches it to a BPositionIOstream, allowing for reduced load on the underlying stream.- BMemoryIO allows operation on an already-existing buffer.- BMallocIO creates and allows operation on a buffer.- Memory Allocation:- BBlockCache allows an application to allocate a \"pool\" ofmemory blocks that the application can fetch and dispose of asit pleases, letting the application make only a few large memoryallocations, instead of many small expensive allocations.- Common Datatypes:- BList allows simple ordered lists and provides common access,modification, and comparison functions.- BString allows strings and provides common access, modification,and comparison functions.- BStopWatch allows an application to measure the time an action takes.- \ref support_globals "Global functions"- \ref TypeConstants.h "Common types and constants"- Error codes for all kits\defgroup translation Translation Kit\brief Provides a framework for converting data streams between mediaformats.\defgroup libtranslation Translation Kit library (libtranslation.so)\defgroup libbe Main C++ library (libbe.so)*////// Subgroups //////*!\defgroup support_globals Global functions\ingroup support\defgroup layout Layout API\brief Provides classes for automatically laying out UIs.\ingroup interface*////// Special Topics //////*!\defgroup drivers Device Drivers\defgroup json Json Handling\brief Provides for parsing and writing of data in Json encoding.*/#if __cplusplus >= 201703L/*!\defgroup netservices Experimental Network Services Support\brief Experimental API to do higher level network requestsThis API currently is marked as experimental. It is part of the<code>BPrivate::Network</code> namespace, the header files are found at<code>headers\\private\\netservices2</code>, and you have to link yourapplication to <code>libnetservices2.a</code>. The new API is onlyavailable for modern platforms (x86 and x86_64), and not for the legacyplatform (x86_gcc2). The compiler needs to support C++17 or higher.<h3>Asynchronous handling of the result.</h3>In GUI applications, networking operations are often triggered by a user action. For example,downloading a file will be initiated by the user clicking a button. When you initiate thataction in the window's thread, and you block the message loop until the request is finished,the user will be left with a non-responsive UI. That is why one would usually run a networkrequest asynchronously. And instead of checking the status every few CPU cycles, you'd wantto be proactively informed when something important happens, like the progress of the downloador a signal when the request is finished.The Network Services kit support using the Haiku API's Looper and Handler system to keep you upto date about relevant events that happen to the requests.The following messages are available for all requests (HTTP and other). The messages below arein the order that they will arrive (when applicable).<table><tr><th>Message Constant</th><th>Description</th><th>Applies to</th><th> Additional Data</th></tr><tr><td>\ref BPrivate::Network::UrlEvent::HostNameResolved "UrlEvent::HostNameResolved"</td><td>The hostname has been resolved. This message is even sent when you set anIP-address in the URL object</td><td>All protocols that use network connections.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::HostName "UrlEventData::HostName"\ref BString</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::ConnectionOpened "UrlEvent::ConnectionOpened"</td><td>The connection to the remote server is opened. After this event, data will bewritten.</td><td>All protocols that use network connections.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::UploadProgress "UrlEvent::UploadProgress"</td><td>If there is a request body to be sent, this informs you of the progress. When thetotal size of the request body is known, this will be part of the message.</td><td>All protocols that use network connections and support writing data to the server(like HTTP(S)).</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::NumBytes "UrlEventData::NumBytes"\c int64 <br/>\ref BPrivate::Network::UrlEventData::TotalBytes "UrlEventData::TotalBytes"\c int64 (optional)</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::ResponseStarted "UrlEvent::ResponseStarted"</td><td>The server has started transmitting the response.</td><td>All Protocols</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/></td></tr><tr><td>\ref BPrivate::Network::UrlEvent::HttpRedirect "UrlEvent::HttpRedirect"</td><td>The network services kit is handling a HTTP redirect. The request will be repeatedfor a new URL.</td><td>HTTP/HTTPS</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::HttpRedirectUrl"UrlEventData::HttpRedirectUrl" \ref BString</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::HttpStatus "UrlEvent::HttpStatus"</td><td>The response status is available. This means it can also be accessed through\ref BPrivate::Network::BHttpResult::Status() "BHttpResult::Status()" withoutblocking the system.</td><td>HTTP/HTTPS</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::HttpStatusCode "UrlEventData::HttpStatusCode"\c int16</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::HttpFields "UrlEvent::HttpFields"</td><td>The HTTP header block has been fully received, and the HTTP fields can be accessedusing \ref BPrivate::Network::BHttpResult::Fields() "BHttpResult::Fields()" withoutblocking the system.</td><td>HTTP/HTTPS</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::DownloadProgress "UrlEvent::DownloadProgress"</td><td>If there is a response body to be received, this informs you of the progress. Ifthe total size of the body is known, this will be included in the message as well.</td><td>All protocols that use network connections.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::NumBytes "UrlEventData::NumBytes"\c int64 <br/>\ref BPrivate::Network::UrlEventData::TotalBytes "UrlEventData::TotalBytes"\c int64 (optional)</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::BytesWritten "UrlEvent::BytesWritten"</td><td>An interim update on how many bytes have been written to the target. This messageis only sent when you supplied a custom target to store the body of the request in.Note that the number of bytes written to the target may differ from the networktransfer size, due to compression in the protocol.</td><td>All protocols.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::NumBytes "UrlEventData::NumBytes"\c int64</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::RequestCompleted "UrlEvent::RequestCompleted"</td><td>The request is completed and all the data is written to the target, or there wasan error.</td><td>All protocols.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::Success "UrlEventData::Success" \c bool</td></tr><tr><td>\ref BPrivate::Network::UrlEvent::DebugMessage "UrlEvent::DebugMessage"</td><td>Additional debug information on the request. This is enabled or disabled perrequest. See the details in the protocol description.</td><td>All protocols.</td><td>\ref BPrivate::Network::UrlEventData::Id "UrlEventData::Id" \c int32 <br/>\ref BPrivate::Network::UrlEventData::DebugType "UrlEventData::DebugType"\c uint32 <br/>\ref BPrivate::Network::UrlEventData::DebugMessage "UrlEventData::DebugMessage"\ref BString</td></tr></table>*/#endif///// Namespace Documentation ///////! \brief Internal or experimental APInamespace BPrivate {#if __cplusplus >= 201703L/*!\brief Experimental Network Services APISee \ref netservices for more information.*/namespace Network {}#endif}