xref: /haiku/docs/user/app/Message.dox (revision db6fcb750a1afb5fdc752322972adf6044d3b4c4)
1/*
2 * Copyright 2007-2014, 2019 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Niels Sascha Reedijk, niels.reedijk@gmail.com
7 *		John Scipione, jscpione@gmail.com
8 *
9 * Corresponds to:
10 *		headers/os/app/Message.h	hrev51780
11 *		src/kits/app/Message.cpp	hrev53160
12 */
13
14
15/*!
16	\file Message.h
17	\ingroup app
18	\ingroup libbe
19	\brief Provides the BMessage class.
20*/
21
22
23///// Name lengths and Scripting specifiers /////
24
25
26/*!
27	\def B_FIELD_NAME_LENGTH
28	\brief Undocumented...
29
30	\since BeOS R3
31*/
32
33
34/*!
35	\def B_PROPERTY_NAME_LENGTH
36	\brief Undocumented...
37
38	\since BeOS R3
39*/
40
41
42/*!
43	\var B_NO_SPECIFIER
44	\brief Undocumented...
45
46	\since BeOS R3
47*/
48
49
50/*!
51	\var B_DIRECT_SPECIFIER
52	\brief Undocumented...
53
54	\since BeOS R3
55*/
56
57
58/*!
59	\var B_INDEX_SPECIFIER
60	\brief Undocumented...
61
62	\since BeOS R3
63*/
64
65
66/*!
67	\var B_REVERSE_INDEX_SPECIFIER,
68	\brief Undocumented...
69
70	\since BeOS R3
71*/
72
73
74/*!
75	\var B_RANGE_SPECIFIER
76	\brief Undocumented...
77
78	\since BeOS R3
79*/
80
81
82/*!
83	\var B_REVERSE_RANGE_SPECIFIER
84	\brief Undocumented...
85
86	\since BeOS R3
87*/
88
89
90/*!
91	\var B_NAME_SPECIFIER
92	\brief Undocumented...
93
94	\since BeOS R3
95*/
96
97
98/*!
99	\var B_ID_SPECIFIER
100	\brief Undocumented...
101
102	\since BeOS R3
103*/
104
105
106/*!
107	\var B_SPECIFIERS_END
108	\brief Undocumented...
109
110	\since BeOS R3
111*/
112
113
114///// Class BMessage /////
115
116
117/*!
118	\class BMessage
119	\ingroup app
120	\ingroup libbe
121	\brief A container that can be send and received using the Haiku messaging
122	       subsystem.
123
124	This class is at the center of the web of messaging classes, in the sense
125	that it defines the actual structure of the messages. Messages have two
126	<b>important elements</b>: the #what identifier, and the data members. The
127	first can be directly manipulated, the latter can be manipulated through
128	AddData(), FindData() and ReplaceData() and their derivatives. Neither of
129	these elements are mandatory.
130
131	The second important role of BMessage is that it stores <b>meta data</b>:
132	who sent the message and with what intention? The methods of BMessage will
133	disclose if the message was a reply (IsReply()), where it came from
134	(IsSourceRemote()), whether a reply is expected (IsSourceWaiting()), and in
135	case the message is a reply, what it's a reply to (Previous()).
136
137	Mostly, messages are used to pass information between the the objects in
138	your application, but because messages are such flexible data containers,
139	they are also often used for other <b>data storage purposes</b>. Many
140	applications store their settings as messages. Because messages can be
141	flattened to data streams (such as files), they provide an easy but
142	powerful tool for data storage.
143
144	All methods can be classified in these areas:
145	- Adding, Finding, Replacing and Removing Data.
146	- Statistics and Miscellaneous information.
147	- Delivery information.
148	- Utilities to reply to messages.
149
150	To see how messages fit in with the greater picture, have a look at the
151	\ref app_messaging "Messaging Introduction".
152
153	\since BeOS R3
154*/
155
156
157/*!
158	\var BMessage::what
159	\brief A 4-byte constant that determines the type of message.
160
161	You can directly manipulate this data member.
162
163	\since BeOS R3
164*/
165
166
167/*!
168	\fn BMessage::BMessage()
169	\brief Construct an empty message, without any data members and with a
170	       \a what constant set to \c 0.
171
172	\see BMessage(uint32 what)
173	\see BMessage(const BMessage& other)
174
175	\since BeOS R3
176*/
177
178
179/*!
180	\fn BMessage::BMessage(uint32 what)
181	\brief Construct an empty message with the \a what member set to the
182	       specified value.
183
184	\see BMessage::BMessage()
185	\see BMessage::BMessage(const BMessage& other)
186
187	\since BeOS R3
188*/
189
190
191/*!
192	\fn BMessage::BMessage(const BMessage& other)
193	\brief Construct a new message that is a copy of another message.
194
195	The \a what member and the data values are copied. The metadata, such as
196	whether or not the message is a drop message or reply information is
197	not copied. If the original message is a reply to a previous message
198	this will make IsReply() return \c true, while calling the same method on
199	a copy of the message will return \c false.
200
201	\remark BeOS kept the metadata of the message while Haiku deviates from
202	        this behavior. Use the Haiku implementation of message copying
203	        as the default behavior to keep your applications backwards
204	        compatible.
205
206	\see BMessage::BMessage()
207	\see BMessage(uint32 what)
208
209	\since BeOS R3
210*/
211
212
213/*!
214	\fn BMessage::~BMessage()
215	\brief Free the data members associated with the message.
216
217	If there still is a sender waiting for a reply, the \c B_NO_REPLY message
218	will be sent to inform them that there won't be a reply.
219
220	\since BeOS R3
221*/
222
223
224/*!
225	\name Statistics and Miscellaneous Information
226*/
227
228
229//! @{
230
231
232/*!
233	\fn status_t BMessage::GetInfo(type_code typeRequested, int32 index,
234	 	char** nameFound, type_code* typeFound, int32* countFound) const
235	\brief Retrieve the name, the type and the number of items in a message by
236	       an \a index.
237
238	\param[in] typeRequested If you want to limit the search to only one type,
239	           pass that type code here. If you don't care which type the data
240	           has, you can pass \c B_ANY_TYPE.
241	\param[in] index The index of the data you want to investigate.
242	\param[out] nameFound The name of the item if it is found. Haiku will fill
243	            in a pointer to the internal name buffer in the message. This
244	            means that you should not manipulate this name. If you are not
245	            interested in the name, you can safely pass \c NULL.
246	\param[out] typeFound The type of the item at \a index. If you are
247	            not interested in the type (because you specifically asked for
248	            a type), you can safely pass \c NULL.
249	\param[out] countFound The number of items at \a index. If data
250	            items have the same name, they will be placed under the same
251	            index.
252
253	\return If the \a index is found, and matches the requested type,
254	        then the other parameters will be filled in. If this is not the
255	        case, the method will return with an error.
256	\retval B_OK An match was found. The values have been filled in.
257	\retval B_BAD_INDEX The \a index was out of range. None of the
258	        passed variables have been altered.
259	\retval B_BAD_TYPE The data field at \a index does not have the
260	        requested type.
261
262	\since BeOS R3
263*/
264
265
266/*!
267	\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
268	 	int32* countFound) const
269	\brief Retrieve the type and the number of data items in this message that
270	       are associated with a \a name.
271
272	\param[in] name The name of the data member that you are looking for.
273	\param[out] typeFound In case of a match, the name of the data member will
274	            be put in this parameter. In case you are not interested, you
275	            can pass \c NULL.
276	\param[out] countFound In case of a match, the number of items at this
277	            label will be in this parameter. In case you are not
278	            interested, you can safely pass \c NULL.
279
280	\return If the message has data associated with the given \a name,
281	        the other parameters will contain information associated with the
282	        data, else, the method will return with an error.
283	\retval B_OK A match was found. The other parameters have been filled in.
284	\retval B_BAD_VALUE You passed \c NULL as argument to \a name.
285	\retval B_NAME_NOT_FOUND There is no data with the label \a name.
286
287	\since BeOS R3
288*/
289
290
291/*!
292	\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
293	 	bool* fixedSize) const
294	\brief Retrieve the type and whether or not the size of the data is fixed
295		associated with a \a name.
296
297	This method is the same as GetInfo(const char*, type_code*, int32*) const,
298	with the difference that you can find out whether or not the size of the
299	data associated with the \a name is fixed. You will get this value
300	in the variable you passed as \a fixedSize parameter.
301
302	\since BeOS R4
303*/
304
305
306/*!
307	\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
308	 	int32* countFound, bool* fixedSize) const
309	\brief Retrieve the type and whether or not the size of the data is fixed
310		associated with a \a name.
311
312	This method is the same as GetInfo(const char*, type_code*, int32*) const,
313	with the difference that you can find out whether or not the size of the
314	data associated with the \a name is fixed. You will get this value
315	in the variable you passed as \a fixedSize parameter.
316
317	\since BeOS R4
318*/
319
320
321/*!
322	\fn int32 BMessage::CountNames(type_code type) const
323	\brief Count the number of names of a certain \a type.
324
325	This method can be used to count the number of items of a certain type.
326	It's practical use is limited to debugging purposes.
327
328	\param type The type you want to find. If you pass \c B_ANY_TYPE, this
329	       method will return the total number of data items.
330
331	\return The number of data items in this message with the specified
332	        \a type, or \c 0 in case no items match the type.
333
334	\since BeOS R3
335*/
336
337
338/*!
339	\fn bool BMessage::IsEmpty() const
340	\brief Check if the message has data members.
341
342	\return If this message contains data members, this method will return
343	        \c true, else it will return \c false.
344
345	\see MakeEmpty()
346
347	\since BeOS R3
348*/
349
350
351/*!
352	\fn bool BMessage::IsSystem() const
353	\brief Check if the message is a system message.
354
355	\return If this message is a system message, the method will return
356	        \c true.
357
358	\since BeOS R3
359*/
360
361
362/*!
363	\fn bool BMessage::IsReply() const
364	\brief Check if the message is a reply to a (previous) message.
365
366	\return If this message is a reply, this method will return \c true.
367
368	\since BeOS R3
369*/
370
371
372/*!
373	\fn void BMessage::PrintToStream() const
374	\brief Print the message to the standard output.
375
376	This method can be used to debug your application. It can be used to check
377	if it creates the messages properly, by checking if all the required fields
378	are present, and it can be used to debug your message handling routines,
379	especially the handling of those that are sent by external applications, to
380	see if you understand the semantics correctly.
381
382	\since BeOS R3
383*/
384
385
386/*!
387	\fn status_t BMessage::Rename(const char* oldEntry, const char* newEntry)
388	\brief Rename a data label.
389
390	\param oldEntry The name of the label you want to rename.
391	\param newEntry The new name of the data entry.
392
393	\returns A status code, \c B_OK on success or an error code.
394	\retval B_OK Renaming succeeded.
395	\retval B_BAD_VALUE Either the \a oldEntry or the
396	        \a newEntry pointers are \c NULL.
397	\retval B_NAME_NOT_FOUND There is no data associated with the label
398	        \a oldEntry.
399
400	\since Haiku R1
401*/
402
403
404//! @}
405
406
407/*!
408	\name Delivery Info
409*/
410
411
412//! @{
413
414
415/*!
416	\fn bool BMessage::WasDelivered() const
417	\brief Check if this message was delivered through the delivery methods.
418
419	If this message is passed via a BMessenger or BLooper::PostMessage(), this
420	method will return \c true.
421
422	\warning This method should not be abused by a thread that sends a message
423	         to track whether or not a message was delivered. This is because
424	         the ownership of the message goes to the receiving looper, which
425	         will delete the message as soon as it is done with it.
426
427	\warning If you need to check whether a message is delivered, you should
428	         either ask for a reply, or use one of the synchronous
429	         BMessenger::SendMessage() methods.
430
431	\since BeOS R3
432*/
433
434
435/*!
436	\fn bool BMessage::IsSourceWaiting() const
437	\brief Check if the sender expects a reply.
438
439	This method will return \c true, if the sender flagged that it is waiting
440	for a reply, and such a reply has not yet been sent.
441
442	\since BeOS R3
443*/
444
445
446/*!
447	\fn bool BMessage::IsSourceRemote() const
448	\brief Check if the message is sent by another application.
449
450	\since BeOS R3
451*/
452
453
454/*!
455	\fn BMessenger BMessage::ReturnAddress() const
456	\brief Get a messenger that points to the sender of the message.
457
458	Using this method, you can fetch a BMessenger that can be used to deliver
459	replies to this message. This method works both for local and remote
460	deliveries.
461
462	For remote deliveries, this approach is preferred over sending the reply
463	using a standard BMessenger that is created with the signature of the
464	application. A standard BMessenger sends the messages to the main BLooper
465	of the application, the BApplication object. With the delivery data stored
466	in the messages, the reply using this messenger will be directed at a
467	specific looper that is able to handle the replies.
468
469	If this method is called on a message that has not been delivered (yet),
470	it will return an empty BMessenger object.
471
472	\since BeOS R3
473*/
474
475
476/*!
477	\fn const BMessage* BMessage::Previous() const
478	\brief Get the message to which this message is a reply.
479
480	\return Returns a new BMessage with the same data stuctures as the message
481	        to which this message is a reply. The pointer is only valid as
482			long as this message is still allocated, you do not get ownership.
483			If this message isn't a reply to another message, this method will
484			return \c NULL.
485
486	\since BeOS R3
487*/
488
489
490/*!
491	\fn bool BMessage::WasDropped() const
492	\brief Check if the message was delivered through 'drag and drop'.
493
494	\return This method returns \c true if the message has been delivered
495	        through drag and drop. It returns \c false if it has been delivered
496	        through the regular messaging functions, or if the message has not
497	        been delivered at all.
498
499	\see DropPoint()
500
501	\since BeOS R3
502*/
503
504
505/*!
506	\fn BPoint BMessage::DropPoint(BPoint* offset) const
507	\brief Get the coordinates of the drop point of the message.
508
509	If the message has been delivered because of drag and drop, which can be
510	verified with the WasDropped() method, this method will return a BPoint to
511	where exactly the drop off was made.
512
513	Because drop messages are delivered to the BWindow in which they were
514	dropped, and BWindow is a subclass of BLooper, you can use BWindow to
515	determine based on the location, how you should react to it.
516
517	If this message was not delivered through drag and drop, it will return
518	a \c NULL pointer.
519
520	\see WasDropped()
521
522	\since BeOS R3
523*/
524
525
526//! @}
527
528
529/*!
530	\name Replying
531*/
532
533
534//! @{
535
536
537/*!
538	\fn status_t BMessage::SendReply(uint32 command, BHandler* replyTo)
539	\brief Asynchronously send a reply to this message.
540
541	This is an overloaded member of
542	SendReply(BMessage*, BMessenger, bigtime_t). Use this variant if you
543	want to send a message without data members.
544
545	\since BeOS R3
546*/
547
548
549/*!
550	\fn status_t BMessage::SendReply(BMessage* reply, BHandler* replyTo,
551		bigtime_t timeout)
552	\brief Asynchronously send a reply to this message.
553
554	This is an overloaded member of SendReply(BMessage*, BMessenger, bigtime_t).
555	Use this variant if you want to send the message to a specific handler
556	(instead of a complete messenger).
557
558	\since BeOS R3
559*/
560
561
562/*!
563	\fn status_t BMessage::SendReply(BMessage* reply, BMessenger replyTo,
564		bigtime_t timeout)
565	\brief Asynchronously send a reply to this message.
566
567	This method sends a reply to this message to the sender. On your turn,
568	you specify a messenger that handles a reply back to the message you
569	specify as the \a reply argument. You can set a timeout for the
570	message to be delivered. This method blocks until the message has been
571	received, or the \a timeout has been reached.
572
573	\param reply The message that is in reply to this message.
574	\param replyTo In case the receiver needs to reply to the message you are
575	       sending, you can specify the return address with this argument.
576	\param timeout The maximum time in microseconds this delivery may take. The
577	       \a timeout is a relative timeout. You can also use
578	       \c B_INFINITE_TIMEOUT if you want to wait infinitely for the message
579	       to be delivered.
580
581	\returns A status code, \c B_OK on success or an error code.
582	\retval B_OK The message has been delivered.
583	\retval B_DUPLICATE_REPLY There already has been a reply to this message.
584	\retval B_BAD_PORT_ID The reply address is not valid (anymore).
585	\retval B_WOULD_BLOCK The delivery \a timeout was
586	        \c B_INFINITE_TIMEOUT (\c 0) and the target port was full when
587	        trying to deliver the message.
588	\retval B_TIMED_OUT The timeout expired while trying to deliver the
589	        message.
590
591	\see SendReply(uint32 command, BHandler* replyTo)
592
593	\since Haiku R1
594*/
595
596
597/*!
598	\fn status_t BMessage::SendReply(uint32 command, BMessage* replyToReply)
599	\brief Synchronously send a reply to this message, and wait for a reply
600	       back.
601
602	This is an overloaded member of
603	SendReply(BMessage*, BMessage*, bigtime_t, bigtime_t)
604	Use this variant if you want to send a message without data members.
605
606	\since BeOS R3
607*/
608
609
610/*!
611	\fn status_t BMessage::SendReply(BMessage* reply, BMessage* replyToReply,
612		bigtime_t sendTimeout, bigtime_t replyTimeout)
613	\brief Synchronously send a reply to this message, and wait for a reply
614	       back.
615
616	This method sends a reply to this message to the sender. The
617	\a reply is delivered, and then the method waits for a reply from
618	the receiver. If a reply is received, that reply is copied into the
619	\a replyToReply argument.
620	If the message was delivered properly, but the receiver did not reply
621	within the specified \a replyTimeout, the \a what member of
622	\a replyToReply will be set to \c B_NO_REPLY.
623
624	\param reply The message that is in reply to this message.
625	\param[out] replyToReply The reply is copied into this argument.
626	\param sendTimeout The maximum time in microseconds this delivery may take.
627	       The \a timeout is a relative timeout. You can also use
628	       \c B_INFINITE_TIMEOUT if you want to wait infinitely for the message
629	       to be delivered.
630	\param replyTimeout The maximum time in microseconds you want to wait for a
631	       reply. Note that the timer starts when the message has been
632	       delivered.
633
634	\returns A status code, \c B_OK on success or an error code.
635	\retval B_OK The message has been delivered.
636	\retval B_DUPLICATE_REPLY There already has been a reply to this message.
637	\retval B_BAD_VALUE Either \a reply or \a replyToReply is \c NULL.
638	\retval B_BAD_PORT_ID The reply address is not valid (anymore).
639	\retval B_WOULD_BLOCK The delivery \a timeout was
640	        \c B_INFINITE_TIMEOUT (\c 0) and the target port was full when
641	        trying to deliver the message.
642	\retval B_TIMED_OUT The timeout expired while trying to deliver the
643	        message.
644	\retval B_NO_MORE_PORTS All reply ports are in use.
645
646	\see SendReply(uint32 command, BMessage* replyToReply)
647
648	\since BeOS R3
649*/
650
651
652//! @}
653
654
655/*!
656	\name Flattening
657
658	Because of historical reasons and for binary compatibility, this class
659	provides a flattening API without inheriting the BFlattenable class. The
660	API is more or less the same, but you are inconvenienced when you want to
661	use messages in methods that handle BFlattenable objects.
662*/
663
664
665//! @{
666
667
668/*!
669	\fn ssize_t BMessage::FlattenedSize() const
670	\brief Return the size in bytes required when you want to flatten this
671	       message to a stream of bytes.
672
673	\since BeOS R3
674*/
675
676
677/*!
678	\fn status_t BMessage::Flatten(char* buffer, ssize_t size) const
679	\brief Flatten the message to a \a buffer.
680
681	\param buffer The buffer to write the data to.
682	\param size The size of the buffer.
683
684	\return \c B_OK in case of success, or an error code in case something
685	        went awry.
686
687	\warning Make sure the buffer is large enough to hold the message. This
688	         method does not double-check for you!
689
690	\see FlattenedSize()
691	\see Flatten(BDataIO* stream, ssize_t* size) const
692
693	\since BeOS R3
694*/
695
696
697/*!
698	\fn status_t BMessage::Flatten(BDataIO* stream, ssize_t* size) const
699	\brief Flatten the message to a \a stream.
700
701	\param[in]  stream The stream to flatten the message to.
702	\param[out] size The method writes the number of bytes actually written
703	            to this argument.
704	\return \c B_OK in case of success, or an error code in case something
705	        went awry.
706
707	\warning Make sure the subclass of the BDataIO interface either protects
708	         against buffer overwrites, or check if the number of bytes that
709	         is going to be written isn't larger than it can handle.
710
711	\see FlattenedSize()
712	\see Flatten(char* buffer, ssize_t size) const
713
714	\since BeOS R3
715*/
716
717
718/*!
719	\fn status_t BMessage::Unflatten(const char* flatBuffer)
720	\brief Unflatten a message from a buffer and put it into the current
721	       object.
722
723	This action clears the current contents of the message.
724
725	\param flatBuffer The buffer that contains the message.
726
727	\returns A status code, \c B_OK on success or an error code.
728	\retval B_OK The buffer has been unflattened.
729	\retval B_BAD_VALUE The buffer does not contain a valid message.
730	\retval B_NO_MEMORY An error occured whilst allocating memory for the data
731	        members.
732
733	\see Flatten(char* buffer, ssize_t size) const
734	\see Unflatten(BDataIO* stream)
735
736	\since BeOS R3
737*/
738
739
740/*!
741	\fn status_t BMessage::Unflatten(BDataIO* stream)
742	\brief Unflatten a message from a stream and put it into the current
743	       object.
744
745	This action clears the current contents of the message.
746
747	\param stream The stream that contains the message.
748
749	\returns A status code, \c B_OK on success or an error code.
750	\retval B_OK The message has been unflattened.
751	\retval B_BAD_VALUE The stream does not contain a valid message.
752	\retval B_NO_MEMORY An error occured whilst allocating memory for the
753	        data members.
754
755	\see Flatten(BDataIO* stream, ssize_t* size) const
756	\see Unflatten(const char*)
757
758	\since BeOS R3
759*/
760
761
762//! @}
763
764
765/*!
766	\name Specifiers (Scripting)
767*/
768
769
770//! @{
771
772
773/*!
774	\fn status_t BMessage::AddSpecifier(const char* property)
775	\brief Undocumented.
776
777	\since BeOS R3
778*/
779
780
781/*!
782	\fn status_t BMessage::AddSpecifier(const char* property, int32 index)
783	\brief Undocumented.
784
785	\since BeOS R3
786*/
787
788
789/*!
790	\fn status_t BMessage::AddSpecifier(const char* property, int32 index,
791		int32 range)
792	\brief Undocumented.
793
794	\since BeOS R3
795*/
796
797
798/*!
799	\fn status_t BMessage::AddSpecifier(const char* property, const char* name)
800	\brief Undocumented.
801
802	\since BeOS R3
803*/
804
805
806/*!
807	\fn status_t BMessage::AddSpecifier(const BMessage* specifier)
808	\brief Undocumented.
809
810	\since BeOS R3
811*/
812
813
814/*!
815	\fn status_t BMessage::SetCurrentSpecifier(int32 index)
816	\brief Undocumented.
817
818	\since Haiku R1
819*/
820
821
822/*!
823	\fn status_t BMessage::GetCurrentSpecifier(int32* index,
824		BMessage* specifier, int32* what, const char** property) const
825	\brief Undocumented.
826
827	\since BeOS R3
828*/
829
830
831/*!
832	\fn bool BMessage::HasSpecifiers() const
833	\brief Undocumented.
834
835	\since BeOS R3
836*/
837
838
839/*!
840	\fn status_t BMessage::PopSpecifier()
841	\brief Undocumented.
842
843	\since BeOS R3
844*/
845
846
847//! @}
848
849
850/*!
851	\name Adding Data
852*/
853
854
855//! @{
856
857
858/*!
859	\fn status_t BMessage::AddData(const char* name, type_code type,
860		const void* data, ssize_t numBytes, bool isFixedSize, int32 count)
861	\brief Add \a data of a certain \a type to the message.
862
863	The amount of \a numBytes is copied into the message. The data is
864	stored at the label specified in \a name. You are responsible for
865	specifying the correct \a type. The Haiku API already specifies
866	many constants, such as \c B_FLOAT_TYPE or \c B_RECT_TYPE. See
867	TypeConstants.h for more information on the system-wide defined types.
868
869	If the field with the \a name already exists, the data is added in
870	an array-like form. If you are adding a certain \a name for the
871	first time, you are able to specify some properties of this array. You can
872	fix the size of each data entry, and you can also instruct BMessage to
873	allocate a \a count of items. The latter does not mean that the
874	number of items is fixed; the array will grow nonetheless. Also, note that
875	every \a name can only be associated with one \a type of
876	data.
877
878	If consecutive method calls specify a different \a type than the
879	initial, these calls will fail.
880
881	There is no limit to the number of labels, or the amount of data, but
882	note that searching of data members is linear, as well as that some
883	messages will be copied whilst being passed around, so if the amount of
884	data you need to pass is too big, find another way to pass it.
885
886	\param name The label to which this data needs to be associated. If the
887	       \a name already exists, the new data will be added in an
888	       array-like style.
889	\param type The type of data. If you are adding data to the same
890	\a name, make sure it is the same type.
891	\param data The data buffer to copy the bytes from.
892	\param numBytes The number of bytes to be copied. If this is the first
893	       call to this method for this type of data, and you set
894	       \a isFixedSize to \c true, this will specify the size of all
895	       consecutive calls to this method.
896	\param isFixedSize If this is the first call to this method with this
897	       \a name, you can specify the whether or not all items in this
898	       array should have the same fixed size.
899	\param count If this is the first call to this method with this
900	       \a name, you can instruct this message to allocate a number of
901	       items in advance. This does not limit the amount of items though.
902	       The array will grow if needed.
903
904	\returns A status code, \c B_OK on success or an error code.
905	\retval B_OK The \a data is succesfully added.
906	\retval B_BAD_VALUE The \a numBytes is less than, or equal to \c 0,
907	        or the size of this item is larger than the \a name allows,
908	        since it has been specified to have a fixed size.
909	\retval B_ERROR There was an error whilst creating the label with
910	        your \a name.
911	\retval B_BAD_TYPE The \a type you specified is different than the
912	        one already associated with \a name.
913
914	\since BeOS R3
915*/
916
917
918/*!
919	\fn status_t BMessage::AddAlignment(const char* name,
920		const BAlignment& alignment)
921	\brief Convenience method to add a BAlignment to the label \a name.
922
923	This method calls AddData() with the \c B_ALIGNMENT_TYPE \a type.
924
925	\param name The label to associate the data with.
926	\param alignment The alignment to store in the message.
927
928	\returns A status code, \c B_OK on success or an error code.
929
930	\see AddData() for a more detailed overview of the inner workings.
931	\see FindAlignment()
932	\see GetAlignment()
933	\see ReplaceAlignment()
934
935	\since Haiku R1
936*/
937
938
939/*!
940	\fn status_t BMessage::AddRect(const char* name, BRect aRect)
941	\brief Convenience method to add a BRect to the label \a name.
942
943	This method calls AddData() with the \c B_RECT_TYPE \a type.
944
945	\param name The label to associate the data with.
946	\param aRect The rectangle to store in the message.
947
948	\returns A status code, \c B_OK on success or an error code.
949
950	\see AddData() for a more detailed overview of the inner workings.
951	\see FindRect()
952	\see GetRect()
953	\see ReplaceRect()
954
955	\since BeOS R3
956*/
957
958
959/*!
960	\fn status_t BMessage::AddPoint(const char* name, BPoint aPoint)
961	\brief Convenience method to add a BPoint to the label \a name.
962
963	This method calls AddData() with the \c B_POINT_TYPE \a type.
964
965	\param name The label to associate the data with.
966	\param aPoint The point to store in the message.
967
968	\returns A status code, \c B_OK on success or an error code.
969
970	\see AddData() for a more detailed overview of the inner workings.
971	\see FindPoint()
972	\see GetPoint()
973	\see ReplacePoint()
974
975	\since BeOS R3
976*/
977
978
979/*!
980	\fn status_t BMessage::AddSize(const char* name, BSize size)
981	\brief Convenience method to add a BSize to the label \a name.
982
983	This method calls AddData() with the \c B_SIZE_TYPE \a type.
984
985	\param name The label to associate the data with.
986	\param size The BSize to store in the message.
987
988	\returns A status code, \c B_OK on success or an error code.
989
990	\see AddData() for a more detailed overview of the inner workings.
991	\see FindSize()
992	\see GetSize()
993	\see ReplaceSize()
994
995	\since Haiku R1
996*/
997
998
999/*!
1000	\fn status_t BMessage::AddString(const char* name, const char* aString)
1001	\brief Convenience method to add a C-string to the label \a name.
1002
1003	This method calls AddData() with the \c B_STRING_TYPE \a type.
1004
1005	\param name The label to associate the data with.
1006	\param aString The string to copy to the message.
1007
1008	\returns A status code, \c B_OK on success or an error code.
1009
1010	\see AddData() for a more detailed overview of the inner workings.
1011	\see FindString()
1012	\see GetString()
1013	\see ReplaceString()
1014
1015	\since BeOS R3
1016*/
1017
1018
1019/*!
1020	\fn status_t BMessage::AddString(const char* name, const BString& aString)
1021	\brief Convenience method to add a BString to the label \a name.
1022
1023	This method calls AddData() with the \c B_STRING_TYPE \a type.
1024
1025	\param name The label to associate the data with.
1026	\param aString The string to copy to the message.
1027
1028	\returns A status code, \c B_OK on success or an error code.
1029
1030	\see AddData() for a more detailed overview of the inner workings.
1031	\see FindString()
1032	\see GetString()
1033	\see ReplaceString()
1034
1035	\since BeOS R5
1036*/
1037
1038
1039/*!
1040	\fn status_t BMessage::AddStrings(const char* name,
1041		const BStringList& list)
1042	\brief Convenience method to add list of strings to the label \a name.
1043
1044	This method calls AddData() with the \c B_STRING_TYPE \a type for each
1045	string in the BStringList.
1046
1047	\param name The label to associate the data with.
1048	\param list The list of strings to store in the message.
1049
1050	\returns A status code, \c B_OK on success or an error code.
1051
1052	\see AddData() for a more detailed overview of the inner workings.
1053	\see FindStrings()
1054	\see GetStrings()
1055	\see ReplaceStrings()
1056
1057	\since Haiku R1
1058*/
1059
1060
1061/*!
1062	\fn status_t BMessage::AddInt8(const char* name, int8 value)
1063	\brief Convenience method to add an \c int8 to the label \a name.
1064
1065	This method calls AddData() with the \c B_INT8_TYPE \a type.
1066
1067	\param name The label to associate the data with.
1068	\param value The value to store in the message.
1069
1070	\returns A status code, \c B_OK on success or an error code.
1071
1072	\see AddData() for a more detailed overview of the inner workings.
1073	\see FindInt8()
1074	\see GetInt8()
1075	\see ReplaceInt8()
1076
1077	\since BeOS R3
1078*/
1079
1080
1081/*!
1082	\fn status_t BMessage::AddUInt8(const char* name, uint8 value)
1083	\brief Convenience method to add an \c uint8 to the label \a name.
1084
1085	This method calls AddData() with the \c B_UINT8_TYPE \a type.
1086
1087	\param name The label to associate the data with.
1088	\param value The value to store in the message.
1089
1090	\returns A status code, \c B_OK on success or an error code.
1091
1092	\see AddData() for a more detailed overview of the inner workings.
1093	\see FindUInt8()
1094	\see GetUInt8()
1095	\see ReplaceUInt8()
1096
1097	\since BeOS R3
1098*/
1099
1100
1101/*!
1102	\fn status_t BMessage::AddInt16(const char* name, int16 value)
1103	\brief Convenience method to add an \c int16 to the label \a name.
1104
1105	This method calls AddData() with the \c B_INT16_TYPE \a type.
1106
1107	\param name The label to associate the data with.
1108	\param value The value to store in the message.
1109
1110	\returns A status code, \c B_OK on success or an error code.
1111
1112	\see AddData() for a more detailed overview of the inner workings.
1113	\see FindInt16()
1114	\see GetInt16()
1115	\see ReplaceInt16()
1116
1117	\since BeOS R3
1118*/
1119
1120
1121/*!
1122	\fn status_t BMessage::AddUInt16(const char* name, uint16 value)
1123	\brief Convenience method to add an \c uint16 to the label \a name.
1124
1125	This method calls AddData() with the \c B_UINT16_TYPE \a type.
1126
1127	\param name The label to associate the data with.
1128	\param value The value to store in the message.
1129
1130	\returns A status code, \c B_OK on success or an error code.
1131
1132	\see AddData() for a more detailed overview of the inner workings.
1133	\see FindUInt16()
1134	\see GetUInt16()
1135	\see ReplaceUInt16()
1136
1137	\since BeOS R3
1138*/
1139
1140
1141/*!
1142	\fn status_t BMessage::AddInt32(const char* name, int32 value)
1143	\brief Convenience method to add an \c int32 to the label \a name.
1144
1145	This method calls AddData() with the \c B_INT32_TYPE \a type.
1146
1147	\param name The label to associate the data with.
1148	\param value The value to store in the message.
1149
1150	\returns A status code, \c B_OK on success or an error code.
1151
1152	\see AddData() for a more detailed overview of the inner workings.
1153	\see FindInt32()
1154	\see GetInt32()
1155	\see ReplaceInt32()
1156
1157	\since BeOS R3
1158*/
1159
1160
1161/*!
1162	\fn status_t BMessage::AddUInt32(const char* name, uint32 value)
1163	\brief Convenience method to add an \c uint32 to the label \a name.
1164
1165	This method calls AddData() with the \c B_UINT32_TYPE \a type.
1166
1167	\param name The label to associate the data with.
1168	\param value The value to store in the message.
1169
1170	\returns A status code, \c B_OK on success or an error code.
1171
1172	\see AddData() for a more detailed overview of the inner workings.
1173	\see FindUInt32()
1174	\see GetUInt32()
1175	\see ReplaceUInt32()
1176
1177	\since BeOS R3
1178*/
1179
1180
1181/*!
1182	\fn status_t BMessage::AddInt64(const char* name, int64 value)
1183	\brief Convenience method to add an \c int64 to the label \a name.
1184
1185	This method calls AddData() with the \c B_INT64_TYPE \a type.
1186
1187	\param name The label to associate the data with.
1188	\param value The value to store in the message.
1189
1190	\returns A status code, \c B_OK on success or an error code.
1191
1192	\see AddData() for a more detailed overview of the inner workings.
1193	\see FindInt64()
1194	\see GetInt64()
1195	\see ReplaceInt64()
1196
1197	\since BeOS R3
1198*/
1199
1200
1201/*!
1202	\fn status_t BMessage::AddUInt64(const char* name, uint64 value)
1203	\brief Convenience method to add an \c uint64 to the label \a name.
1204
1205	This method calls AddData() with the \c B_UINT64_TYPE \a type.
1206
1207	\param name The label to associate the data with.
1208	\param value The value to store in the message.
1209
1210	\returns A status code, \c B_OK on success or an error code.
1211
1212	\see AddData() for a more detailed overview of the inner workings.
1213	\see FindUInt64()
1214	\see GetUInt64()
1215	\see ReplaceUInt64()
1216
1217	\since BeOS R3
1218*/
1219
1220
1221/*!
1222	\fn status_t BMessage::AddBool(const char* name, bool aBoolean)
1223	\brief Convenience method to add a \c bool to the label \a name.
1224
1225	This method calls AddData() with the \c B_BOOL_TYPE \a type.
1226
1227	\param name The label to associate the data with.
1228	\param aBoolean The value to store in the message.
1229
1230	\returns A status code, \c B_OK on success or an error code.
1231
1232	\see AddData() for a more detailed overview of the inner workings.
1233	\see FindBool()
1234	\see GetBool()
1235	\see ReplaceBool()
1236
1237	\since BeOS R3
1238*/
1239
1240
1241/*!
1242	\fn status_t BMessage::AddFloat(const char* name, float aFloat)
1243	\brief Convenience method to add a \c float to the label \a name.
1244
1245	This method calls AddData() with the \c B_FLOAT_TYPE \a type.
1246
1247	\param name The label to associate the data with.
1248	\param aFloat The value to store in the message.
1249
1250	\returns A status code, \c B_OK on success or an error code.
1251
1252	\see AddData() for a more detailed overview of the inner workings.
1253	\see FindFloat()
1254	\see GetFloat()
1255	\see ReplaceFloat()
1256
1257	\since BeOS R3
1258*/
1259
1260
1261/*!
1262	\fn status_t BMessage::AddDouble(const char* name, double aDouble)
1263	\brief Convenience method to add a \c double to the label \a name.
1264
1265	This method calls AddData() with the \c B_DOUBLE_TYPE \a type.
1266
1267	\param name The label to associate the data with.
1268	\param aDouble The value to store in the message.
1269
1270	\returns A status code, \c B_OK on success or an error code.
1271
1272	\see AddData() for a more detailed overview of the inner workings.
1273	\see FindDouble()
1274	\see GetDouble()
1275	\see ReplaceDouble()
1276
1277	\since BeOS R3
1278*/
1279
1280
1281/*!
1282	\fn status_t BMessage::AddColor(const char* name, rgb_color aColor)
1283	\brief Convenience method to add a \c rgb_color to the label \a name.
1284
1285	This method calls AddData() with the \c B_RGB_32_BIT_TYPE \a type.
1286
1287	\param name The label to associate the data with.
1288	\param aColor The value to store in the message.
1289
1290	\returns A status code, \c B_OK on success or an error code.
1291
1292	\see AddColor() for a more detailed overview of the inner workings.
1293	\see FindColor()
1294	\see GetColor()
1295	\see ReplaceColor()
1296
1297	\since Haiku R1
1298*/
1299
1300
1301/*!
1302	\fn status_t BMessage::AddPointer(const char* name, const void* aPointer)
1303	\brief Convenience method to add a \c pointer to the label \a name.
1304
1305	This method calls AddData() with the \c B_POINTER_TYPE \a type.
1306
1307	\warning If you want to share objects between applications, remember
1308	         that each application has its own address space, and that it
1309	         therefore is useless to try to pass around objects by sending
1310	         pointers in messages. You should think about copying the
1311	         entire object in the message, or you should consider using
1312	         shared memory.
1313
1314	\param name The label to associate the data with.
1315	\param aPointer The value to store in the message.
1316
1317	\returns A status code, \c B_OK on success or an error code.
1318
1319	\see AddData() for a more detailed overview of the inner workings.
1320	\see FindPointer()
1321	\see ReplacePointer()
1322
1323	\since BeOS R3
1324*/
1325
1326
1327/*!
1328	\fn status_t BMessage::AddMessenger(const char* name, BMessenger messenger)
1329	\brief Convenience method to add a messenger to the label \a name.
1330
1331	This method calls AddData() with the \c B_MESSENGER_TYPE \a type.
1332
1333	\param name The label to associate the data with.
1334	\param messenger The messenger to store in the message.
1335
1336	\returns A status code, \c B_OK on success or an error code.
1337
1338	\see AddData() for a more detailed overview of the inner workings.
1339	\see FindMessenger()
1340	\see ReplaceMessenger()
1341
1342	\since BeOS R3
1343*/
1344
1345
1346/*!
1347	\fn status_t BMessage::AddRef(const char* name, const entry_ref* ref)
1348	\brief Convenience method to add an \c entry_ref to the label
1349	       \a name.
1350
1351	This method calls AddData() with the \c B_REF_TYPE \a type.
1352
1353	\param name The label to associate the data with.
1354	\param ref The reference to store in the message.
1355
1356	\returns A status code, \c B_OK on success or an error code.
1357
1358	\see AddData() for a more detailed overview of the inner workings.
1359	\see FindRef()
1360	\see ReplaceRef()
1361
1362	\since BeOS R3
1363*/
1364
1365
1366/*!
1367	\fn status_t BMessage::AddMessage(const char* name,
1368		const BMessage* message)
1369	\brief Convenience method to add a message to the label \a name.
1370
1371	This method calls AddData() with the \c B_MESSAGE_TYPE \a type.
1372
1373	\param name The label to associate the data with.
1374	\param message The message to store in this message.
1375
1376	\returns A status code, \c B_OK on success or an error code.
1377
1378	\see AddData() for a more detailed overview of the inner workings.
1379	\see FindMessage()
1380	\see ReplaceMessage()
1381
1382	\since BeOS R3
1383*/
1384
1385
1386/*!
1387	\fn status_t BMessage::AddFlat(const char* name, BFlattenable* object,
1388		int32 count = 1)
1389	\brief Convenience method to add a flattenable to the label \a name.
1390
1391	\deprecated This method is deprecated. Use
1392	AddFlat(const char*, const BFlattenable*, int32) instead
1393
1394	\since BeOS R3
1395*/
1396
1397
1398/*!
1399	\fn status_t BMessage::AddFlat(const char* name,
1400		const BFlattenable* object, int32 count = 1)
1401	\brief Convenience method to add a flattenable to the label \a name.
1402
1403	This method uses BFlattenable::TypeCode() to determine the type. It also
1404	uses BFlattenable::IsFixedSize() to determine whether or not the size of
1405	the object is supposedly always the same. You can specify a
1406	\a count, to pre-allocate more entries if you are going to add
1407	more than one of this type.
1408
1409	\param name The label to associate the data with.
1410	\param object The object to flatten into the message.
1411	\param count The number of items to pre-allocate associated with this
1412	       \a name.
1413
1414	\returns A status code, \c B_OK on success or an error code.
1415
1416	\see AddData() for a more detailed overview of the inner workings.
1417	\see FindFlat()
1418	\see ReplaceFlat()
1419
1420	\since Haiku R1
1421*/
1422
1423
1424/*!
1425	\fn status_t BMessage::Append(const BMessage& message)
1426	\brief Append the data of another \a message to this message.
1427
1428	This copies all the data of the \a message to this message. If an item
1429	already exists with a given name, and the incoming data is of the same
1430	type, the new items will be added to that label. If the item exists but
1431	has a different type, then the call will fail. This might leave your
1432	message in an incomplete state, because data is processed field by field,
1433	so it could be that some data was copied succesfully. After encountering an
1434	incompatible data type, any data after that field will not be processed.
1435
1436	\param message The message with the data you want to append. This message
1437		will not be modified.
1438
1439	\returns A status code, \c B_OK on success or an error code.
1440*/
1441
1442//! @}
1443
1444
1445/*!
1446	\name Removing Data
1447*/
1448
1449
1450//! @{
1451
1452
1453/*!
1454	\fn status_t BMessage::RemoveData(const char* name, int32 index)
1455	\brief Remove data associated with \a name at a specified
1456	       \a index.
1457
1458	If this is the only instance of the data, then the entire label will be
1459	removed. This means you can recreate it with another type.
1460
1461	\param name The \a name of which the associated data should be cleared.
1462	\param index The \a index of the item that should be cleared.
1463
1464	\returns A status code, \c B_OK on success or an error code.
1465	\retval B_OK The data has been removed.
1466	\retval B_BAD_VALUE The \a index is less than \c 0.
1467	\retval B_BAD_INDEX The \a index is out of bounds.
1468	\retval B_NAME_NOT_FOUND The \a name does not have any data associated
1469	        with it.
1470
1471	\see RemoveName()
1472	\see MakeEmpty()
1473
1474	\since BeOS R3
1475*/
1476
1477
1478/*!
1479	\fn status_t BMessage::RemoveName(const char* name)
1480	\brief Remove all data associated with a \a name.
1481
1482	This also removes the label, so that you can recreate it with another type,
1483	if you want to.
1484
1485	\param name The \a name that refers to the data you want to clear out.
1486
1487	\returns A status code, \c B_OK on success or an error code.
1488	\retval B_OK All the data is removed.
1489	\retval B_BAD_VALUE The \a name pointer points to \c NULL.
1490	\retval B_NAME_NOT_FOUND The \a name does not exist in this message.
1491
1492	\see RemoveData()
1493	\see MakeEmpty()
1494
1495	\since BeOS R3
1496*/
1497
1498
1499/*!
1500	\fn status_t BMessage::MakeEmpty()
1501	\brief Clear all data and metadata in this message.
1502
1503	Everything is cleared out, all labels and all associated data, as well
1504	as metadata such as reply info.
1505
1506	\return This method always returns \c B_OK.
1507
1508	\see RemoveData()
1509	\see RemoveName()
1510
1511	\since BeOS R3
1512*/
1513
1514
1515//! @}
1516
1517
1518/*!
1519	\name Finding Data
1520
1521	Look at FindData() for a general introduction to finding data.
1522*/
1523
1524/* TODO:
1525	Quick overview:
1526
1527	<table>
1528		<tr><th>Type of data</th><th>Type code</th><th>Method</td></tr>
1529		<tr><td>BRect</td><td>\c B_RECT_TYPE</td><td>FindRect()</td></tr>
1530	</table>
1531*/
1532
1533
1534//! @{
1535
1536
1537/*!
1538	\fn status_t BMessage::FindData(const char* name, type_code type,
1539		int32 index, const void** data, ssize_t* numBytes) const
1540	\brief Find \a data that is stored in this message at an
1541	       \a index.
1542
1543	This method matches the label \a name with the \a type you
1544	are asking for, and it looks for the data that is stored at a certain
1545	\a index number. If all these things match, you will get a pointer
1546	to the internal buffer, and the method will put the size of the item in
1547	\a numBytes.
1548
1549	Note that only this method, and FindString(const char*, const char**),
1550	pass a pointer to the internal buffer. The other more specific methods,
1551	such as FindBool() and FindRect() copy the data into a buffer you specify.
1552	This means that the data retrieved with this method is valid until the
1553	message is deleted.
1554
1555	\param name The label the data should be associated with.
1556	\param type The type of data you want to retrieve. You can pass
1557	       \c B_ANY_TYPE if you don't mind which type the data is.
1558	\param index The index in the array of the data that you want to retrieve.
1559	       Note that the array is zero-based.
1560	\param[out] data A pointer to a pointer where the data can point to.
1561	\param[out] numBytes The size of the data will be put in this parameter.
1562
1563	\returns A status code, \c B_OK on success or an error code.
1564	\retval B_OK The \a name was found, matches the type, and the data
1565	        at \a index has been put in \a data.
1566	\retval B_BAD_VALUE One of the output arguments were \c NULL.
1567	\retval B_BAD_INDEX The \a index does not exist.
1568	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1569
1570	\see status_t FindData(const char*, type_code, int32,
1571		const void**, ssize_t*) const
1572
1573	\since BeOS R3
1574*/
1575
1576
1577/*!
1578	\fn status_t BMessage::FindData(const char* name, type_code type,
1579		const void** data, ssize_t* numBytes) const
1580	\brief Find \a data that is stored in this message.
1581
1582	This is an overloaded version of
1583	FindData(const char*, type_code, int32, const void**, ssize_t*) const
1584	where data is sought at \a index \c 0.
1585
1586	\since BeOS R3
1587*/
1588
1589
1590/*!
1591	\fn status_t BMessage::FindAlignment(const char* name,
1592		BAlignment* alignment) const
1593	\brief Find an alignment at the label \a name.
1594
1595	This is an overloaded version of
1596	FindAlignment(const char*, int32, BAlignment*) const
1597	where the data is sought at \a index \c 0.
1598
1599	\since Haiku R1
1600*/
1601
1602
1603/*!
1604	\fn status_t BMessage::FindAlignment(const char* name, int32 index,
1605		BAlignment* alignment) const
1606	\brief Find an alignment at the label \a name at an \a index.
1607
1608	This method looks for the data with the \c B_ALIGNMENT_TYPE, and copies
1609	it into a provided buffer.
1610
1611	\param name The label to which the data is associated.
1612	\param index The index from which the data should be copied.
1613	\param alignment The object in which the data should be copied.
1614
1615	\returns A status code, \c B_OK on success or an error code.
1616	\retval B_OK The object now contains the requested data.
1617	\retval B_BAD_INDEX The \a index does not exist.
1618	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1619
1620	\see FindAlignment(const char*, BAlignment*) const
1621
1622	\since Haiku R1
1623*/
1624/*!
1625	\fn status_t BMessage::FindRect(const char* name, BRect* rect) const
1626	\brief Find a rectangle at the label \a name.
1627
1628	This is an overloaded version of
1629	FindRect(const char*, int32, BRect*) const
1630	where the data is sought at \a index \c 0.
1631
1632	\since BeOS R3
1633*/
1634
1635
1636/*!
1637	\fn status_t BMessage::FindRect(const char* name, int32 index,
1638		BRect* rect) const
1639	\brief Find a rectangle at the label \a name at an \a index.
1640
1641	This method looks for the data with the \c B_RECT_TYPE, and copies it into
1642	a provided buffer.
1643
1644	\param name The label to which the data is associated.
1645	\param index The index from which the data should be copied.
1646	\param rect The object in which the data should be copied.
1647
1648	\returns A status code, \c B_OK on success or an error code.
1649	\retval B_OK The object now contains the requested data.
1650	\retval B_BAD_INDEX The \a index does not exist.
1651	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1652
1653	\see FindRect(const char*, BRect*) const
1654
1655	\since BeOS R3
1656*/
1657
1658
1659/*!
1660	\fn status_t BMessage::FindPoint(const char* name, BPoint* point) const
1661	\brief Find a point at the label \a name.
1662
1663	This is an overloaded version of
1664	FindPoint(const char*, int32, BPoint*) const
1665	where the data is sought at \a index \c 0.
1666
1667	\since BeOS R3
1668*/
1669
1670
1671/*!
1672	\fn status_t BMessage::FindPoint(const char* name, int32 index,
1673		BPoint* point) const
1674	\brief Find a point at the label \a name at an \a index.
1675
1676	This method looks for the data with the \c B_POINT_TYPE, and copies it into
1677	a provided buffer.
1678
1679	\param name The label to which the data is associated.
1680	\param index The index from which the data should be copied.
1681	\param point The object in which the data should be copied.
1682
1683	\returns A status code, \c B_OK on success or an error code.
1684	\retval B_OK The object now contains the requested data.
1685	\retval B_BAD_INDEX The \a index does not exist.
1686	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1687
1688	\see FindPoint(const char*, BPoint*) const
1689
1690	\since BeOS R3
1691*/
1692
1693
1694/*!
1695	\fn status_t BMessage::FindSize(const char* name, BSize* size) const
1696	\brief Find a size at the label \a name.
1697
1698	This is an overloaded version of
1699	FindSize(const char*, int32, BSize*) const
1700	where the data is sought at \a index \c 0.
1701
1702	\since Haiku R1
1703*/
1704
1705
1706/*!
1707	\fn status_t BMessage::FindSize(const char* name, int32 index,
1708		BSize* size) const
1709	\brief Find a size at the label \a name at an \a index.
1710
1711	This method looks for the data with the \c B_SIZE_TYPE, and copies it into
1712	a provided buffer.
1713
1714	\param name The label to which the data is associated.
1715	\param index The index from which the data should be copied.
1716	\param size The object in which the data should be copied.
1717
1718	\returns A status code, \c B_OK on success or an error code.
1719	\retval B_OK The object now contains the requested data.
1720	\retval B_BAD_INDEX The \a index does not exist.
1721	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1722
1723	\see FindSize(const char*, BSize*) const
1724
1725	\since Haiku R1
1726*/
1727
1728
1729/*!
1730	\fn status_t BMessage::FindString(const char* name,
1731		const char** string) const
1732	\brief Find a string at the label \a name.
1733
1734	This is an overloaded version of
1735	FindString(const char*, int32, const char**) const
1736	where the data is sought at \a index \c 0.
1737
1738	\since BeOS R3
1739*/
1740
1741
1742/*!
1743	\fn status_t BMessage::FindString(const char* name, int32 index,
1744		const char** string) const
1745	\brief Find a string at the label \a name at an \a index.
1746
1747	This method looks for the data with the \c B_STRING_TYPE, and returns a
1748	pointer to the internal buffer of the message. Note that this pointer is
1749	valid, until the message is deleted.
1750
1751	\param name The label to which the data is associated.
1752	\param index The index from which the data should be copied.
1753	\param string The object in which the data should be copied.
1754
1755	\returns A status code, \c B_OK on success or an error code.
1756	\retval B_OK The object now contains the requested data.
1757	\retval B_BAD_INDEX The \a index does not exist.
1758	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1759
1760	\see FindString(const char*, const char**) const
1761	\see FindString(const char*, int32, BString*) const
1762
1763	\since BeOS R3
1764*/
1765
1766
1767/*!
1768	\fn status_t BMessage::FindString(const char* name, BString* string) const
1769	\brief Find a string at the label \a name.
1770
1771	This is an overloaded version of
1772	FindString(const char*, int32, BString*) const
1773	where the data is sought at \a index \c 0.
1774
1775	\since BeOS R5
1776*/
1777
1778
1779/*!
1780	\fn status_t BMessage::FindString(const char* name, int32 index,
1781		BString* string) const
1782	\brief Find a string at the label \a name at an \a index.
1783
1784	This method looks for the data with the \c B_STRING_TYPE, and copies it
1785	into the \a string object.
1786
1787	\param name The label to which the data is associated.
1788	\param index The index from which the data should be copied.
1789	\param string The object in which the data should be copied.
1790
1791	\returns A status code, \c B_OK on success or an error code.
1792	\retval B_OK The object now contains the requested data.
1793	\retval B_BAD_INDEX The \a index does not exist.
1794	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1795
1796	\see FindString(const char*, BString*) const
1797	\see FindString(const char*, int32, const char**) const
1798
1799	\since BeOS R5
1800*/
1801
1802
1803/*!
1804	\fn status_t BMessage::FindStrings(const char* name,
1805		BStringList* list) const
1806	\brief Find all the strings at the label \a name.
1807
1808	This method fetches all the strings that are stored at label \a name, and
1809	copies all the entries into the \a list.
1810
1811	\since Haiku R1
1812*/
1813
1814
1815/*!
1816	\fn status_t BMessage::FindInt8(const char* name, int8* value) const
1817	\brief Find an integer at the label \a name.
1818
1819	This is an overloaded version of
1820	FindInt8(const char*, int32, int8*) const
1821	where the data is sought at \a index \c 0.
1822
1823	\since BeOS R3
1824*/
1825
1826
1827/*!
1828	\fn status_t BMessage::FindInt8(const char* name, int32 index,
1829		int8* value) const
1830	\brief Find an integer at the label \a name at an \a index.
1831
1832	This method looks for the data with the \c B_INT8_TYPE, and copies it into
1833	a provided buffer.
1834
1835	\param name The label to which the data is associated.
1836	\param index The index from which the data should be copied.
1837	\param value The object in which the data should be copied.
1838
1839	\returns A status code, \c B_OK on success or an error code.
1840	\retval B_OK The object now contains the requested data.
1841	\retval B_BAD_INDEX The \a index does not exist.
1842	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1843
1844	\see FindInt8(const char*, int8*) const
1845
1846	\since BeOS R3
1847*/
1848
1849
1850/*!
1851	\fn status_t BMessage::FindUInt8(const char* name, uint8* value) const
1852	\brief Find an integer at the label \a name.
1853
1854	This is an overloaded version of
1855	FindUInt8(const char*, int32, uint8*) const
1856	where the data is sought at \a index \c 0.
1857
1858	\since BeOS R3
1859*/
1860
1861
1862/*!
1863	\fn status_t BMessage::FindUInt8(const char* name, int32 index,
1864		uint8* value) const
1865	\brief Find an integer at the label \a name at an \a index.
1866
1867	This method looks for the data with the \c B_UINT8_TYPE, and copies it into
1868	a provided buffer.
1869
1870	\param name The label to which the data is associated.
1871	\param index The index from which the data should be copied.
1872	\param value The object in which the data should be copied.
1873
1874	\returns A status code, \c B_OK on success or an error code.
1875	\retval B_OK The object now contains the requested data.
1876	\retval B_BAD_INDEX The \a index does not exist.
1877	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1878
1879	\see FindUInt8(const char*, uint8*) const
1880
1881	\since BeOS R3
1882*/
1883
1884
1885/*!
1886	\fn status_t BMessage::FindInt16(const char* name, int16* value) const
1887	\brief Find an integer at the label \a name.
1888
1889	This is an overloaded version of FindInt16(const char*, int32, int16*) const
1890	where the data is sought at \a index \c 0.
1891
1892	\param name The label to which the data is associated.
1893	\param value The object in which the data should be copied.
1894
1895	\returns A status code, \c B_OK on success or an error code.
1896	\retval B_OK The object now contains the requested data.
1897	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1898
1899	\since BeOS R3
1900*/
1901
1902
1903/*!
1904	\fn status_t BMessage::FindInt16(const char* name, int32 index,
1905		int16* value) const
1906	\brief Find an integer at the label \a name at an \a index.
1907
1908	This method looks for the data with the \c B_INT16_TYPE, and copies it into
1909	a provided buffer.
1910
1911	\param name The label to which the data is associated.
1912	\param index The index from which the data should be copied.
1913	\param value The object in which the data should be copied.
1914
1915	\returns A status code, \c B_OK on success or an error code.
1916	\retval B_OK The object now contains the requested data.
1917	\retval B_BAD_INDEX The \a index does not exist.
1918	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1919
1920	\see FindInt16(const char*, int16*) const
1921
1922	\since BeOS R3
1923*/
1924
1925
1926/*!
1927	\fn status_t BMessage::FindUInt16(const char* name, uint16* value) const
1928	\brief Find an integer at the label \a name.
1929
1930	This is an overloaded version of FindUInt16(const char*, int32, uint16*) const
1931	where the data is sought at \a index \c 0.
1932
1933	\param name The label to which the data is associated.
1934	\param value The object in which the data should be copied.
1935
1936	\returns A status code, \c B_OK on success or an error code.
1937	\retval B_OK The object now contains the requested data.
1938	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1939
1940	\since BeOS R3
1941*/
1942
1943
1944/*!
1945	\fn status_t BMessage::FindUInt16(const char* name, int32 index,
1946		uint16* value) const
1947	\brief Find an integer at the label \a name at an \a index.
1948
1949	This method looks for the data with the \c B_UINT16_TYPE, and copies it
1950	into a provided buffer.
1951
1952	\param name The label to which the data is associated.
1953	\param index The index from which the data should be copied.
1954	\param value The object in which the data should be copied.
1955
1956	\returns A status code, \c B_OK on success or an error code.
1957	\retval B_OK The object now contains the requested data.
1958	\retval B_BAD_INDEX The \a index does not exist.
1959	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1960
1961	\see FindUInt16(const char*, uint16*) const
1962
1963	\since BeOS R3
1964*/
1965
1966
1967/*!
1968	\fn status_t BMessage::FindInt32(const char* name, int32* value) const
1969	\brief Find an integer at the label \a name.
1970
1971	This is an overloaded version of
1972	FindInt32(const char*, int32, int32*) const
1973	where the data is sought at \a index \c 0.
1974
1975	\param name The label to which the data is associated.
1976	\param value The object in which the data should be copied.
1977
1978	\returns A status code, \c B_OK on success or an error code.
1979	\retval B_OK The object now contains the requested data.
1980	\retval B_NAME_NOT_FOUND There is no field with this \a name.
1981
1982	\since BeOS R3
1983*/
1984
1985
1986/*!
1987	\fn status_t BMessage::FindInt32(const char* name, int32 index,
1988		int32* value) const
1989	\brief Find an integer at the label \a name at an \a index.
1990
1991	This method looks for the data with the \c B_INT32_TYPE, and copies
1992	it into a provided buffer.
1993
1994	\param name The label to which the data is associated.
1995	\param index The index from which the data should be copied.
1996	\param value The object in which the data should be copied.
1997
1998	\returns A status code, \c B_OK on success or an error code.
1999	\retval B_OK The object now contains the requested data.
2000	\retval B_BAD_INDEX The \a index does not exist.
2001	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2002
2003	\see FindInt32(const char*, int32*) const
2004
2005	\since BeOS R3
2006*/
2007
2008
2009/*!
2010	\fn status_t BMessage::FindUInt32(const char* name, uint32* value) const
2011	\brief Find an integer at the label \a name.
2012
2013	This is an overloaded version of
2014	FindUInt32(const char*, int32, uint32*) const
2015	where the data is sought at \a index \c 0.
2016
2017	\param name The label to which the data is associated.
2018	\param value The object in which the data should be copied.
2019
2020	\returns A status code, \c B_OK on success or an error code.
2021	\retval B_OK The object now contains the requested data.
2022	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2023
2024	\since BeOS R3
2025*/
2026
2027
2028/*!
2029	\fn status_t BMessage::FindUInt32(const char* name, int32 index,
2030		uint32* value) const
2031	\brief Find an integer at the label \a name at an \a index.
2032
2033	This method looks for the data with the \c B_UINT32_TYPE, and copies
2034	it into a provided buffer.
2035
2036	\param name The label to which the data is associated.
2037	\param index The index from which the data should be copied.
2038	\param value The object in which the data should be copied.
2039
2040	\returns A status code, \c B_OK on success or an error code.
2041	\retval B_OK The object now contains the requested data.
2042	\retval B_BAD_INDEX The \a index does not exist.
2043	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2044
2045	\see FindUInt32(const char*, uint32*) const
2046
2047	\since BeOS R3
2048*/
2049
2050
2051/*!
2052	\fn status_t BMessage::FindInt64(const char* name, int64* value) const
2053	\brief Find an integer at the label \a name.
2054
2055	This is an overloaded version of
2056	FindInt64(const char*, int32, int64*) const
2057	where the data is sought at \a index \c 0.
2058
2059	\param name The label to which the data is associated.
2060	\param value The object in which the data should be copied.
2061
2062	\returns A status code, \c B_OK on success or an error code.
2063	\retval B_OK The object now contains the requested data.
2064	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2065
2066	\since BeOS R3
2067*/
2068
2069
2070/*!
2071	\fn status_t BMessage::FindInt64(const char* name, int32 index,
2072		int64* value) const
2073	\brief Find an integer at the label \a name at an \a index.
2074
2075	This method looks for the data with the \c B_INT64_TYPE, and copies
2076	it into a provided buffer.
2077
2078	\param name The label to which the data is associated.
2079	\param index The index from which the data should be copied.
2080	\param value The object in which the data should be copied.
2081
2082	\returns A status code, \c B_OK on success or an error code.
2083	\retval B_OK The object now contains the requested data.
2084	\retval B_BAD_INDEX The \a index does not exist.
2085	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2086
2087	\see FindInt64(const char*, int64*) const
2088
2089	\since BeOS R3
2090*/
2091
2092
2093/*!
2094	\fn status_t BMessage::FindUInt64(const char* name, uint64* value) const
2095	\brief Find an integer at the label \a name.
2096
2097	This is an overloaded version of
2098	FindUInt64(const char*, int32, uint64*) const
2099	where the data is sought at \a index \c 0.
2100
2101	\param name The label to which the data is associated.
2102	\param value The object in which the data should be copied.
2103
2104	\returns A status code, \c B_OK on success or an error code.
2105	\retval B_OK The object now contains the requested data.
2106	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2107
2108	\since BeOS R3
2109*/
2110
2111
2112/*!
2113	\fn status_t BMessage::FindUInt64(const char* name, int32 index,
2114		uint64* value) const
2115	\brief Find an integer at the label \a name at an \a index.
2116
2117	This method looks for the data with the \c B_UINT64_TYPE, and copies
2118	it into a provided buffer.
2119
2120	\param name The label to which the data is associated.
2121	\param index The index from which the data should be copied.
2122	\param value The object in which the data should be copied.
2123
2124	\returns A status code, \c B_OK on success or an error code.
2125	\retval B_OK The object now contains the requested data.
2126	\retval B_BAD_INDEX The \a index does not exist.
2127	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2128
2129	\see FindUInt64(const char*, uint64*) const
2130
2131	\since BeOS R3
2132*/
2133
2134
2135/*!
2136	\fn status_t BMessage::FindBool(const char* name, bool* value) const
2137	\brief Find a boolean at the label \a name.
2138
2139	This is an overloaded version of
2140	FindBool(const char*, int32, bool*) const
2141	where the data is sought at \a index \c 0.
2142
2143	\param name The label to which the data is associated.
2144	\param value The object in which the data should be copied.
2145
2146	\returns A status code, \c B_OK on success or an error code.
2147	\retval B_OK The object now contains the requested data.
2148	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2149
2150	\since BeOS R3
2151*/
2152
2153
2154/*!
2155	\fn status_t BMessage::FindBool(const char* name, int32 index,
2156		bool* value) const
2157	\brief Find a boolean at the label \a name at an \a index.
2158
2159	This method looks for the data with the \c B_BOOL_TYPE, and copies it into
2160	a provided buffer.
2161
2162	\param name The label to which the data is associated.
2163	\param index The index from which the data should be copied.
2164	\param value The object in which the data should be copied.
2165
2166	\returns A status code, \c B_OK on success or an error code.
2167	\retval B_OK The object now contains the requested data.
2168	\retval B_BAD_INDEX The \a index does not exist.
2169	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2170
2171	\see FindBool(const char*, bool*) const
2172
2173	\since BeOS R3
2174*/
2175
2176
2177/*!
2178	\fn status_t BMessage::FindFloat(const char* name, float* value) const
2179	\brief Find a float at the label \a name.
2180
2181	This is an overloaded version of
2182	FindFloat(const char*, int32, float*) const
2183	where the data is sought at \a index \c 0.
2184
2185	\param name The label to which the data is associated.
2186	\param value The object in which the data should be copied.
2187
2188	\returns A status code, \c B_OK on success or an error code.
2189	\retval B_OK The object now contains the requested data.
2190	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2191
2192	\since BeOS R3
2193*/
2194
2195
2196/*!
2197	\fn status_t BMessage::FindFloat(const char* name, int32 index,
2198		float* value) const
2199	\brief Find a float at the label \a name at an \a index.
2200
2201	This method looks for the data with the \c B_FLOAT_TYPE, and copies
2202	it into a provided buffer.
2203
2204	\param name The label to which the data is associated.
2205	\param index The index from which the data should be copied.
2206	\param value The object in which the data should be copied.
2207
2208	\returns A status code, \c B_OK on success or an error code.
2209	\retval B_OK The object now contains the requested data.
2210	\retval B_BAD_INDEX The \a index does not exist.
2211	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2212
2213	\see FindFloat(const char*, float*) const
2214
2215	\since BeOS R3
2216*/
2217
2218
2219/*!
2220	\fn status_t BMessage::FindDouble(const char* name, double* value) const
2221	\brief Find a double at the label \a name.
2222
2223	This is an overloaded version of
2224	FindDouble(const char*, int32, double*) const
2225	where the data is sought at \a index \c 0.
2226
2227	\param name The label to which the data is associated.
2228	\param value The object in which the data should be copied.
2229
2230	\returns A status code, \c B_OK on success or an error code.
2231	\retval B_OK The object now contains the requested data.
2232	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2233
2234	\since BeOS R3
2235*/
2236
2237
2238/*!
2239	\fn status_t BMessage::FindDouble(const char* name, int32 index,
2240		double* value) const
2241	\brief Find a double at the label \a name at an \a index.
2242
2243	This method looks for the data with the \c B_DOUBLE_TYPE, and copies it into
2244	a provided buffer.
2245
2246	\param name The label to which the data is associated.
2247	\param index The index from which the data should be copied.
2248	\param value The object in which the data should be copied.
2249
2250	\returns A status code, \c B_OK on success or an error code.
2251	\retval B_OK The object now contains the requested data.
2252	\retval B_BAD_INDEX The \a index does not exist.
2253	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2254
2255	\see FindDouble(const char*, double*) const
2256
2257	\since BeOS R3
2258*/
2259
2260
2261/*!
2262	\fn status_t BMessage::FindColor(const char* name, rgb_color* value) const
2263	\brief Find a color with the label \a name.
2264
2265	This is an overloaded version of
2266	FindColor(const char*, int32, rgb_color*) const
2267	where the data is sought at \a index \c 0.
2268
2269	\param name The label to which the data is associated.
2270	\param value The object in which the data should be copied.
2271
2272	\returns A status code, \c B_OK on success or an error code.
2273	\retval B_OK The object now contains the requested data.
2274	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2275
2276	\since Haiku R1
2277*/
2278
2279
2280/*!
2281	\fn status_t BMessage::FindColor(const char* name, int32 index,
2282		rgb_color* value) const
2283	\brief Find a color at the label \a name at an \a index.
2284
2285	This method looks for the data with the \c B_RGB_32_BIT_TYPE, and copies
2286	it into a provided buffer.
2287
2288	\param name The label to which the data is associated.
2289	\param index The index from which the data should be copied.
2290	\param value The object in which the data should be copied.
2291
2292	\returns A status code, \c B_OK on success or an error code.
2293	\retval B_OK The object now contains the requested data.
2294	\retval B_BAD_INDEX The \a index does not exist.
2295	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2296
2297	\see FindColor(const char*, rgb_color*) const
2298
2299	\since BeOS R3
2300*/
2301
2302
2303/*!
2304	\fn status_t BMessage::FindPointer(const char* name, void** pointer) const
2305	\brief Find a pointer at the label \a name.
2306
2307	This is an overloaded version of
2308	FindPointer(const char*, int32, void*) const
2309	where the data is sought at \a index \c 0.
2310
2311	\param name The label to which the data is associated.
2312	\param pointer The object in which the data should be copied.
2313
2314	\returns A status code, \c B_OK on success or an error code.
2315	\retval B_OK The object now contains the requested data.
2316	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2317
2318	\since BeOS R3
2319*/
2320
2321
2322/*!
2323	\fn status_t BMessage::FindPointer(const char* name, int32 index,
2324		void** pointer) const
2325	\brief Find a pointer at the label \a name at an \a index.
2326
2327	This method looks for the data with the \c B_POINTER_TYPE, and copies
2328	it into a provided buffer.
2329
2330	\warning If you want to share objects between applications, remember
2331	         that each application has its own address space, and that it
2332	         therefore is useless to try to pass around objects by sending
2333	         pointers in messages. You should think about copying the entire
2334	         object in the message, or you should consider using shared memory.
2335
2336	\param name The label to which the data is associated.
2337	\param index The index from which the data should be copied.
2338	\param pointer The object in which the data should be copied.
2339
2340	\returns A status code, \c B_OK on success or an error code.
2341	\retval B_OK The object now contains the requested data.
2342	\retval B_BAD_INDEX The \a index does not exist.
2343	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2344
2345	\see FindPointer(const char*, void*) const
2346
2347	\since BeOS R3
2348*/
2349
2350
2351/*!
2352	\fn status_t BMessage::FindMessenger(const char* name,
2353		BMessenger* messenger) const
2354	\brief Find a messenger at the label \a name.
2355
2356	This is an overloaded version of
2357	FindMessenger(const char*, int32, BMessenger*) const
2358	where the data is sought at \a index \c 0.
2359
2360	\param name The label to which the data is associated.
2361	\param messenger The object in which the data should be copied.
2362
2363	\returns A status code, \c B_OK on success or an error code.
2364	\retval B_OK The object now contains the requested data.
2365	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2366
2367	\since BeOS R3
2368*/
2369
2370
2371/*!
2372	\fn status_t BMessage::FindMessenger(const char* name, int32 index,
2373		BMessenger* messenger) const
2374	\brief Find a messenger at the label \a name at an \a index.
2375
2376	This method looks for the data with the \c B_MESSENGER_TYPE, and copies it
2377	into a provided buffer.
2378
2379	\param name The label to which the data is associated.
2380	\param index The index from which the data should be copied.
2381	\param messenger The object in which the data should be copied.
2382
2383	\returns A status code, \c B_OK on success or an error code.
2384	\retval B_OK The object now contains the requested data.
2385	\retval B_BAD_INDEX The \a index does not exist.
2386	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2387
2388	\see FindMessenger(const char*, BMessenger*) const
2389
2390	\since BeOS R3
2391*/
2392
2393
2394/*!
2395	\fn status_t BMessage::FindRef(const char* name, entry_ref* ref) const
2396	\brief Find a reference to a file at the label \a name.
2397
2398	This is an overloaded version of
2399	FindRef(const char*, int32, entry_ref*) const
2400	where the data is sought at \a index \c 0.
2401
2402	\param name The label to which the data is associated.
2403	\param ref The object in which the data should be copied.
2404
2405	\returns A status code, \c B_OK on success or an error code.
2406	\retval B_OK The object now contains the requested data.
2407	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2408
2409	\since BeOS R3
2410*/
2411
2412
2413/*!
2414	\fn status_t BMessage::FindRef(const char* name, int32 index,
2415		entry_ref* ref) const
2416	\brief Find a reference to a file at the label \a name at an
2417	       \a index.
2418
2419	This method looks for the data with the \c B_REF_TYPE, and copies it into
2420	a provided buffer.
2421
2422	\param name The label to which the data is associated.
2423	\param index The index from which the data should be copied.
2424	\param ref The object in which the data should be copied.
2425
2426	\returns A status code, \c B_OK on success or an error code.
2427	\retval B_OK The object now contains the requested data.
2428	\retval B_BAD_INDEX The \a index does not exist.
2429	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2430
2431	\see FindRef(const char*, entry_ref*) const
2432
2433	\since BeOS R3
2434*/
2435
2436
2437/*!
2438	\fn status_t BMessage::FindMessage(const char* name,
2439		BMessage* message) const
2440	\brief Find a message at the label \a name.
2441
2442	This is an overloaded version of
2443	FindMessage(const char*, int32, BMessage*) const
2444	where the data is sought at \a index \c 0.
2445
2446	\param name The label to which the data is associated.
2447	\param message The object in which the data should be copied.
2448
2449	\returns A status code, \c B_OK on success or an error code.
2450	\retval B_OK The object now contains the requested data.
2451	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2452
2453	\since BeOS R3
2454*/
2455
2456
2457/*!
2458	\fn status_t BMessage::FindMessage(const char* name, int32 index,
2459		BMessage* message) const
2460	\brief Find a message at the label \a name at an \a index.
2461
2462	This method looks for the data with the \c B_MESSAGE_TYPE, and
2463	copies it into a provided buffer.
2464
2465	\param name The label to which the data is associated.
2466	\param index The index from which the data should be copied.
2467	\param message The object in which the data should be copied.
2468
2469	\returns A status code, \c B_OK on success or an error code.
2470	\retval B_OK The object now contains the requested data.
2471	\retval B_BAD_INDEX The \a index does not exist.
2472	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2473
2474	\see FindMessage(const char*, BMessage*) const
2475
2476	\since BeOS R3
2477*/
2478
2479
2480/*!
2481	\fn status_t BMessage::FindFlat(const char* name,
2482		BFlattenable* object) const
2483	\brief Find a flattened object at the label \a name.
2484
2485	This is an overloaded version of
2486	FindFlat(const char*, int32, BFlattenable*) const
2487	where the data is sought at \a index \c 0.
2488
2489	\param name The label to which the data is associated.
2490	\param object The object in which the data should be unflattened.
2491
2492	\returns A status code, \c B_OK on success or an error code.
2493	\retval B_OK The object now contains the requested data.
2494	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2495
2496	\since BeOS R3
2497*/
2498
2499
2500/*!
2501	\fn status_t BMessage::FindFlat(const char* name, int32 index,
2502		BFlattenable* object) const
2503	\brief Find a flattened object at the label \a name at an
2504	       \a index.
2505
2506	The type is determined by the type of the passed object. If that type is
2507	available at the specified label, then the Unflatten() method of that
2508	object will be called.
2509
2510	\param name The label to which the data is associated.
2511	\param index The index from which the data should be unflattened.
2512	\param object The object in which the data should be unflattened.
2513
2514	\returns A status code, \c B_OK on success or an error code.
2515	\retval B_OK The object now contains the requested data.
2516	\retval B_BAD_INDEX The \a index does not exist.
2517	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2518
2519	\see FindFlat(const char*, BFlattenable*) const
2520
2521	\since BeOS R3
2522*/
2523
2524
2525//! @}
2526
2527
2528/*!
2529	\name Replacing Data
2530
2531	Look at ReplaceData() for a general introduction to replacing data.
2532*/
2533
2534
2535//! @{
2536
2537
2538/*!
2539	\fn status_t BMessage::ReplaceData(const char* name, type_code type,
2540		const void* data, ssize_t numBytes)
2541	\brief Replace the data at label \a name.
2542
2543	This method is an overloaded method that replaces the data at
2544	\a index \c 0. See
2545	ReplaceData(const char*, type_code, int32, const void*, ssize_t).
2546
2547	\param name The name associated with the data to replace.
2548	\param type The type of the data.
2549	\param data A pointer to the new data that needs to be copied into
2550	       the message.
2551	\param numBytes The size of the new data.
2552
2553	\returns A status code, \c B_OK on success or an error code.
2554
2555	\since BeOS R3
2556*/
2557
2558
2559/*!
2560	\fn status_t BMessage::ReplaceData(const char* name, type_code type,
2561	 	int32 index, const void* data, ssize_t numBytes)
2562	\brief Replace the data at label \a name at a specified
2563	       \a index.
2564
2565	The conditions for replacing data are that the\a name is correct,
2566	the \a type matches and the data entry at \a index exists.
2567
2568	There is also a collection of convenience methods, that allow you to
2569	efficiently replace rectanges (ReplaceRect()), booleans (ReplaceBool()),
2570	and so on.
2571
2572	\param name The name associated with the data to replace.
2573	\param type The type of the data.
2574	\param index The index in the array to replace.
2575	\param data A pointer to the new data that needs to be copied into
2576	       the message.
2577	\param numBytes The size of the new data.
2578
2579	\returns A status code, \c B_OK on success or an error code.
2580	\retval B_OK The operation succeeded.
2581	\retval B_BAD_VALUE One of the input parameters are invalid. Check that
2582	        you did not pass \c NULL, and in case the field has fixed sized
2583	        data, check that \a numBytes is the same as the specified fixed
2584	        size.
2585	\retval B_BAD_INDEX The \a index is out of range.
2586
2587	\since BeOS R3
2588*/
2589
2590
2591/*!
2592	\fn status_t BMessage::ReplaceAlignment(const char* name,
2593		const BAlignment& alignment)
2594	\brief Replace an alignment at the label \a name.
2595
2596	This method is an overloaded method of
2597	ReplaceAlignment(const char*, int32, const BAlignment&).
2598	It replaces the data at \a index \c 0.
2599
2600	\param name The name associated with the data to replace.
2601	\param alignment The object to store in the message.
2602
2603	\returns A status code, \c B_OK on success or an error code.
2604	\retval B_OK The object now contains the requested data.
2605	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2606
2607	\since Haiku R1
2608*/
2609
2610
2611/*!
2612	\fn status_t BMessage::ReplaceAlignment(const char* name, int32 index,
2613		const BAlignment& alignment)
2614	\brief Replace an alignment at the label \a name at a specified
2615	       \a index.
2616
2617	The data at the specified \a name and \a index will be replaced, if it
2618	matches the \c B_ALIGNMENT_TYPE.
2619
2620	\param name The name associated with the data to replace.
2621	\param index The index in the array to replace.
2622	\param alignment The object to store in the message.
2623
2624	\returns A status code, \c B_OK on success or an error code.
2625	\retval B_OK The operation succeeded.
2626	\retval B_BAD_INDEX The index was out of range.
2627	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2628
2629	\see ReplaceAlignment(const char*, const BAlignment&)
2630
2631	\since Haiku R1
2632*/
2633
2634
2635/*!
2636	\fn status_t BMessage::ReplaceRect(const char* name, BRect aRect)
2637	\brief Replace a rectangle at the label \a name.
2638
2639	This method is an overloaded method of
2640	ReplaceRect(const char*, int32, BRect).
2641	It replaces the data at \a index \c 0.
2642
2643	\param name The name associated with the data to replace.
2644	\param aRect The object to store in the message.
2645
2646	\returns A status code, \c B_OK on success or an error code.
2647	\retval B_OK The object now contains the requested data.
2648	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2649
2650	\since BeOS R3
2651*/
2652
2653
2654/*!
2655	\fn status_t BMessage::ReplaceRect(const char* name, int32 index,
2656		BRect aRect)
2657	\brief Replace a rectangle at the label \a name at a specified
2658	       \a index.
2659
2660	The data at the specified \a name and \a index will be replaced, if it
2661	matches the \c B_RECT_TYPE.
2662
2663	\param name The name associated with the data to replace.
2664	\param index The index in the array to replace.
2665	\param aRect The object to store in the message.
2666
2667	\returns A status code, \c B_OK on success or an error code.
2668	\retval B_OK The operation succeeded.
2669	\retval B_BAD_INDEX The index was out of range.
2670	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2671
2672	\see ReplaceRect(const char*, BRect)
2673
2674	\since BeOS R3
2675*/
2676
2677
2678/*!
2679	\fn status_t BMessage::ReplacePoint(const char* name, BPoint aPoint)
2680	\brief Replace a point at the label \a name.
2681
2682	This method is an overloaded method of
2683	ReplacePoint(const char*, int32, BPoint).
2684	It replaces the data at \a index \c 0.
2685
2686	\param name The name associated with the data to replace.
2687	\param aPoint The object to store in the message.
2688
2689	\returns A status code, \c B_OK on success or an error code.
2690	\retval B_OK The object now contains the requested data.
2691	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2692
2693	\since BeOS R3
2694*/
2695
2696
2697/*!
2698	\fn status_t BMessage::ReplacePoint(const char* name, int32 index,
2699		BPoint aPoint)
2700	\brief Replace a point at the label \a name at a specified
2701	       \a index.
2702
2703	The data at the specified \a name and \a index will be replaced, if it
2704	matches the \c B_POINT_TYPE.
2705
2706	\param name The name associated with the data to replace.
2707	\param index The index in the array to replace.
2708	\param aPoint The object to store in the message.
2709
2710	\returns A status code, \c B_OK on success or an error code.
2711	\retval B_OK The operation succeeded.
2712	\retval B_BAD_INDEX The index was out of range.
2713	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2714
2715	\see ReplacePoint(const char*, BPoint)
2716
2717	\since BeOS R3
2718*/
2719
2720
2721/*!
2722	\fn status_t BMessage::ReplaceSize(const char* name, BSize aSize)
2723	\brief Replace a size at the label \a name.
2724
2725	This method is an overloaded method of
2726	ReplaceSize(const char*, int32, BSize).
2727	It replaces the data at \a index \c 0.
2728
2729	\param name The name associated with the data to replace.
2730	\param aSize The object to store in the message.
2731
2732	\returns A status code, \c B_OK on success or an error code.
2733	\retval B_OK The object now contains the requested data.
2734	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2735
2736	\since Haiku R1
2737*/
2738
2739
2740/*!
2741	\fn status_t BMessage::ReplaceSize(const char* name, int32 index,
2742		BSize aSize)
2743	\brief Replace a size at the label \a name at a specified
2744	       \a index.
2745
2746	The data at the specified \a name and \a index will be replaced, if it
2747	matches the \c B_SIZE_TYPE.
2748
2749	\param name The name associated with the data to replace.
2750	\param index The index in the array to replace.
2751	\param aSize The object to store in the message.
2752
2753	\returns A status code, \c B_OK on success or an error code.
2754	\retval B_OK The operation succeeded.
2755	\retval B_BAD_INDEX The index was out of range.
2756	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2757
2758	\see ReplaceSize(const char*, BSize)
2759
2760	\since Haiku R1
2761*/
2762
2763
2764/*!
2765	\fn status_t BMessage::ReplaceString(const char* name, const char* aString)
2766	\brief Replace a string at the label \a name.
2767
2768	This method is an overloaded method of
2769	ReplaceString(const char*, int32, const char*).
2770	It replaces the data at \a index \c 0.
2771
2772	\param name The name associated with the data to replace.
2773	\param aString The object to store in the message.
2774
2775	\returns A status code, \c B_OK on success or an error code.
2776	\retval B_OK The operation succeeded.
2777	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2778
2779	\since BeOS R3
2780*/
2781
2782
2783/*!
2784	\fn status_t BMessage::ReplaceString(const char* name, int32 index,
2785		const char* aString)
2786	\brief Replace a string at the label \a name at a specified
2787	       \a index.
2788
2789	The data at the specified \a name and \a index will be
2790	replaced, if it matches the \c B_STRING_TYPE.
2791
2792	\param name The name associated with the data to replace.
2793	\param index The index in the array to replace.
2794	\param aString The object to store in the message.
2795
2796	\returns A status code, \c B_OK on success or an error code.
2797	\retval B_OK The operation succeeded.
2798	\retval B_BAD_INDEX The index was out of range.
2799	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2800
2801	\see ReplaceString(const char*, const char*)
2802
2803	\since BeOS R3
2804*/
2805
2806
2807/*!
2808	\fn status_t BMessage::ReplaceString(const char* name,
2809		const BString& aString)
2810	\brief Replace a string at the label \a name.
2811
2812	This method is an overloaded method of
2813	ReplaceString(const char*, int32, BString&).
2814	It replaces the data at \a index \c 0.
2815
2816	\param name The name associated with the data to replace.
2817	\param aString The object to store in the message.
2818
2819	\returns A status code, \c B_OK on success or an error code.
2820	\retval B_OK The operation succeeded.
2821	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2822
2823	\since BeOS R5
2824*/
2825
2826
2827/*!
2828	\fn status_t BMessage::ReplaceString(const char* name, int32 index,
2829		const BString& aString)
2830	\brief Replace a string at the label \a name at a specified
2831	       \a index.
2832
2833	The data at the specified \a name and \a index will be replaced, if it
2834	matches the \c B_STRING_TYPE.
2835
2836	\param name The name associated with the data to replace.
2837	\param index The index in the array to replace.
2838	\param aString The object to store in the message.
2839
2840	\returns A status code, \c B_OK on success or an error code.
2841	\retval B_OK The operation succeeded.
2842	\retval B_BAD_INDEX The index was out of range.
2843	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2844
2845	\see ReplaceString(const char*, BString&)
2846
2847	\since BeOS R5
2848*/
2849
2850
2851/*!
2852	\fn status_t BMessage::ReplaceInt8(const char* name, int8 value)
2853	\brief Replace an integer at the label \a name.
2854
2855	This method is an overloaded method of
2856	ReplaceInt8(const char*, int32, int8).
2857	It replaces the data at \a index \c 0.
2858
2859	\param name The name associated with the data to replace.
2860	\param value Where to store in the message.
2861
2862	\returns A status code, \c B_OK on success or an error code.
2863	\retval B_OK The operation succeeded.
2864	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2865
2866	\since BeOS R3
2867*/
2868
2869
2870/*!
2871	\fn status_t BMessage::ReplaceInt8(const char* name, int32 index,
2872		int8 value)
2873	\brief Replace an integer at the label \a name at a specified
2874	       \a index.
2875
2876	The data at the specified \a name and \a index will be replaced, if it
2877	matches the \c B_INT8_TYPE.
2878
2879	\param name The name associated with the data to replace.
2880	\param index The index in the array to replace.
2881	\param value Where to store in the message.
2882
2883	\returns A status code, \c B_OK on success or an error code.
2884	\retval B_OK The operation succeeded.
2885	\retval B_BAD_INDEX The index was out of range.
2886	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2887
2888	\see ReplaceInt8(const char*, int8)
2889
2890	\since BeOS R3
2891*/
2892
2893
2894/*!
2895	\fn status_t BMessage::ReplaceUInt8(const char* name, uint8 value)
2896	\brief Replace an integer at the label \a name.
2897
2898	This method is an overloaded method of
2899	ReplaceUInt8(const char*, int32, uint8).
2900	It replaces the data at \a index \c 0.
2901
2902	\param name The name associated with the data to replace.
2903	\param value Where to store in the message.
2904
2905	\returns A status code, \c B_OK on success or an error code.
2906	\retval B_OK The operation succeeded.
2907	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2908
2909	\since BeOS R3
2910*/
2911
2912
2913/*!
2914	\fn status_t BMessage::ReplaceUInt8(const char* name, int32 index,
2915		uint8 value)
2916	\brief Replace an integer at the label \a name at a specified
2917	       \a index.
2918
2919	The data at the specified \a name and \a index will be replaced, if it
2920	matches the \c B_UINT8_TYPE.
2921
2922	\param name The name associated with the data to replace.
2923	\param index The index in the array to replace.
2924	\param value Where to store in the message.
2925
2926	\returns A status code, \c B_OK on success or an error code.
2927	\retval B_OK The operation succeeded.
2928	\retval B_BAD_INDEX The index was out of range.
2929	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2930
2931	\see ReplaceUInt8(const char*, uint8)
2932
2933	\since BeOS R3
2934*/
2935
2936
2937/*!
2938	\fn status_t BMessage::ReplaceInt16(const char* name, int16 value)
2939	\brief Replace an integer at the label \a name.
2940
2941	This method is an overloaded method of
2942	ReplaceInt16(const char*, int32, int16).
2943	It replaces the data at \a index \c 0.
2944
2945	\param name The name associated with the data to replace.
2946	\param value Where to store in the message.
2947
2948	\returns A status code, \c B_OK on success or an error code.
2949	\retval B_OK The operation succeeded.
2950	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2951
2952	\since BeOS R3
2953*/
2954
2955
2956/*!
2957	\fn status_t BMessage::ReplaceInt16(const char* name, int32 index,
2958		int16 value)
2959	\brief Replace an integer at the label \a name at a specified
2960	       \a index.
2961
2962	The data at the specified \a name and \a index will be replaced, if it
2963	matches the \c B_INT16_TYPE.
2964
2965	\param name The name associated with the data to replace.
2966	\param index The index in the array to replace.
2967	\param value Where to store in the message.
2968
2969	\returns A status code, \c B_OK on success or an error code.
2970	\retval B_OK The operation succeeded.
2971	\retval B_BAD_INDEX The index was out of range.
2972	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2973
2974	\see ReplaceInt16(const char*, int16)
2975
2976	\since BeOS R3
2977*/
2978
2979
2980/*!
2981	\fn status_t BMessage::ReplaceUInt16(const char* name, uint16 value)
2982	\brief Replace an integer at the label \a name.
2983
2984	This method is an overloaded method of
2985	ReplaceUInt16(const char*, int32, uint16).
2986	It replaces the data at \a index \c 0.
2987
2988	\param name The name associated with the data to replace.
2989	\param value Where to store in the message.
2990
2991	\returns A status code, \c B_OK on success or an error code.
2992	\retval B_OK The operation succeeded.
2993	\retval B_NAME_NOT_FOUND There is no field with this \a name.
2994
2995	\since BeOS R3
2996*/
2997
2998
2999/*!
3000	\fn status_t BMessage::ReplaceUInt16(const char* name, int32 index,
3001		uint16 value)
3002	\brief Replace an integer at the label \a name at a specified
3003	       \a index.
3004
3005	The data at the specified \a name and \a index will be replaced, if it
3006	matches the \c B_UINT16_TYPE.
3007
3008	\param name The name associated with the data to replace.
3009	\param index The index in the array to replace.
3010	\param value Where to store in the message.
3011
3012	\returns A status code, \c B_OK on success or an error code.
3013	\retval B_OK The operation succeeded.
3014	\retval B_BAD_INDEX The index was out of range.
3015	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3016
3017	\see ReplaceUInt16(const char*, uint16)
3018
3019	\since BeOS R3
3020*/
3021
3022
3023/*!
3024	\fn status_t BMessage::ReplaceInt32(const char* name, int32 value)
3025	\brief Replace an integer at the label \a name.
3026
3027	This method is an overloaded method of
3028	ReplaceInt32(const char*, int32, int32).
3029	It replaces the data at \a index \c 0.
3030
3031	\param name The name associated with the data to replace.
3032	\param value Where to store in the message.
3033
3034	\returns A status code, \c B_OK on success or an error code.
3035	\retval B_OK The operation succeeded.
3036	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3037
3038	\since BeOS R3
3039*/
3040
3041
3042/*!
3043	\fn status_t BMessage::ReplaceInt32(const char* name, int32 index,
3044		int32 value)
3045	\brief Replace an integer at the label \a name at a specified
3046	       \a index.
3047
3048	The data at the specified \a name and \a index will be replaced, if it
3049	matches the \c B_INT32_TYPE.
3050
3051	\param name The name associated with the data to replace.
3052	\param index The index in the array to replace.
3053	\param value The object to store in the message.
3054
3055	\returns A status code, \c B_OK on success or an error code.
3056	\retval B_OK The operation succeeded.
3057	\retval B_BAD_INDEX The index was out of range.
3058	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3059
3060	\see ReplaceInt32(const char*, int32)
3061
3062	\since BeOS R3
3063*/
3064
3065
3066/*!
3067	\fn status_t BMessage::ReplaceUInt32(const char* name, uint32 value)
3068	\brief Replace an integer at the label \a name.
3069
3070	This method is an overloaded method of
3071	ReplaceUInt32(const char*, int32, uint32).
3072	It replaces the data at \a index \c 0.
3073
3074	\param name The name associated with the data to replace.
3075	\param value Where to store in the message.
3076
3077	\returns A status code, \c B_OK on success or an error code.
3078	\retval B_OK The operation succeeded.
3079	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3080
3081	\since BeOS R3
3082*/
3083
3084
3085/*!
3086	\fn status_t BMessage::ReplaceUInt32(const char* name, int32 index,
3087		uint32 value)
3088	\brief Replace an integer at the label \a name at a specified
3089	       \a index.
3090
3091	The data at the specified \a name and \a index will be replaced, if it
3092	matches the \c B_UINT32_TYPE.
3093
3094	\param name The name associated with the data to replace.
3095	\param index The index in the array to replace.
3096	\param value The object to store in the message.
3097
3098	\returns A status code, \c B_OK on success or an error code.
3099	\retval B_OK The operation succeeded.
3100	\retval B_BAD_INDEX The index was out of range.
3101	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3102
3103	\see ReplaceUInt32(const char*, uint32)
3104
3105	\since BeOS R3
3106*/
3107
3108
3109/*!
3110	\fn status_t BMessage::ReplaceInt64(const char* name, int64 value)
3111	\brief Replace an integer at the label \a name.
3112
3113	This method is an overloaded method of
3114	ReplaceInt64(const char*, int32, int64).
3115	It replaces the data at \a index \c 0.
3116
3117	\param name The name associated with the data to replace.
3118	\param value Where to store in the message.
3119
3120	\returns A status code, \c B_OK on success or an error code.
3121	\retval B_OK The operation succeeded.
3122	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3123
3124	\since BeOS R3
3125*/
3126
3127
3128/*!
3129	\fn status_t BMessage::ReplaceInt64(const char* name, int32 index,
3130		int64 value)
3131	\brief Replace an integer at the label \a name at a specified
3132	       \a index.
3133
3134	The data at the specified \a name and \a index will be replaced, if it
3135	matches the \c B_INT64_TYPE.
3136
3137	\param name The name associated with the data to replace.
3138	\param index The index in the array to replace.
3139	\param value The object to store in the message.
3140
3141	\returns A status code, \c B_OK on success or an error code.
3142	\retval B_OK The operation succeeded.
3143	\retval B_BAD_INDEX The index was out of range.
3144	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3145
3146	\see ReplaceInt64(const char*, int64)
3147
3148	\since BeOS R3
3149*/
3150
3151
3152/*!
3153	\fn status_t BMessage::ReplaceUInt64(const char* name, uint64 value)
3154	\brief Replace an integer at the label \a name.
3155
3156	This method is an overloaded method of
3157	ReplaceUInt64(const char*, int32, uint64).
3158	It replaces the data at \a index \c 0.
3159
3160	\param name The name associated with the data to replace.
3161	\param value Where to store in the message.
3162
3163	\returns A status code, \c B_OK on success or an error code.
3164	\retval B_OK The operation succeeded.
3165	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3166
3167	\since BeOS R3
3168*/
3169
3170
3171/*!
3172	\fn status_t BMessage::ReplaceUInt64(const char* name, int32 index,
3173		uint64 value)
3174	\brief Replace an integer at the label \a name at a specified
3175	       \a index.
3176
3177	The data at the specified \a name and \a index will be replaced, if it
3178	matches the \c B_UINT64_TYPE.
3179
3180	\param name The name associated with the data to replace.
3181	\param index The index in the array to replace.
3182	\param value The object to store in the message.
3183
3184	\returns A status code, \c B_OK on success or an error code.
3185	\retval B_OK The operation succeeded.
3186	\retval B_BAD_INDEX The index was out of range.
3187	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3188
3189	\see ReplaceUInt64(const char*, uint64)
3190
3191	\since BeOS R3
3192*/
3193
3194
3195/*!
3196	\fn status_t BMessage::ReplaceBool(const char* name, bool aBoolean)
3197	\brief Replace a boolean at the label \a name.
3198
3199	This method is an overloaded method of
3200	ReplaceBool(const char*, int32, bool).
3201	It replaces the data at \a index \c 0.
3202
3203	\param name The name associated with the data to replace.
3204	\param aBoolean Where to store in the message.
3205
3206	\returns A status code, \c B_OK on success or an error code.
3207	\retval B_OK The operation succeeded.
3208	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3209
3210	\since BeOS R3
3211*/
3212
3213
3214/*!
3215	\fn status_t BMessage::ReplaceBool(const char* name, int32 index,
3216		bool aBoolean)
3217	\brief Replace a boolean at the label \a name at a specified
3218	       \a index.
3219
3220	The data at the specified \a name and \a index will be replaced, if it
3221	matches the \c B_BOOL_TYPE.
3222
3223	\param name The name associated with the data to replace.
3224	\param index The index in the array to replace.
3225	\param aBoolean Where to store in the message.
3226
3227	\returns A status code, \c B_OK on success or an error code.
3228	\retval B_OK The operation succeeded.
3229	\retval B_BAD_INDEX The index was out of range.
3230	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3231
3232	\see ReplaceBool(const char*, bool)
3233
3234	\since BeOS R5
3235*/
3236
3237
3238/*!
3239	\fn status_t BMessage::ReplaceFloat(const char* name, float aFloat)
3240	\brief Replace a float at the label \a name.
3241
3242	This method is an overloaded method of
3243	ReplaceFloat(const char*, int32, float).
3244	It replaces the data at \a index \c 0.
3245
3246	\param name The name associated with the data to replace.
3247	\param aFloat The object to store in the message.
3248
3249	\returns A status code, \c B_OK on success or an error code.
3250	\retval B_OK The operation succeeded.
3251	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3252
3253	\since BeOS R3
3254*/
3255
3256
3257/*!
3258	\fn status_t BMessage::ReplaceFloat(const char* name, int32 index,
3259		float aFloat)
3260	\brief Replace a float at the label \a name at a specified
3261	       \a index.
3262
3263	The data at the specified \a name and \a index will be replaced, if it
3264	matches the \c B_FLOAT_TYPE.
3265
3266	\param name The name associated with the data to replace.
3267	\param index The index in the array to replace.
3268	\param aFloat The object to store in the message.
3269
3270	\returns A status code, \c B_OK on success or an error code.
3271	\retval B_OK The operation succeeded.
3272	\retval B_BAD_INDEX The index was out of range.
3273	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3274
3275	\see ReplaceFloat(const char*, float)
3276
3277	\since BeOS R3
3278*/
3279
3280
3281/*!
3282	\fn status_t BMessage::ReplaceDouble(const char* name, double aDouble)
3283	\brief Replace a double at the label \a name.
3284
3285	This method is an overloaded method of
3286	ReplaceDouble(const char*, int32, double).
3287	It replaces the data at \a index \c 0.
3288
3289	\param name The name associated with the data to replace.
3290	\param aDouble Where to store in the message.
3291
3292	\returns A status code, \c B_OK on success or an error code.
3293	\retval B_OK The operation succeeded.
3294	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3295
3296	\since BeOS R3
3297*/
3298
3299
3300/*!
3301	\fn status_t BMessage::ReplaceDouble(const char* name, int32 index,
3302		double aDouble)
3303	\brief Replace a double at the label \a name at a specified
3304	       \a index.
3305
3306	The data at the specified \a name and \a index will be replaced, if it
3307	matches the \c B_DOUBLE_TYPE.
3308
3309	\param name The name associated with the data to replace.
3310	\param index The index in the array to replace.
3311	\param aDouble Where to store in the message.
3312
3313	\returns A status code, \c B_OK on success or an error code.
3314	\retval B_OK The operation succeeded.
3315	\retval B_BAD_INDEX The index was out of range.
3316	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3317
3318	\see ReplaceDouble(const char*, double)
3319
3320	\since BeOS R3
3321*/
3322
3323
3324/*!
3325	\fn status_t BMessage::ReplaceColor(const char* name, rgb_color aColor)
3326	\brief Replace a color at the label \a name.
3327
3328	This method is an overloaded method of
3329	ReplaceColor(const char*, int32, rgb_color).
3330	It replaces the data at \a index \c 0.
3331
3332	\param name The name associated with the data to replace.
3333	\param aColor Where to store in the message.
3334
3335	\returns A status code, \c B_OK on success or an error code.
3336	\retval B_OK The operation succeeded.
3337	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3338
3339	\since Haiku R1
3340*/
3341
3342
3343/*!
3344	\fn status_t BMessage::ReplaceColor(const char* name, int32 index,
3345		rgb_color aColor)
3346	\brief Replace a rgb_color at the label \a name at a specified
3347	       \a index.
3348
3349	The data at the specified \a name and \a index will be replaced, if it
3350	matches the \c B_RGB_32_BIT_TYPE.
3351
3352	\param name The name associated with the data to replace.
3353	\param index The index in the array to replace.
3354	\param aColor Where to store in the message.
3355
3356	\returns A status code, \c B_OK on success or an error code.
3357	\retval B_OK The operation succeeded.
3358	\retval B_BAD_INDEX The index was out of range.
3359	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3360
3361	\see ReplaceColor(const char*, rgb_color)
3362
3363	\since Haiku R1
3364*/
3365
3366
3367/*!
3368	\fn status_t BMessage::ReplacePointer(const char* name,
3369		const void* pointer)
3370	\brief Replace a pointer at the label \a name.
3371
3372	This method is an overloaded method of
3373	ReplacePointer(const char*, int32, const void*).
3374	It replaces the data at \a index \c 0.
3375
3376	\param name The name associated with the data to replace.
3377	\param pointer Where to store in the message.
3378
3379	\returns A status code, \c B_OK on success or an error code.
3380	\retval B_OK The operation succeeded.
3381	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3382
3383	\since BeOS R3
3384*/
3385
3386
3387/*!
3388	\fn status_t BMessage::ReplacePointer(const char* name, int32 index,
3389		const void* pointer)
3390	\brief Replace a pointer at the label \a name at a specified \a index.
3391
3392	The data at the specified \a name and \a index will be replaced, if it
3393	matches the \c B_POINTER_TYPE.
3394
3395	\param name The name associated with the data to replace.
3396	\param index The index in the array to replace.
3397	\param pointer Where to store in the message.
3398
3399	\returns A status code, \c B_OK on success or an error code.
3400	\retval B_OK The operation succeeded.
3401	\retval B_BAD_INDEX The index was out of range.
3402	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3403
3404	\see ReplacePointer(const char*, const void*)
3405
3406	\since BeOS R3
3407*/
3408
3409
3410/*!
3411	\fn status_t BMessage::ReplaceMessenger(const char* name,
3412		BMessenger messenger)
3413	\brief Replace a messenger at the label \a name.
3414
3415	This method is an overloaded method of
3416	ReplaceMessenger(const char*, int32, BMessenger).
3417	It replaces the data at \a index \c 0.
3418
3419	\param name The name associated with the data to replace.
3420	\param messenger The object to store in the message.
3421
3422	\returns A status code, \c B_OK on success or an error code.
3423	\retval B_OK The operation succeeded.
3424	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3425
3426	\since BeOS R3
3427*/
3428
3429
3430/*!
3431	\fn status_t BMessage::ReplaceMessenger(const char* name, int32 index,
3432		BMessenger messenger)
3433	\brief Replace a messenger at the label \a name at a specified
3434	       \a index.
3435
3436	The data at the specified \a name and \a index will be replaced, if it
3437	matches the \c B_MESSENGER_TYPE.
3438
3439	\param name The name associated with the data to replace.
3440	\param index The index in the array to replace.
3441	\param messenger The object to store in the message.
3442
3443	\returns A status code, \c B_OK on success or an error code.
3444	\retval B_OK The operation succeeded.
3445	\retval B_BAD_INDEX The index was out of range.
3446	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3447
3448	\see ReplaceMessenger(const char*, BMessenger)
3449
3450	\since BeOS R3
3451*/
3452
3453
3454/*!
3455	\fn status_t BMessage::ReplaceRef(const char* name, const entry_ref* ref)
3456	\brief Replace a reference to a file at the label \a name.
3457
3458	This method is an overloaded method of
3459	ReplaceRef(const char*, int32, entry_ref*).
3460	It replaces the data at \a index \c 0.
3461
3462	\param name The name associated with the data to replace.
3463	\param ref The object to store in the message.
3464
3465	\returns A status code, \c B_OK on success or an error code.
3466	\retval B_OK The operation succeeded.
3467	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3468
3469	\since BeOS R3
3470*/
3471
3472
3473/*!
3474	\fn status_t BMessage::ReplaceRef(const char* name, int32 index,
3475		const entry_ref* ref)
3476	\brief Replace a reference to a file at the label \a name at a
3477		specified \a index.
3478
3479	The data at the specified \a name and \a index will be replaced, if it
3480	matches the \c B_REF_TYPE.
3481
3482	\param name The name associated with the data to replace.
3483	\param index The index in the array to replace.
3484	\param ref The object to store in the message.
3485
3486	\returns A status code, \c B_OK on success or an error code.
3487	\retval B_OK The operation succeeded.
3488	\retval B_BAD_INDEX The index was out of range.
3489	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3490
3491	\see ReplaceRef(const char*, entry_ref*)
3492
3493	\since BeOS R3
3494*/
3495
3496
3497/*!
3498	\fn status_t BMessage::ReplaceMessage(const char* name,
3499		const BMessage* message)
3500	\brief Replace a message at the label \a name.
3501
3502	This method is an overloaded method of
3503	ReplaceMessage(const char*, int32, BMessage*).
3504	It replaces the data at \a index \c 0.
3505
3506	\param name The name associated with the data to replace.
3507	\param message The object to store in the message.
3508
3509	\returns A status code, \c B_OK on success or an error code.
3510	\retval B_OK The operation succeeded.
3511	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3512
3513	\since BeOS R3
3514*/
3515
3516
3517/*!
3518	\fn status_t BMessage::ReplaceMessage(const char* name, int32 index,
3519		const BMessage* message)
3520	\brief Replace a message at the label \a name at a specified
3521	       \a index.
3522
3523	The data at the specified \a name and \a index will be replaced, if it
3524	matches the \c B_MESSAGE_TYPE.
3525
3526	\param name The name associated with the data to replace.
3527	\param index The index in the array to replace.
3528	\param message The object to store in the message.
3529
3530	\returns A status code, \c B_OK on success or an error code.
3531	\retval B_OK The operation succeeded.
3532	\retval B_BAD_INDEX The index was out of range.
3533	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3534
3535	\see ReplaceMessage(const char*, BMessage*)
3536
3537	\since BeOS R3
3538*/
3539
3540
3541/*!
3542	\fn status_t BMessage::ReplaceFlat(const char* name, BFlattenable* object)
3543	\brief Replace a flattened object at the label \a name.
3544
3545	This method is an overloaded method of
3546	ReplaceFlat(const char*, int32, BFlattenable*).
3547
3548	It replaces the data at \a index \c 0.
3549
3550	\param name The name associated with the data to replace.
3551	\param object The object to store in the message.
3552
3553	\returns A status code, \c B_OK on success or an error code.
3554	\retval B_OK The operation succeeded.
3555	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3556
3557	\since BeOS R3
3558*/
3559
3560
3561/*!
3562	\fn status_t BMessage::ReplaceFlat(const char* name, int32 index,
3563		BFlattenable* object)
3564	\brief Replace a flattened object at the label \a name at a
3565	       specified \a index.
3566
3567	The data at the specified \a name and \a index will be
3568	replaced, if it matches the type returned by your object. This method uses
3569	BFlattenable::TypeCode() to determine the type of the object.
3570
3571	\param name The name associated with the data to replace.
3572	\param index The index in the array to replace.
3573	\param object The object to store in the message.
3574
3575	\returns A status code, \c B_OK on success or an error code.
3576	\retval B_OK The operation succeeded.
3577	\retval B_BAD_INDEX The index was out of range.
3578	\retval B_NAME_NOT_FOUND There is no field with this \a name.
3579
3580	\see ReplaceFlat(const char*, BFlattenable*)
3581
3582	\since BeOS R3
3583*/
3584
3585
3586//! @}
3587
3588
3589/*!
3590	\name Message comparison
3591*/
3592
3593
3594//! @{
3595
3596
3597/*!
3598	\fn bool BMessage::HasSameData(const BMessage& other,
3599		bool ignoreFieldOrder = true, bool deep = false) const
3600	\brief Experimental method to compare two messages
3601
3602	This helper method will compare the data of this message to another
3603	message. The name if the fields, and the contents of the fields are
3604	compared. Metadata (like the delivery status) and the BMessage::what
3605	field are not compared.
3606
3607	The order of the fields is determined by the order that the fields are
3608	added. You may use the \a ignoreFieldOrder argument to tweak whether you
3609	care that not only the data is identical, but also the ordering of the
3610	data.
3611
3612	When there are BMessages attached to this message, you might want to use
3613	this algorithm to compare them as well (as to ignore non-data fields of the
3614	\a other message or the ordering of fields during the comparison). Setting
3615	the \a deep parameter will cause any data of the \c B_MESSAGE_TYPE to be
3616	compared using this method, thus ignoring non-data differences. If you set
3617	\a deep to \c false, the data will be compared on a byte by byte basis and
3618	these differences in the non-data fields will not be ignored.
3619
3620	\param other The other message to compare to.
3621	\param ignoreFieldOrder Whether you want to see if the field order is the
3622		same.
3623	\param deep Whether you want to recursively inspect BMessages embedded in
3624		this message.
3625
3626	\returns \c true if the data is the same, \c false otherwise
3627
3628	\since Haiku R1
3629*/
3630
3631
3632//! @}
3633
3634
3635/*!
3636	\name Deprecated Methods
3637
3638	These methods are likely to disappear as they have been replaced by safer
3639	and more powerful methods but are implemented for the purpose of binary
3640	compatibility.
3641*/
3642
3643
3644//! @{
3645
3646
3647/*!
3648	\fn bool BMessage::HasAlignment(const char*, int32) const
3649	\brief Deprecated.
3650
3651	\warning This method is deprecated, do not use.
3652
3653	\since Haiku R1
3654*/
3655
3656
3657/*!
3658	\fn bool BMessage::HasRect(const char*, int32) const
3659	\brief Deprecated.
3660
3661	\warning This method is deprecated, do not use.
3662
3663	\since BeOS R3
3664*/
3665
3666
3667/*!
3668	\fn bool BMessage::HasPoint(const char*, int32) const
3669	\brief Deprecated.
3670
3671	\warning This method is deprecated, do not use.
3672
3673	\since BeOS R3
3674*/
3675
3676
3677/*!
3678	\fn bool BMessage::HasSize(const char*, int32) const
3679	\brief Deprecated.
3680
3681	\warning This method is deprecated, do not use.
3682
3683	\since Haiku R1
3684*/
3685
3686
3687/*!
3688	\fn bool BMessage::HasString(const char*, int32) const
3689	\brief Deprecated.
3690
3691	\warning This method is deprecated, do not use.
3692
3693	\since BeOS R3
3694*/
3695
3696
3697/*!
3698	\fn bool BMessage::HasInt8(const char*, int32) const
3699	\brief Deprecated.
3700
3701	\warning This method is deprecated, do not use.
3702
3703	\since BeOS R3
3704*/
3705
3706
3707/*!
3708	\fn bool BMessage::HasUInt8(const char*, int32) const
3709	\brief Deprecated.
3710
3711	\warning This method is deprecated, do not use.
3712
3713	\since BeOS R3
3714*/
3715
3716
3717/*!
3718	\fn bool BMessage::HasInt16(const char*, int32) const
3719	\brief Deprecated.
3720
3721	\warning This method is deprecated, do not use.
3722
3723	\since BeOS R3
3724*/
3725
3726
3727/*!
3728	\fn bool BMessage::HasUInt16(const char*, int32) const
3729	\brief Deprecated.
3730
3731	\warning This method is deprecated, do not use.
3732
3733	\since BeOS R3
3734*/
3735
3736
3737/*!
3738	\fn bool BMessage::HasInt32(const char*, int32) const
3739	\brief Deprecated.
3740
3741	\warning This method is deprecated, do not use.
3742
3743	\since BeOS R3
3744*/
3745
3746
3747/*!
3748	\fn bool BMessage::HasUInt32(const char*, int32) const
3749	\brief Deprecated.
3750
3751	\warning This method is deprecated, do not use.
3752
3753	\since BeOS R3
3754*/
3755
3756
3757/*!
3758	\fn bool BMessage::HasInt64(const char*, int32) const
3759	\brief Deprecated.
3760
3761	\warning This method is deprecated, do not use.
3762
3763	\since BeOS R3
3764*/
3765
3766
3767/*!
3768	\fn bool BMessage::HasUInt64(const char*, int32) const
3769	\brief Deprecated.
3770
3771	\warning This method is deprecated, do not use.
3772
3773	\since BeOS R3
3774*/
3775
3776
3777/*!
3778	\fn bool BMessage::HasBool(const char*, int32) const
3779	\brief Deprecated.
3780
3781	\warning This method is deprecated, do not use.
3782
3783	\since BeOS R3
3784*/
3785
3786
3787/*!
3788	\fn bool BMessage::HasFloat(const char*, int32) const
3789	\brief Deprecated.
3790
3791	\warning This method is deprecated, do not use.
3792
3793	\since BeOS R3
3794*/
3795
3796
3797/*!
3798	\fn bool BMessage::HasDouble(const char*, int32) const
3799	\brief Deprecated.
3800
3801	\warning This method is deprecated, do not use.
3802
3803	\since BeOS R3
3804*/
3805
3806
3807/*!
3808	\fn bool BMessage::HasColor(const char*, int32) const
3809	\brief Deprecated.
3810
3811	\warning This method is deprecated, do not use.
3812
3813	\since Haiku R1
3814*/
3815
3816
3817/*!
3818	\fn bool BMessage::HasPointer(const char*, int32) const
3819	\brief Deprecated.
3820
3821	\warning This method is deprecated, do not use.
3822
3823	\since BeOS R3
3824*/
3825
3826
3827/*!
3828	\fn bool BMessage::HasMessenger(const char*, int32) const
3829	\brief Deprecated.
3830
3831	\warning This method is deprecated, do not use.
3832
3833	\since BeOS R3
3834*/
3835
3836
3837/*!
3838	\fn bool BMessage::HasRef(const char*, int32) const
3839	\brief Deprecated.
3840
3841	\warning This method is deprecated, do not use.
3842
3843	\since BeOS R3
3844*/
3845
3846
3847/*!
3848	\fn bool BMessage::HasMessage(const char*, int32) const
3849	\brief Deprecated.
3850
3851	\warning This method is deprecated, do not use.
3852
3853	\since BeOS R3
3854*/
3855
3856
3857/*!
3858	\fn bool BMessage::HasFlat(const char*, const BFlattenable*) const
3859	\brief Deprecated.
3860
3861	\warning This method is deprecated, do not use.
3862
3863	\since BeOS R3
3864*/
3865
3866
3867/*!
3868	\fn bool BMessage::HasFlat(const char*, int32, const BFlattenable*) const
3869	\brief Deprecated.
3870
3871	\warning This method is deprecated, do not use.
3872
3873	\since BeOS R3
3874*/
3875
3876
3877/*!
3878	\fn bool BMessage::HasData(const char*, type_code, int32) const
3879	\brief Deprecated.
3880
3881	\warning This method is deprecated, do not use.
3882
3883	\since BeOS R3
3884*/
3885
3886
3887/*!
3888	\fn BRect BMessage::FindRect(const char*, int32) const
3889	\brief Deprecated.
3890
3891	\warning This method is deprecated, do not use.
3892
3893	\since BeOS R3
3894*/
3895
3896
3897/*!
3898	\fn BPoint BMessage::FindPoint(const char*, int32) const
3899	\brief Deprecated.
3900
3901	\warning This method is deprecated, do not use.
3902
3903	\since BeOS R3
3904*/
3905
3906
3907/*!
3908	\fn const char* BMessage::FindString(const char*, int32) const
3909	\brief Deprecated.
3910
3911	\warning This method is deprecated, do not use.
3912
3913	\since BeOS R3
3914*/
3915
3916
3917/*!
3918	\fn int8 BMessage::FindInt8(const char*, int32) const
3919	\brief Deprecated.
3920
3921	\warning This method is deprecated, do not use.
3922
3923	\since BeOS R3
3924*/
3925
3926
3927/*!
3928	\fn int16 BMessage::FindInt16(const char*, int32) const
3929	\brief Deprecated.
3930
3931	\warning This method is deprecated, do not use.
3932
3933	\since BeOS R3
3934*/
3935
3936
3937/*!
3938	\fn int32 BMessage::FindInt32(const char*, int32) const
3939	\brief Deprecated.
3940
3941	\warning This method is deprecated, do not use.
3942
3943	\since BeOS R3
3944*/
3945
3946
3947/*!
3948	\fn int64 BMessage::FindInt64(const char*, int32) const
3949	\brief Deprecated.
3950
3951	\warning This method is deprecated, do not use.
3952
3953	\since BeOS R3
3954*/
3955
3956
3957/*!
3958	\fn bool BMessage::FindBool(const char*, int32) const
3959	\brief Deprecated.
3960
3961	\warning This method is deprecated, do not use.
3962
3963	\since BeOS R3
3964*/
3965
3966
3967/*!
3968	\fn float BMessage::FindFloat(const char*, int32) const
3969	\brief Deprecated.
3970
3971	\warning This method is deprecated, do not use.
3972
3973	\since BeOS R3
3974*/
3975
3976
3977/*!
3978	\fn double BMessage::FindDouble(const char*, int32) const
3979	\brief Deprecated.
3980
3981	\warning This method is deprecated, do not use.
3982
3983	\since BeOS R3
3984*/
3985
3986
3987//! @}
3988
3989
3990/*!
3991	\name Allocation Operators
3992*/
3993
3994
3995//! @{
3996
3997
3998/*!
3999	\fn BMessage& BMessage::operator=(const BMessage& other)
4000	\brief Copy one message into another.
4001
4002	See the copy constructor, BMessage(const BMessage& other), for details on
4003	what is copied, and what isn't.
4004
4005	\since BeOS R3
4006*/
4007
4008
4009/*!
4010	\fn void* BMessage::operator new(size_t size)
4011	\brief Allocates \a size bytes of memory for a BMessage.
4012
4013	\since BeOS R3
4014*/
4015
4016
4017/*!
4018	\fn void* BMessage::operator new(size_t, void* pointer)
4019	\brief Allocates \a size bytes of memory for a BMessage.
4020
4021	\since BeOS R3
4022*/
4023
4024
4025/*!
4026	\fn void* BMessage::operator new(size_t, const std::nothrow_t&)
4027	\brief Allocates \a size bytes of memory for a BMessage.
4028
4029	\since Haiku R1
4030*/
4031
4032/*!
4033	\fn void BMessage::operator delete(void* pointer, size_t size)
4034	\brief Frees memory allocated by new.
4035
4036	\since BeOS R5
4037*/
4038
4039
4040//! @}
4041
4042
4043/*!
4044	\name Finding Data Convenience Methods
4045
4046	These methods may be used as alternatives to the Find data methods above
4047	which allow you to specify a default value to use if the value you are
4048	looking for is not found and return the result instead of filling out an
4049	out parameter and status code. If you are not interested in the status code
4050	these methods allow for some code simplification.
4051
4052	For example, instead of writing:
4053
4054\code
4055bool enabled;
4056if (FindBool("enabled", &enabled) != B_OK)
4057	enabled = false;
4058\endcode
4059
4060	you can write the following:
4061
4062\code
4063bool enabled = GetBool("enabled", false);
4064\endcode
4065
4066	reducing the example to a single line.
4067*/
4068
4069
4070//! @{
4071
4072
4073/*!
4074	\fn bool BMessage::GetBool(const char* name, bool defaultValue) const
4075	\brief Return the boolean value from message with \a name, or
4076	       \a defaultValue if not found.
4077
4078	\param name The name of the item to retrieve.
4079	\param defaultValue The value to use if the item specified by \a name
4080	       is not found.
4081
4082	\return The item with \a name, or \a defaultValue if not found.
4083
4084	\since Haiku R1
4085*/
4086
4087
4088/*!
4089	\fn bool BMessage::GetBool(const char* name, int32 index,
4090		bool defaultValue) const
4091	\brief Return the boolean value from message with \a name and \a index, or
4092	       \a defaultValue if not found.
4093
4094	\param name The name of the item to retrieve.
4095	\param index The index of the item to retrieve if there is more than one.
4096	\param defaultValue The value to use if the item specified by \a name
4097	       is not found.
4098
4099	\return The item with \a name, or \a defaultValue if not found.
4100
4101	\since Haiku R1
4102*/
4103
4104
4105/*!
4106	\fn int8 BMessage::GetInt8(const char* name, int8 defaultValue) const
4107	\brief Return the int8 value from message with \a name, or \a defaultValue
4108	       if not found.
4109
4110	\param name The name of the item to retrieve.
4111	\param defaultValue The value to use if the item specified by \a name
4112	       is not found.
4113
4114	\return The item with \a name, or \a defaultValue if not found.
4115
4116	\since Haiku R1
4117*/
4118
4119
4120/*!
4121	\fn int8 BMessage::GetInt8(const char* name, int32 index,
4122		int8 defaultValue) const
4123	\brief Return the int8 value from message with \a name and \a index, or
4124	       \a defaultValue if not found.
4125
4126	\param name The name of the item to retrieve.
4127	\param index The index of the item to retrieve if there is more than one.
4128	\param defaultValue The value to use if the item specified by \a name
4129	       is not found.
4130
4131	\return The item with \a name, or \a defaultValue if not found.
4132
4133	\since Haiku R1
4134*/
4135
4136
4137/*!
4138	\fn uint8 BMessage::GetUInt8(const char* name, uint8 defaultValue) const
4139	\brief Return the uint8 value from message with \a name, or \a defaultValue
4140	       if not found.
4141
4142	\param name The name of the item to retrieve.
4143	\param defaultValue The value to use if the item specified by \a name
4144	       is not found.
4145
4146	\return The item with \a name, or \a defaultValue if not found.
4147
4148	\since Haiku R1
4149*/
4150
4151
4152/*!
4153	\fn uint8 BMessage::GetUInt8(const char* name, int32 index,
4154		uint8 defaultValue) const
4155	\brief Return the uint8 message from message with \a name and \a index, or
4156	       \a defaultValue if not found.
4157
4158	\param name The name of the item to retrieve.
4159	\param index The index of the item to retrieve if there is more than one.
4160	\param defaultValue The value to use if the item specified by \a name
4161	       is not found.
4162
4163	\return The item with \a name, or \a defaultValue if not found.
4164
4165	\since Haiku R1
4166*/
4167
4168
4169/*!
4170	\fn int16 BMessage::GetInt16(const char* name, int16 defaultValue) const
4171	\brief Return the int16 value from message with \a name, or \a defaultValue
4172	       if not found.
4173
4174	\param name The name of the item to retrieve.
4175	\param defaultValue The value to use if the item specified by \a name
4176	       is not found.
4177
4178	\return The item with \a name, or \a defaultValue if not found.
4179
4180	\since Haiku R1
4181*/
4182
4183
4184/*!
4185	\fn int16 BMessage::GetInt16(const char* name, int32 index,
4186		int16 defaultValue) const
4187	\brief Return the int16 value from message with \a name and \a index, or
4188	       \a defaultValue if not found.
4189
4190	\param name The name of the item to retrieve.
4191	\param index The index of the item to retrieve if there is more than one.
4192	\param defaultValue The value to use if the item specified by \a name
4193	       is not found.
4194
4195	\return The item with \a name, or \a defaultValue if not found.
4196
4197	\since Haiku R1
4198*/
4199
4200
4201/*!
4202	\fn uint16 BMessage::GetUInt16(const char* name, uint16 defaultValue) const
4203	\brief Return the uint16 value from message with \a name, or
4204	       \a defaultValue if not found.
4205
4206	\param name The name of the item to retrieve.
4207	\param defaultValue The value to use if the item specified by \a name
4208	       is not found.
4209
4210	\return The item with \a name, or \a defaultValue if not found.
4211
4212	\since Haiku R1
4213*/
4214
4215
4216/*!
4217	\fn uint16 BMessage::GetUInt16(const char* name, int32 index,
4218		uint16 defaultValue) const
4219	\brief Return the uint16 value from message with \a name and \a index, or
4220	       \a defaultValue if not found.
4221
4222	\param name The name of the item to retrieve.
4223	\param index The index of the item to retrieve if there is more than one.
4224	\param defaultValue The value to use if the item specified by \a name
4225	       is not found.
4226
4227	\return The item with \a name, or \a defaultValue if not found.
4228
4229	\since Haiku R1
4230*/
4231
4232
4233/*!
4234	\fn int32 BMessage::GetInt32(const char* name, int32 defaultValue) const
4235	\brief Return the int32 value from message with \a name, or \a defaultValue
4236	       if not found.
4237
4238	\param name The name of the item to retrieve.
4239	\param defaultValue The value to use if the item specified by \a name
4240	       is not found.
4241
4242	\return The item with \a name, or \a defaultValue if not found.
4243
4244	\since Haiku R1
4245*/
4246
4247
4248/*!
4249	\fn int32 BMessage::GetInt32(const char* name, int32 index,
4250		int32 defaultValue) const
4251	\brief Return the int32 value from message with \a name and \a index, or
4252	       \a defaultValue if not found.
4253
4254	\param name The name of the item to retrieve.
4255	\param index The index of the item to retrieve if there is more than one.
4256	\param defaultValue The value to use if the item specified by \a name
4257	       is not found.
4258
4259	\return The item with \a name, or \a defaultValue if not found.
4260
4261	\since Haiku R1
4262*/
4263
4264
4265/*!
4266	\fn uint32 BMessage::GetUInt32(const char* name, uint32 defaultValue) const
4267	\brief Return the uint32 value from message with \a name, or
4268	       \a defaultValue if not found.
4269
4270	\param name The name of the item to retrieve.
4271	\param defaultValue The value to use if the item specified by \a name
4272	       is not found.
4273
4274	\return The item with \a name, or \a defaultValue if not found.
4275
4276	\since Haiku R1
4277*/
4278
4279
4280/*!
4281	\fn uint32 BMessage::GetUInt32(const char* name, int32 index,
4282		uint32 defaultValue) const
4283	\brief Return the uint32 value from message with \a name and \a index, or
4284	       \a defaultValue if not found.
4285
4286	\param name The name of the item to retrieve.
4287	\param index The index of the item to retrieve if there is more than one.
4288	\param defaultValue The value to use if the item specified by \a name
4289	       is not found.
4290
4291	\return The item with \a name, or \a defaultValue if not found.
4292
4293	\since Haiku R1
4294*/
4295
4296
4297/*!
4298	\fn int64 BMessage::GetInt64(const char* name, int64 defaultValue) const
4299	\brief Return the int64 value from message with \a name, or \a defaultValue
4300	       if not found.
4301
4302	\param name The name of the item to retrieve.
4303	\param defaultValue The value to use if the item specified by \a name
4304	       is not found.
4305
4306	\return The item with \a name, or \a defaultValue if not found.
4307
4308	\since Haiku R1
4309*/
4310
4311
4312/*!
4313	\fn int64 BMessage::GetInt64(const char* name, int32 index,
4314		int64 defaultValue) const
4315	\brief Return the int64 value from message with \a name and \a index, or
4316	       \a defaultValue if not found.
4317
4318	\param name The name of the item to retrieve.
4319	\param index The index of the item to retrieve if there is more than one.
4320	\param defaultValue The value to use if the item specified by \a name
4321	       is not found.
4322
4323	\return The item with \a name, or \a defaultValue if not found.
4324
4325	\since Haiku R1
4326*/
4327
4328
4329/*!
4330	\fn uint64 BMessage::GetUInt64(const char* name, uint64 defaultValue) const
4331	\brief Return the uint64 value from message with \a name, or
4332	       \a defaultValue if not found.
4333
4334	\param name The name of the item to retrieve.
4335	\param defaultValue The value to use if the item specified by \a name
4336	       is not found.
4337
4338	\return The item with \a name, or \a defaultValue if not found.
4339
4340	\since Haiku R1
4341*/
4342
4343
4344/*!
4345	\fn uint64 BMessage::GetUInt64(const char* name, int32 index,
4346		uint64 defaultValue) const
4347	\brief Return the uint64 value from message with \a name and \a index, or
4348	       \a defaultValue if not found.
4349
4350	\param name The name of the item to retrieve.
4351	\param index The index of the item to retrieve if there is more than one.
4352	\param defaultValue The value to use if the item specified by \a name
4353	       is not found.
4354
4355	\return The item with \a name, or \a defaultValue if not found.
4356
4357	\since Haiku R1
4358*/
4359
4360
4361/*!
4362	\fn float BMessage::GetFloat(const char* name, float defaultValue) const
4363	\brief Return the float value from message with \a name, or \a defaultValue
4364	       if not found.
4365
4366	\param name The name of the item to retrieve.
4367	\param defaultValue The value to use if the item specified by \a name
4368	       is not found.
4369
4370	\return The item with \a name, or \a defaultValue if not found.
4371
4372	\since Haiku R1
4373*/
4374
4375
4376/*!
4377	\fn float BMessage::GetFloat(const char* name, int32 index,
4378		float defaultValue) const
4379	\brief Return the float value from message with \a name and \a index, or
4380	       \a defaultValue if not found.
4381
4382	\param name The name of the item to retrieve.
4383	\param index The index of the item to retrieve if there is more than one.
4384	\param defaultValue The value to use if the item specified by \a name
4385	       is not found.
4386
4387	\return The item with \a name, or \a defaultValue if not found.
4388
4389	\since Haiku R1
4390*/
4391
4392
4393/*!
4394	\fn double BMessage::GetDouble(const char* name, double defaultValue) const
4395	\brief Return the double value from message with \a name, or
4396	       \a defaultValue if not found.
4397
4398	\param name The name of the item to retrieve.
4399	\param defaultValue The value to use if the item specified by \a name
4400	       is not found.
4401
4402	\return The item with \a name, or \a defaultValue if not found.
4403
4404	\since Haiku R1
4405*/
4406
4407
4408/*!
4409	\fn double BMessage::GetDouble(const char* name, int32 index,
4410		double defaultValue) const
4411	\brief Return the double value from message with \a name and \a index, or
4412	       \a defaultValue if not found.
4413
4414	\param name The name of the item to retrieve.
4415	\param index The index of the item to retrieve if there is more than one.
4416	\param defaultValue The value to use if the item specified by \a name
4417	       is not found.
4418
4419	\return The item with \a name, or \a defaultValue if not found.
4420
4421	\since Haiku R1
4422*/
4423
4424
4425/*!
4426	\fn rgb_color BMessage::GetColor(const char* name, rgb_color defaultValue) const
4427	\brief Return the rgb_color value from message with \a name, or
4428	       \a defaultValue if not found.
4429
4430	\param name The name of the item to retrieve.
4431	\param defaultValue The value to use if the item specified by \a name
4432	       is not found.
4433
4434	\return The item with \a name, or \a defaultValue if not found.
4435
4436	\since Haiku R1
4437*/
4438
4439
4440/*!
4441	\fn rgb_color BMessage::GetColor(const char* name, int32 index,
4442		rgb_color defaultValue) const
4443	\brief Return the rgb_color value from message with \a name and \a index, or
4444	       \a defaultValue if not found.
4445
4446	\param name The name of the item to retrieve.
4447	\param index The index of the item to retrieve if there is more than one.
4448	\param defaultValue The value to use if the item specified by \a name
4449	       is not found.
4450
4451	\return The item with \a name, or \a defaultValue if not found.
4452
4453	\since Haiku R1
4454*/
4455
4456
4457/*!
4458	\fn const void* BMessage::GetPointer(const char* name,
4459		const void* defaultValue = NULL) const
4460	\brief Return the pointer type from message with \a name, or
4461	       \a defaultValue if not found.
4462
4463	\param name The name of the item to retrieve.
4464	\param defaultValue The value to use if the item specified by \a name
4465	       is not found.
4466
4467	\return The item with \a name, or \a defaultValue if not found.
4468
4469	\since Haiku R1
4470*/
4471
4472
4473/*!
4474	\fn rgb_color BMessage::GetPointer(const char* name, int32 index,
4475		const void* defaultValue = NULL) const
4476	\brief Return the pointer type from message with \a name and \a index, or
4477	       \a defaultValue if not found.
4478
4479	\param name The name of the item to retrieve.
4480	\param index The index of the item to retrieve if there is more than one.
4481	\param defaultValue The value to use if the item specified by \a name
4482	       is not found.
4483
4484	\return The item with \a name, or \a defaultValue if not found.
4485
4486	\since Haiku R1
4487*/
4488
4489
4490/*!
4491	\fn const char* BMessage::GetString(const char* name,
4492		const char* defaultValue) const
4493	\brief Return the string from message with \a name, or \a defaultValue if
4494	       not found.
4495
4496	\param name The name of the item to retrieve.
4497	\param defaultValue The value to use if the item specified by \a name
4498	       is not found.
4499
4500	\return The item with \a name, or \a defaultValue if not found.
4501
4502	\since Haiku R1
4503*/
4504
4505
4506/*!
4507	\fn const char* BMessage::GetString(const char* name, int32 index,
4508		const char* defaultValue) const
4509	\brief Return the string from message with \a name and \a index, or
4510	       \a defaultValue if not found.
4511
4512	\param name The name of the item to retrieve.
4513	\param index The index of the item to retrieve if there is more than one.
4514	\param defaultValue The value to use if the item specified by \a name
4515	       is not found.
4516
4517	\return The item with \a name, or \a defaultValue if not found.
4518
4519	\since Haiku R1
4520*/
4521
4522
4523/*!
4524	\fn BAlignment BMessage::GetAlignment(const char* name,
4525		const BAlignment& defaultValue) const
4526	\brief Return the BAlignment object from message with \a name, or
4527	       \a defaultValue if not found.
4528
4529	\param name The name of the item to retrieve.
4530	\param defaultValue The value to use if the item specified by \a name
4531	       is not found.
4532
4533	\return The item with \a name, or \a defaultValue if not found.
4534
4535	\since Haiku R1
4536*/
4537
4538
4539/*!
4540	\fn BAlignment BMessage::GetAlignment(const char* name, int32 index,
4541		const BAlignment& defaultValue) const
4542	\brief Return the BAlignment object from message with \a name and \a index,
4543	       or \a defaultValue if not found.
4544
4545	\param name The name of the item to retrieve.
4546	\param index The index of the item to retrieve if there is more than one.
4547	\param defaultValue The value to use if the item specified by \a name
4548	       is not found.
4549
4550	\return The item with \a name, or \a defaultValue if not found.
4551
4552	\since Haiku R1
4553*/
4554
4555
4556/*!
4557	\fn BRect BMessage::GetRect(const char* name, const BRect& defaultValue) const
4558	\brief Return the BRect object from message with \a name, or
4559	       \a defaultValue if not found.
4560
4561	\param name The name of the item to retrieve.
4562	\param defaultValue The value to use if the item specified by \a name
4563	       is not found.
4564
4565	\return The item with \a name, or \a defaultValue if not found.
4566
4567	\since Haiku R1
4568*/
4569
4570
4571/*!
4572	\fn BRect BMessage::GetRect(const char* name, int32 index,
4573		const BRect& defaultValue) const
4574	\brief Return the BRect object from message with \a name and \a index,
4575	       or \a defaultValue if not found.
4576
4577	\param name The name of the item to retrieve.
4578	\param index The index of the item to retrieve if there is more than one.
4579	\param defaultValue The value to use if the item specified by \a name
4580	       is not found.
4581
4582	\return The item with \a name, or \a defaultValue if not found.
4583
4584	\since Haiku R1
4585*/
4586
4587
4588/*!
4589	\fn BPoint BMessage::GetPoint(const char* name,
4590		const BPoint& defaultValue) const
4591	\brief Return the BPoint object from message with \a name, or
4592	       \a defaultValue if not found.
4593
4594	\param name The name of the item to retrieve.
4595	\param defaultValue The value to use if the item specified by \a name
4596	       is not found.
4597
4598	\return The item with \a name, or \a defaultValue if not found.
4599
4600	\since Haiku R1
4601*/
4602
4603
4604/*!
4605	\fn BPoint BMessage::GetPoint(const char* name, int32 index,
4606		const BPoint& defaultValue) const
4607	\brief Return the BPoint object from message with \a name and \a index,
4608	       or \a defaultValue if not found.
4609
4610	\param name The name of the item to retrieve.
4611	\param index The index of the item to retrieve if there is more than one.
4612	\param defaultValue The value to use if the item specified by \a name
4613	       is not found.
4614
4615	\return The item with \a name, or \a defaultValue if not found.
4616
4617	\since Haiku R1
4618*/
4619
4620
4621/*!
4622	\fn BSize BMessage::GetSize(const char* name,
4623		const BSize& defaultValue) const
4624	\brief Return the BSize object from message with \a name, or
4625	       \a defaultValue if not found.
4626
4627	\param name The name of the item to retrieve.
4628	\param defaultValue The value to use if the item specified by \a name
4629	       is not found.
4630
4631	\return The item with \a name, or \a defaultValue if not found.
4632
4633	\since Haiku R1
4634*/
4635
4636
4637/*!
4638	\fn BSize BMessage::GetSize(const char* name, int32 index,
4639		const BSize& defaultValue) const
4640	\brief Return the BSize object from message with \a name and \a index,
4641	       or \a defaultValue if not found.
4642
4643	\param name The name of the item to retrieve.
4644	\param index The index of the item to retrieve if there is more than one.
4645	\param defaultValue The value to use if the item specified by \a name
4646	       is not found.
4647
4648	\return The item with \a name, or \a defaultValue if not found.
4649
4650	\since Haiku R1
4651*/
4652
4653
4654//! @}
4655
4656/*!
4657	\name Setting Data Convenience Methods
4658
4659	These methods may be used as alternatives to the Add data methods above.
4660	Using them, will set the data stored at index 0 to the value that you pass
4661	to the method. If the data already exists, then it is overwritten.
4662
4663	For example, calling the SetBool(const char *, bool) method is like calling
4664	AddBool(const char*, bool) in case the item does not exist yet, and
4665	ReplaceBool(const char*, bool) in case it does.
4666
4667	Note that this call will fail if there already is data for that label, with
4668	a different type. If that might be the case, you will be better of using a
4669	combination of RemoveName(const char*) and the Add methods. Also note that
4670	this method will always work on the first element of the data (at index 0).
4671	In case there are more values stored, the other ones will not be altered.
4672*/
4673
4674
4675//! @{
4676
4677
4678/*!
4679	\fn status_t BMessage::SetBool(const char* name, bool value)
4680	\brief Set the data with at the label \a name to \a value.
4681
4682	\param name The name of the item.
4683	\param value The value to set the item to.
4684
4685	This function calls AddBool(const char*, bool) in case the item does not
4686	exist yet, and ReplaceBool(const char*, bool) in case it does.
4687
4688	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4689		case the item already exists with a different data type.
4690
4691	\since Haiku R1
4692*/
4693
4694
4695/*!
4696	\fn status_t BMessage::SetInt8(const char* name, int8 value)
4697	\brief Set the data with at the label \a name to \a value.
4698
4699	\param name The name of the item.
4700	\param value The value to set the item to.
4701
4702	This function calls AddInt8(const char*, int8) in case the item does not
4703	exist yet, and ReplaceInt8(const char*, int8) in case it does.
4704
4705	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4706		case the item already exists with a different data type.
4707
4708	\since Haiku R1
4709*/
4710
4711
4712/*!
4713	\fn status_t BMessage::SetUInt8(const char* name, uint8 value)
4714	\brief Set the data with at the label \a name to \a value.
4715
4716	\param name The name of the item.
4717	\param value The value to set the item to.
4718
4719	This function calls AddUInt8(const char*, uint8) in case the item does not
4720	exist yet, and ReplaceUInt8(const char*, uint8) in case it does.
4721
4722	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4723		case the item already exists with a different data type.
4724
4725	\since Haiku R1
4726*/
4727
4728
4729/*!
4730	\fn status_t BMessage::SetInt16(const char* name, int16 value)
4731	\brief Set the data with at the label \a name to \a value.
4732
4733	\param name The name of the item.
4734	\param value The value to set the item to.
4735
4736	This function calls AddInt16(const char*, int16) in case the item does not
4737	exist yet, and ReplaceInt16(const char*, int16) in case it does.
4738
4739	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4740		case the item already exists with a different data type.
4741
4742	\since Haiku R1
4743*/
4744
4745
4746/*!
4747	\fn status_t BMessage::SetUInt16(const char* name, uint16 value)
4748	\brief Set the data with at the label \a name to \a value.
4749
4750	\param name The name of the item.
4751	\param value The value to set the item to.
4752
4753	This function calls AddUInt16(const char*, uint16) in case the item does not
4754	exist yet, and ReplaceUInt16(const char*, uint16) in case it does.
4755
4756	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4757		case the item already exists with a different data type.
4758
4759	\since Haiku R1
4760*/
4761
4762
4763/*!
4764	\fn status_t BMessage::SetInt32(const char* name, int32 value)
4765	\brief Set the data with at the label \a name to \a value.
4766
4767	\param name The name of the item.
4768	\param value The value to set the item to.
4769
4770	This function calls AddInt32(const char*, int32) in case the item does not
4771	exist yet, and ReplaceInt32(const char*, int32) in case it does.
4772
4773	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4774		case the item already exists with a different data type.
4775
4776	\since Haiku R1
4777*/
4778
4779
4780/*!
4781	\fn status_t BMessage::SetUInt32(const char* name, uint32 value)
4782	\brief Set the data with at the label \a name to \a value.
4783
4784	\param name The name of the item.
4785	\param value The value to set the item to.
4786
4787	This function calls AddUInt32(const char*, uint32) in case the item does not
4788	exist yet, and ReplaceUInt32(const char*, uint32) in case it does.
4789
4790	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4791		case the item already exists with a different data type.
4792
4793	\since Haiku R1
4794*/
4795
4796
4797/*!
4798	\fn status_t BMessage::SetInt64(const char* name, int64 value)
4799	\brief Set the data with at the label \a name to \a value.
4800
4801	\param name The name of the item.
4802	\param value The value to set the item to.
4803
4804	This function calls AddInt64(const char*, int64) in case the item does not
4805	exist yet, and ReplaceInt64(const char*, int64) in case it does.
4806
4807	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4808		case the item already exists with a different data type.
4809
4810	\since Haiku R1
4811*/
4812
4813
4814/*!
4815	\fn status_t BMessage::SetUInt64(const char* name, uint64 value)
4816	\brief Set the data with at the label \a name to \a value.
4817
4818	\param name The name of the item.
4819	\param value The value to set the item to.
4820
4821	This function calls AddUInt64(const char*, uint64) in case the item does not
4822	exist yet, and ReplaceUInt64(const char*, uint64) in case it does.
4823
4824	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4825		case the item already exists with a different data type.
4826
4827	\since Haiku R1
4828*/
4829
4830
4831/*!
4832	\fn status_t BMessage::SetColor(const char* name, rgb_color value)
4833	\brief Set the data with at the label \a name to \a value.
4834
4835	\param name The name of the item.
4836	\param value The value to set the item to.
4837
4838	This function calls AddColor(const char*, rgb_color) in case the item does not
4839	exist yet, and ReplaceColor(const char*, rgb_color) in case it does.
4840
4841	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4842		case the item already exists with a different data type.
4843
4844	\since Haiku R1
4845*/
4846
4847
4848/*!
4849	\fn status_t BMessage::SetPointer(const char* name, const void* value)
4850	\brief Set the data with at the label \a name to \a value.
4851
4852	\param name The name of the item.
4853	\param value The value to set the item to.
4854
4855	This function calls AddPointer(const char*, const void*) in case the item does not
4856	exist yet, and ReplacePointer(const char*, const void*) in case it does.
4857
4858	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4859		case the item already exists with a different data type.
4860
4861	\since Haiku R1
4862*/
4863
4864
4865/*!
4866	\fn status_t BMessage::SetString(const char* name, const char* string)
4867	\brief Set the string with at the label \a name to \a string.
4868
4869	\param name The name of the item.
4870	\param string The value to set the item to.
4871
4872	This function calls AddString(const char*, const char*) in case the item does not
4873	exist yet, and ReplaceString(const char*, const char*) in case it does.
4874
4875	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4876		case the item already exists with a different data type.
4877
4878	\since Haiku R1
4879*/
4880
4881
4882/*!
4883	\fn status_t BMessage::SetString(const char* name, const BString& string)
4884	\brief Set the string with at the label \a name to \a string.
4885
4886	\param name The name of the item.
4887	\param string The value to set the item to.
4888
4889	This function calls AddString(const char*, const BString&) in case the item does not
4890	exist yet, and ReplaceString(const char*, const BString&) in case it does.
4891
4892	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4893		case the item already exists with a different data type.
4894
4895	\since Haiku R1
4896*/
4897
4898
4899/*!
4900	\fn status_t BMessage::SetFloat(const char* name, float value)
4901	\brief Set the data with at the label \a name to \a value.
4902
4903	\param name The name of the item.
4904	\param value The value to set the item to.
4905
4906	This function calls AddFloat(const char*, float) in case the item does not
4907	exist yet, and ReplaceFloat(const char*, float) in case it does.
4908
4909	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4910		case the item already exists with a different data type.
4911
4912	\since Haiku R1
4913*/
4914
4915
4916/*!
4917	\fn status_t BMessage::SetDouble(const char* name, double value)
4918	\brief Set the data with at the label \a name to \a value.
4919
4920	\param name The name of the item.
4921	\param value The value to set the item to.
4922
4923	This function calls AddDouble(const char*, double) in case the item does not
4924	exist yet, and ReplaceDouble(const char*, double) in case it does.
4925
4926	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4927		case the item already exists with a different data type.
4928
4929	\since Haiku R1
4930*/
4931
4932
4933/*!
4934	\fn status_t BMessage::SetAlignment(const char* name,
4935		const BAlignment& value)
4936	\brief Set the data with at the label \a name to \a value.
4937
4938	\param name The name of the item.
4939	\param value The value to set the item to.
4940
4941	This function calls AddAlignment(const char*, const BAlignment &) in case
4942	the item does not exist yet, and
4943	ReplaceAlignment(const char*, const BAlignment &) in case it does.
4944
4945	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4946		case the item already exists with a different data type.
4947
4948	\since Haiku R1
4949*/
4950
4951
4952/*!
4953	\fn status_t BMessage::SetPoint(const char* name, const BPoint& value)
4954	\brief Set the data with at the label \a name to \a value.
4955
4956	\param name The name of the item.
4957	\param value The value to set the item to.
4958
4959	This function calls AddPoint(const char*, const BPoint &) in case the item
4960	does not exist yet, and ReplacePoint(const char*, const BPoint &) in case
4961	it does.
4962
4963	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4964		case the item already exists with a different data type.
4965
4966	\since Haiku R1
4967*/
4968
4969
4970/*!
4971	\fn status_t BMessage::SetRect(const char* name, const BRrect& value)
4972	\brief Set the data with at the label \a name to \a value.
4973
4974	\param name The name of the item.
4975	\param value The value to set the item to.
4976
4977	This function calls AddRect(const char*, const BRect &) in case the item
4978	does not exist yet, and ReplaceRect(const char*, const BRect &) in case
4979	it does.
4980
4981	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
4982		case the item already exists with a different data type.
4983
4984	\since Haiku R1
4985*/
4986
4987
4988/*!
4989	\fn status_t BMessage::SetSize(const char* name, const BSize& value)
4990	\brief Set the data with at the label \a name to \a value.
4991
4992	\param name The name of the item.
4993	\param value The value to set the item to.
4994
4995	This function calls AddSize(const char*, const BSize &) in case the item
4996	does not exist yet, and ReplaceSize(const char*, const BSize &) in case
4997	it does.
4998
4999	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
5000		case the item already exists with a different data type.
5001
5002	\since Haiku R1
5003*/
5004
5005
5006/*!
5007	\fn status_t BMessage::SetData(const char* name, type_code type,
5008		const void* data, ssize_t numBytes, bool fixedSize = true,
5009		int count = 1)
5010	\brief Low level function to set data to a certain value.
5011
5012	This method is used internally. Use the Set* methods above.
5013
5014	\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
5015		case the item already exists with a different data type.
5016
5017	\since Haiku R1
5018*/
5019
5020
5021//! @}
5022