BMessage Class Reference

#include <Message.h>

Inheritance diagram for BMessage:

BAppPrefs BResourceSet::MessageObject List of all members.

Detailed Description

A BMessage is a bundle of structured information. Every BMessage contains a command constant and some number of data fields.

See also:
Using BMessage

Data Members

uint32 what A coded constant that captures what the message is about.


Public Member Functions

 BMessage ()
 BMessage (uint32 what)
 BMessage (const BMessage &a_message)
virtual ~BMessage ()
BMessageoperator= (const BMessage &msg)
status_t Update (const BMessage &from, bool recursive=false)
status_t FillIn (const BMessage &from, bool recursive=false)
status_t GetInfo (type_code typeRequested, int32 which, const char **name, type_code *typeReturned, int32 *count=NULL) const
status_t GetInfo (const char *name, type_code *type, int32 *c=0) const
status_t GetInfo (const char *name, type_code *type, bool *fixed_size) const
status_t GetNextName (void **cookie, const char **outName, type_code *outType=NULL, int32 *outCount=NULL) const
int32 CountNames (type_code type) const
bool IsEmpty () const
bool IsSystem () const
bool IsReply () const
void PrintToStream () const
status_t Rename (const char *old_entry, const char *new_entry)
bool WasDelivered () const
bool IsReplyRequested () const
bool IsSourceWaiting () const
bool IsSourceRemote () const
bool CompareDestination (const BMessenger &test) const
BMessenger ReturnAddress () const
const BMessagePrevious () const
bool WasDropped () const
BPoint DropPoint (BPoint *offset=NULL) const
bool HasWhen () const
bigtime_t When () const
void SetWhen (bigtime_t time)
status_t SendReply (const BMessage &the_reply, const BMessenger &reply_to, uint32 flags=B_TIMEOUT, bigtime_t timeout=B_INFINITE_TIMEOUT)
status_t SendReply (uint32 command)
status_t SendReply (uint32 command, const BMessenger &reply_to)
status_t SendReply (const BMessage &the_reply, BMessage *reply_to_reply, uint32 flags=B_TIMEOUT, bigtime_t send_timeout=B_INFINITE_TIMEOUT, bigtime_t reply_timeout=B_INFINITE_TIMEOUT)
status_t SendReply (uint32 command, BMessage *reply_to_reply)
status_t SendReply (uint32 command, BHandler *reply_to)
status_t SendReply (BMessage *the_reply, BHandler *reply_to=NULL, bigtime_t timeout=B_INFINITE_TIMEOUT)
status_t SendReply (BMessage *the_reply, BMessenger reply_to, bigtime_t timeout=B_INFINITE_TIMEOUT)
status_t SendReply (BMessage *the_reply, BMessage *reply_to_reply, bigtime_t send_timeout=B_INFINITE_TIMEOUT, bigtime_t reply_timeout=B_INFINITE_TIMEOUT)
ssize_t FlattenedSize () const
status_t Flatten (char *buffer, ssize_t size) const
status_t Flatten (BDataIO *stream, ssize_t *size=NULL) const
status_t Unflatten (const char *flat_buffer)
status_t Unflatten (BDataIO *stream)
ssize_t FlattenedSize (message_version format) const
status_t Flatten (message_version format, char *buffer, ssize_t size) const
status_t Flatten (message_version format, BDataIO *stream, ssize_t *size=NULL) const
status_t WritePort (port_id port, int32 code, uint32 flags=0, bigtime_t timeout=B_INFINITE_TIMEOUT) const
status_t ReadPort (port_id port, ssize_t size=-1, int32 *outCode=NULL, uint32 flags=0, bigtime_t timeout=B_INFINITE_TIMEOUT)
size_t RawPortSize () const
const void * RawPortData () const
status_t AddSpecifier (const char *property)
status_t AddSpecifier (const char *property, int32 index)
status_t AddSpecifier (const char *property, int32 index, int32 range)
status_t AddSpecifier (const char *property, const char *name)
status_t AddSpecifier (const BMessage *specifier)
status_t SetCurrentSpecifier (int32 index)
status_t GetCurrentSpecifier (int32 *index, BMessage *specifier=NULL, int32 *form=NULL, const char **property=NULL) const
bool HasSpecifiers () const
status_t PopSpecifier ()
status_t AddRect (const char *name, BRect a_rect)
status_t AddPoint (const char *name, BPoint a_point)
status_t AddString (const char *name, const char *a_string)
status_t AddString (const char *name, const BString &a_string)
status_t AddInt8 (const char *name, int8 val)
status_t AddInt16 (const char *name, int16 val)
status_t AddInt32 (const char *name, int32 val)
status_t AddInt64 (const char *name, int64 val)
status_t AddBool (const char *name, bool a_boolean)
status_t AddFloat (const char *name, float a_float)
status_t AddDouble (const char *name, double a_double)
status_t AddRGBColor (const char *name, rgb_color a_color, type_code type=B_RGB_COLOR_TYPE)
status_t AddPointer (const char *name, const void *ptr)
status_t AddMessenger (const char *name, BMessenger messenger)
status_t AddRef (const char *name, const entry_ref *ref)
status_t AddMessage (const char *name, const BMessage *msg)
status_t AddFlat (const char *name, const BFlattenable *obj, int32 count=1)
status_t AddAtom (const char *name, const BAtom *atm)
status_t AddAtomRef (const char *name, const BAtom *atm)
status_t AddData (const char *name, type_code type, const void *data, ssize_t numBytes, bool is_fixed_size=true, int32 count=1)
status_t RemoveData (const char *name, int32 index=0)
status_t RemoveName (const char *name)
status_t MakeEmpty ()
status_t FindRect (const char *name, BRect *rect) const
status_t FindRect (const char *name, int32 index, BRect *rect) const
status_t FindPoint (const char *name, BPoint *pt) const
status_t FindPoint (const char *name, int32 index, BPoint *pt) const
status_t FindString (const char *name, const char **str) const
status_t FindString (const char *name, int32 index, const char **str) const
status_t FindString (const char *name, BString *str) const
status_t FindString (const char *name, int32 index, BString *str) const
status_t FindInt8 (const char *name, int8 *value) const
status_t FindInt8 (const char *name, int32 index, int8 *val) const
status_t FindInt16 (const char *name, int16 *value) const
status_t FindInt16 (const char *name, int32 index, int16 *val) const
status_t FindInt32 (const char *name, int32 *value) const
status_t FindInt32 (const char *name, int32 index, int32 *val) const
status_t FindInt64 (const char *name, int64 *value) const
status_t FindInt64 (const char *name, int32 index, int64 *val) const
status_t FindBool (const char *name, bool *value) const
status_t FindBool (const char *name, int32 index, bool *value) const
status_t FindFloat (const char *name, float *f) const
status_t FindFloat (const char *name, int32 index, float *f) const
status_t FindDouble (const char *name, double *d) const
status_t FindDouble (const char *name, int32 index, double *d) const
status_t FindRGBColor (const char *name, rgb_color *c, bool allow_int32_type=false) const
status_t FindRGBColor (const char *name, int32 index, rgb_color *c, bool allow_int32_type=false) const
status_t FindAtom (const char *name, BAtom **atm) const
status_t FindAtom (const char *name, int32 index, BAtom **atm) const
status_t FindAtomRef (const char *name, BAtom **atm) const
status_t FindAtomRef (const char *name, int32 index, BAtom **atm) const
status_t FindPointer (const char *name, void **ptr) const
status_t FindPointer (const char *name, int32 index, void **ptr) const
status_t FindMessenger (const char *name, BMessenger *m) const
status_t FindMessenger (const char *name, int32 index, BMessenger *m) const
status_t FindRef (const char *name, entry_ref *ref) const
status_t FindRef (const char *name, int32 index, entry_ref *ref) const
status_t FindMessage (const char *name, BMessage *msg) const
status_t FindMessage (const char *name, int32 index, BMessage *msg) const
status_t FindFlat (const char *name, BFlattenable *obj) const
status_t FindFlat (const char *name, int32 index, BFlattenable *obj) const
status_t FindData (const char *name, type_code type, const void **data, ssize_t *numBytes) const
status_t FindData (const char *name, type_code type, int32 index, const void **data, ssize_t *numBytes) const
status_t ReplaceRect (const char *name, BRect a_rect)
status_t ReplaceRect (const char *name, int32 index, BRect a_rect)
status_t ReplacePoint (const char *name, BPoint a_point)
status_t ReplacePoint (const char *name, int32 index, BPoint a_point)
status_t ReplaceString (const char *name, const char *string)
status_t ReplaceString (const char *name, int32 index, const char *string)
status_t ReplaceString (const char *name, const BString &string)
status_t ReplaceString (const char *name, int32 index, const BString &string)
status_t ReplaceInt8 (const char *name, int8 val)
status_t ReplaceInt8 (const char *name, int32 index, int8 val)
status_t ReplaceInt16 (const char *name, int16 val)
status_t ReplaceInt16 (const char *name, int32 index, int16 val)
status_t ReplaceInt32 (const char *name, int32 val)
status_t ReplaceInt32 (const char *name, int32 index, int32 val)
status_t ReplaceInt64 (const char *name, int64 val)
status_t ReplaceInt64 (const char *name, int32 index, int64 val)
status_t ReplaceBool (const char *name, bool a_bool)
status_t ReplaceBool (const char *name, int32 index, bool a_bool)
status_t ReplaceFloat (const char *name, float a_float)
status_t ReplaceFloat (const char *name, int32 index, float a_float)
status_t ReplaceDouble (const char *name, double a_double)
status_t ReplaceDouble (const char *name, int32 index, double a_double)
status_t ReplaceRGBColor (const char *name, rgb_color a_color, bool allow_int32_type=false)
status_t ReplaceRGBColor (const char *name, int32 index, rgb_color a_color, bool allow_int32_type=false)
status_t ReplaceAtom (const char *name, const BAtom *atm)
status_t ReplaceAtom (const char *name, int32 index, const BAtom *atm)
status_t ReplaceAtomRef (const char *name, const BAtom *atm)
status_t ReplaceAtomRef (const char *name, int32 index, const BAtom *atm)
status_t ReplacePointer (const char *name, const void *ptr)
status_t ReplacePointer (const char *name, int32 index, const void *ptr)
status_t ReplaceMessenger (const char *name, BMessenger messenger)
status_t ReplaceMessenger (const char *name, int32 index, BMessenger msngr)
status_t ReplaceRef (const char *name, const entry_ref *ref)
status_t ReplaceRef (const char *name, int32 index, const entry_ref *ref)
status_t ReplaceMessage (const char *name, const BMessage *msg)
status_t ReplaceMessage (const char *name, int32 index, const BMessage *msg)
status_t ReplaceFlat (const char *name, const BFlattenable *obj)
status_t ReplaceFlat (const char *name, int32 index, const BFlattenable *obj)
status_t ReplaceData (const char *name, type_code type, const void *data, ssize_t data_size)
status_t ReplaceData (const char *name, type_code type, int32 index, const void *data, ssize_t data_size)
void * operator new (size_t size)
void * operator new (size_t size, const std::nothrow_t &)
void * operator new (size_t, void *arg)
void operator delete (void *ptr, size_t size)
bool HasRect (const char *, int32 n=0) const
bool HasPoint (const char *, int32 n=0) const
bool HasString (const char *, int32 n=0) const
bool HasInt8 (const char *, int32 n=0) const
bool HasInt16 (const char *, int32 n=0) const
bool HasInt32 (const char *, int32 n=0) const
bool HasInt64 (const char *, int32 n=0) const
bool HasBool (const char *, int32 n=0) const
bool HasFloat (const char *, int32 n=0) const
bool HasDouble (const char *, int32 n=0) const
bool HasRGBColor (const char *name, int32 n=0, bool allow_int32_type=false) const
bool HasAtom (const char *, int32 n=0) const
bool HasAtomRef (const char *, int32 n=0) const
bool HasPointer (const char *, int32 n=0) const
bool HasMessenger (const char *, int32 n=0) const
bool HasRef (const char *, int32 n=0) const
bool HasMessage (const char *, int32 n=0) const
bool HasFlat (const char *, const BFlattenable *) const
bool HasFlat (const char *, int32, const BFlattenable *) const
bool HasData (const char *, type_code, int32 n=0) const
BRect FindRect (const char *, int32 n=0) const
BPoint FindPoint (const char *, int32 n=0) const
const char * FindString (const char *, int32 n=0) const
int8 FindInt8 (const char *, int32 n=0) const
int16 FindInt16 (const char *, int32 n=0) const
int32 FindInt32 (const char *, int32 n=0) const
int64 FindInt64 (const char *, int32 n=0) const
bool FindBool (const char *, int32 n=0) const
float FindFloat (const char *, int32 n=0) const
double FindDouble (const char *, int32 n=0) const
status_t AddAtom (const char *name, const atom< BAtom > &obj)
status_t AddAtomRef (const char *name, const atom< BAtom > &obj)
status_t AddAtomRef (const char *name, const atomref< BAtom > &obj)
status_t FindAtom (const char *name, atom< BAtom > &atm) const
status_t FindAtom (const char *name, int32 index, atom< BAtom > &atm) const
status_t FindAtomRef (const char *name, atomref< BAtom > &atm) const
status_t FindAtomRef (const char *name, int32 index, atomref< BAtom > &atm) const
status_t ReplaceAtom (const char *name, const atom< BAtom > &atm)
status_t ReplaceAtom (const char *name, int32 index, const atom< BAtom > &atm)
status_t ReplaceAtomRef (const char *name, const atomref< BAtom > &atm)
status_t ReplaceAtomRef (const char *name, int32 index, const atomref< BAtom > &atm)
template<class TYPE>
status_t FindAtom (const char *name, atom< TYPE > &atm) const
template<class TYPE>
status_t FindAtom (const char *name, int32 index, atom< TYPE > &atm) const
template<class TYPE>
status_t FindAtomRef (const char *name, atomref< TYPE > &atm) const
template<class TYPE>
status_t FindAtomRef (const char *name, int32 index, atomref< TYPE > &atm) const

Public Attributes

uint32 what

Friends

class BMessageList
class BMessenger
class BApplication
class BParcel
void _msg_cache_cleanup_ ()
BMessage_reconstruct_msg_ (uint32, uint32)
void _set_message_target_ (BMessage *, int32, bool)
void _set_message_reply_ (BMessage *, BMessenger)
int32 _get_message_target_ (BMessage *)
bool _use_preferred_target_ (BMessage *)
BDataIOoperator<< (BDataIO &io, const BMessage &message)
int _init_message_ ()
int _delete_message_ ()


Constructor & Destructor Documentation

BMessage  ) 
 

Creates a new BMessage object.

BMessage uint32  pwhat  )  [explicit]
 

Creates a new BMessage object that has the given command constant.

Parameters:
pwhat command constant

BMessage const BMessage msg  ) 
 

Creates a new BMessage object hat's a copy of another BMessage. If it's a copy, the new object contains the same command constant and data fields as message.

Parameters:
msg BMessage

~BMessage  )  [virtual]
 

Frees all memory allocated to hold message data. If the message sender is expecting a reply but hasn't received one, a default reply (with B_NO_REPLY as the what data member) is sent before the message is destroyed.

The system retains ownership of the messages it delivers to you. Each message loop routinely deletes delivered BMessages after the application is finished responding to them.


Member Function Documentation

status_t AddAtom const char *  name,
const atom< BAtom > &  obj
 

status_t AddAtom const char *  name,
const BAtom atm
 

status_t AddAtomRef const char *  name,
const atomref< BAtom > &  obj
 

status_t AddAtomRef const char *  name,
const atom< BAtom > &  obj
 

status_t AddAtomRef const char *  name,
const BAtom atm
 

status_t AddBool const char *  name,
bool  a_boolean
 

Most of the other functions are variants of AddData() that hard-code the field's type. For example, AddFloat() assigns the type B_FLOAT_TYPE; AddBool() assigns B_BOOL_TYPE, and so on.

Parameters:
name 
a_boolean 

status_t AddData const char *  name,
type_code  type,
const void *  data,
ssize_t  numBytes,
bool  is_fixed_size = true,
int32  count = 1
 

These functions add data to the field named name and assign a data type to the field. Field names can be no longer than 255 characters. If more than one item of data is added under the same name, the BMessage creates an array of data for that name. Each time you add another value (to the same name), the value is added to the end of the array - you can't add a value at a specific index. A given field can only store one type of data.

Copies numBytes of data into the field, and assigns the data a type code. It copies whatever the param_ref data pointer points to. For example, if you want to add a string of characters to the message, data should be the string pointer (char *). If you want to add only the string pointer, not the characters themselves, data should be a pointer to the pointer (char **). The assigned type must be a specific data type; it should not be B_ANY_TYPE.

When you call AddData() to place the first item in an array under a new name, you can provide it with two arguments, fixedSize and numItems, that will improve the object's efficiency. If the fixedSize flag is true, each item in the array must have the same number of bytes; if the flag is false, items can vary in size. numItems tells the object to pre-allocate storage for some number of items. This isn't a limit - you can add more than numItems to the field.

Parameters:
name 
type 
data 
numBytes 
is_fixed_size (dafault is true)
count (default is 1)
Most of the other functions are variants of AddData() that hard-code the field's type. For example, AddFloat() assigns the type B_FLOAT_TYPE; AddBool() assigns B_BOOL_TYPE, and so on.

There's no limit on the number of named fields a message can contain or on the size of a field's data. However, since the search is linear, combing through a very long list of names to find a particular piece of data may be inefficient. Also, because of the amount of data that must be moved, an extremely large message can slow the delivery mechanism. It's sometimes better to put some of the information in a common location (a file, a private clipboard, a shared area of memory) and just refer to it in the message.

status_t AddDouble const char *  name,
double  a_double
 

status_t AddFlat const char *  name,
const BFlattenable obj,
int32  count = 1
 

Flattens an obj (by calling its Flatten() function) and adds the flat data to the message. It calls the object's TypeCode() function to learn the type code it should associate with the data. Objects that are added through AddFlat() must inherit from BFlattenable (defined in the Support Kit).

You can also provide a numItems hint to AddFlat() when you call it to set up a new array AddFlat() calls the object's IsFixedSize() function to discover whether all items in the array will be the same size.

Returns:
B_ERROR if the data is too massive to be added to the message

B_BAD_TYPE if the data can't be added to an existing array because it's the wrong type

B_NO_MEMORY if the BMessage can't get enough memory to hold the data

B_BAD_VALUE if the proposed name for the data is longer than 255 bytes.

If all goes well, they return B_OK.

status_t AddFloat const char *  name,
float  a_float
 

status_t AddInt16 const char *  name,
int16  val
 

status_t AddInt32 const char *  name,
int32  val
 

Takes an int32 or uint32.

Parameters:
name 
val 

status_t AddInt64 const char *  name,
int64  val
 

status_t AddInt8 const char *  name,
int8  val
 

status_t AddMessage const char *  name,
const BMessage msg
 

AddMessage() adds one BMessage to another.

status_t AddMessenger const char *  name,
BMessenger  messenger
 

Takes a BMessenger object.

Parameters:
name 
messenger 

status_t AddPoint const char *  name,
BPoint  a_point
 

status_t AddPointer const char *  name,
const void *  obj
 

Adds only the pointer it's passed, not the data it points to.

To accomplish the same thing, AddData() would take a pointer to the pointer. (The pointer will be valid only locally; it won't be useful to a remote destination.)

Parameters:
name 
obj 

status_t AddRect const char *  name,
BRect  r
 

Add Rectangle.

Parameters:
name 
r Rectangle

status_t AddRef const char *  name,
const entry_ref ref
 

Similarly, AddRef() adds the pointed to entry_ref structure to the message (and the variable-length name that's one of the elements of the structure);

status_t AddRGBColor const char *  name,
rgb_color  a_color,
type_code  type = B_RGB_COLOR_TYPE
 

status_t AddSpecifier const BMessage spec  ) 
 

Adds a specifier to the specifier stack.

Parameters:
spec adds the specifier message to the specifier stack

status_t AddSpecifier const char *  property,
const char *  name
 

status_t AddSpecifier const char *  property,
int32  index,
int32  range
 

status_t AddSpecifier const char *  property,
int32  index
 

status_t AddSpecifier const char *  property  ) 
 

Method add a specifier targeting the property property, with specifier constant.

Parameters:
spec adds the specifier message to the specifier stack

status_t AddString const char *  name,
const BString a_string
 

status_t AddString const char *  name,
const char *  str
 

AddString(), like AddData(), takes a pointer to the data it adds, or you can use a BString object. The string must be null-terminated; the null character is counted and copied into the message.

bool CompareDestination const BMessenger test  )  const
 

int32 CountNames type_code  type  )  const
 

Returns the number of named data fields in the BMessage that store data of the specified type. An array of information held under a single name counts as one field; each name is counted only once, no matter how many data items are stored under that name. If type is B_ANY_TYPE, this function counts all named fields. If type is a specific type, it counts only fields that store data registered as that type.

Parameters:
type Type of named data fields to count
Returns:
number of named data fields

BPoint DropPoint BPoint offset = NULL  )  const
 

Reports the point where the cursor was located when the message was dropped (when the user released the mouse button). It directly returns the point in the screen coordinate system and, if an offset argument is provided, returns it by reference in coordinates based on the image or rectangle the user dragged. The offset assumes a coordinate system with (0.0, 0.0) at the left top corner of the dragged rectangle or image.

Parameters:
offset 
Returns:
The point where the cursor was located when the message was dropped
Since any value can be a valid coordinate, DropPoint() produces reliable results only if WasDropped() returns true.

status_t FillIn const BMessage from,
bool  recursive = false
 

status_t FindAtom const char *  name,
int32  index,
atom< TYPE > &  atm
const [inline]
 

status_t FindAtom const char *  name,
atom< TYPE > &  atm
const [inline]
 

status_t FindAtom const char *  name,
int32  index,
atom< BAtom > &  atm
const
 

status_t FindAtom const char *  name,
atom< BAtom > &  atm
const
 

status_t FindAtom const char *  name,
int32  index,
BAtom **  atm
const
 

status_t FindAtom const char *  name,
BAtom **  atm
const
 

status_t FindAtomRef const char *  name,
int32  index,
atomref< TYPE > &  atm
const [inline]
 

status_t FindAtomRef const char *  name,
atomref< TYPE > &  atm
const [inline]
 

status_t FindAtomRef const char *  name,
int32  index,
atomref< BAtom > &  atm
const
 

status_t FindAtomRef const char *  name,
atomref< BAtom > &  atm
const
 

status_t FindAtomRef const char *  name,
int32  index,
BAtom **  atm
const
 

status_t FindAtomRef const char *  name,
BAtom **  atm
const
 

bool FindBool const char *  ,
int32  n = 0
const
 

status_t FindBool const char *  name,
int32  index,
bool *  value
const
 

status_t FindBool const char *  name,
bool *  value
const
 

status_t FindData const char *  name,
type_code  type,
int32  index,
const void **  data,
ssize_t *  size
const
 

FindData() places, in *data, a pointer to the requested data item. The size of the item in bytes is written to numBytes. If type is B_ANY_TYPE, it provides a pointer to the data no matter what type it actually is. But if type is a specific data type, it provides the pointer only if the name field holds data of that particular type.

Parameters:
name 
type 
index 
data 
size 
Note:
In all cases except FindData() and FindString(), the data that's retrieved from the BMessage is copied into the reference argument; the caller is responsible for freeing the copied data). For FindData() and the non-BString version of FindString(), a pointer to the data is returned; the BMessage retains ownership of the actual data and will delete the data when the object itself is deleted.
The other functions are specialized versions of FindData().

status_t FindData const char *  name,
type_code  type,
const void **  data,
ssize_t *  size
const
 

FindData() places, in *data, a pointer to the requested data item. The size of the item in bytes is written to numBytes. If type is B_ANY_TYPE, it provides a pointer to the data no matter what type it actually is. But if type is a specific data type, it provides the pointer only if the name field holds data of that particular type.

Parameters:
name 
type 
data 
size 
Note:
In all cases except FindData() and FindString(), the data that's retrieved from the BMessage is copied into the reference argument; the caller is responsible for freeing the copied data). For FindData() and the non-BString version of FindString(), a pointer to the data is returned; the BMessage retains ownership of the actual data and will delete the data when the object itself is deleted.
The other functions are specialized versions of FindData().

double FindDouble const char *  ,
int32  n = 0
const
 

status_t FindDouble const char *  name,
int32  index,
double *  d
const
 

status_t FindDouble const char *  name,
double *  d
const
 

status_t FindFlat const char *  name,
int32  index,
BFlattenable obj
const
 

See FindFlat()

status_t FindFlat const char *  name,
BFlattenable obj
const
 

Assigns the object stored in the BMessage to the object passed as an argument - it calls the object's Unflatten() function and passes it the flat data from the message - provided that the two objects have compatible types. The argument object's AllowsTypeCode() function must return true when tested with the type code stored in the message; if not, FindFlat() fails and returns .

Parameters:
name 
obj 
Returns:
If these functions can't find any data associated with name, they return a B_NAME_NOT_FOUND error. If they can't find name data of the requested type (or the type the function returns), they return .B_BAD_TYPE. If the index is out of range, they return B_BAD_INDEX. You can rely on the values they retrieve only if they return B_OK and the data was correctly recorded when it was added to the message.

float FindFloat const char *  ,
int32  n = 0
const
 

status_t FindFloat const char *  name,
int32  index,
float *  f
const
 

status_t FindFloat const char *  name,
float *  f
const
 

int16 FindInt16 const char *  ,
int32  n = 0
const
 

status_t FindInt16 const char *  name,
int32  index,
int16 *  val
const
 

status_t FindInt16 const char *  name,
int16 *  value
const
 

int32 FindInt32 const char *  ,
int32  n = 0
const
 

status_t FindInt32 const char *  name,
int32  index,
int32 *  val
const
 

status_t FindInt32 const char *  name,
int32 *  value
const
 

int64 FindInt64 const char *  ,
int32  n = 0
const
 

status_t FindInt64 const char *  name,
int32  index,
int64 *  val
const
 

status_t FindInt64 const char *  name,
int64 *  value
const
 

int8 FindInt8 const char *  ,
int32  n = 0
const
 

status_t FindInt8 const char *  name,
int32  index,
int8 *  val
const
 

status_t FindInt8 const char *  name,
int8 *  value
const
 

status_t FindMessage const char *  name,
int32  index,
BMessage msg
const
 

status_t FindMessage const char *  name,
BMessage msg
const
 

status_t FindMessenger const char *  name,
int32  index,
BMessenger m
const
 

status_t FindMessenger const char *  name,
BMessenger m
const
 

BPoint FindPoint const char *  ,
int32  n = 0
const
 

status_t FindPoint const char *  name,
int32  index,
BPoint pt
const
 

status_t FindPoint const char *  name,
BPoint pt
const
 

status_t FindPointer const char *  name,
int32  index,
void **  ptr
const
 

status_t FindPointer const char *  name,
void **  ptr
const
 

BRect FindRect const char *  ,
int32  n = 0
const
 

status_t FindRect const char *  name,
int32  index,
BRect r
const
 

This function retrieve rectangle data from the BMessage.

Parameters:
name 
index 
r 

status_t FindRect const char *  name,
BRect r
const
 

This function retrieve rectangle data from the BMessage.

Parameters:
name 
r 

status_t FindRef const char *  name,
int32  index,
entry_ref ref
const
 

Retrieves an entry_ref structure; the data that's used to reconstitute the structure may have been added as an entry_ref (through AddRef()), or as a flattened BPath object (AddFlat()).

Parameters:
name 
index 
ref 

status_t FindRef const char *  name,
entry_ref ref
const
 

Retrieves an entry_ref structure; the data that's used to reconstitute the structure may have been added as an entry_ref (through AddRef()), or as a flattened BPath object (AddFlat()).

Parameters:
name 
ref 

status_t FindRGBColor const char *  name,
int32  index,
rgb_color c,
bool  allow_int32_type = false
const
 

status_t FindRGBColor const char *  name,
rgb_color c,
bool  allow_int32_type = false
const
 

const char * FindString const char *  ,
int32  n = 0
const
 

status_t FindString const char *  name,
int32  index,
BString str
const
 

status_t FindString const char *  name,
BString str
const
 

status_t FindString const char *  name,
int32  index,
const char **  str
const
 

status_t FindString const char *  name,
const char **  str
const
 

status_t Flatten message_version  format,
BDataIO stream,
ssize_t *  size = NULL
const
 

status_t Flatten message_version  format,
char *  buffer,
ssize_t  size
const
 

status_t Flatten BDataIO stream,
ssize_t *  psize = NULL
const
 

This function write the BMessage and the data it contains to a "flat" (untyped) buffer of bytes, and reconstruct a BMessage object from such a buffer.

If passed a BDataIO object (including a BFile), Flatten() calls the object's Write() function to write the message data. If passed the address of a buffer, it begins writing at the start of the buffer. Flatten() places the number of bytes actually written in the variable that its numBytes argument refers to.

Returns:
Any errors encountered when writing the data, or B_OK if there is no error.

status_t Flatten char *  buffer,
ssize_t  size
const
 

ssize_t FlattenedSize message_version  format  )  const
 

FlattenedSize() returns the number of bytes you must provide in the buffer to hold the flattened object.

ssize_t FlattenedSize  )  const
 

status_t GetCurrentSpecifier int32 *  index,
BMessage specifier = NULL,
int32 *  form = NULL,
const char **  property = NULL
const
 

Unpacks the current specifier in the BMessage, the one at the top of the specifier stack; PopSpecifier() changes the notion of which specifier is current, by popping the current one from the stack.

This function aid in implementing a class-specific version of BHandler's ResolveSpecifier() function - the first gets the specifier that needs to be resolved, and the second pops it from the stack after it is resolved. You can also call them to examine relevant specifiers when handling a message that targets an object property (such as B_GET_PROPERTY).

A scripting BMessage keeps specifiers in a data array named "specifiers"; each specifier is itself a BMessage, but one with a special structure and purpose in the scripting system. See the "Scripting" section near the beginning of this chapter for an overview of the system and the place of specifiers in it.

GetCurrentSpecifier() puts the index of the current specifier in the variable that its first argument, index, refers to. If other arguments are provided, it makes the specifier BMessage a copy of the current specifier. It also extracts two pieces of information from the specifier: It places the what data member of the specifier in the what variable and a pointer to the property name in the property variable. These last two output arguments won't be valid if the specifier argument is NULL.

Both functions fail if the BMessage doesn't contain specifiers. In addition, GetCurrentSpecifier() fails if it can't find data in the BMessage for its specifier and property arguments.

status_t GetInfo const char *  name,
type_code *  type,
bool *  is_fixed_size
const
 

Provides information about the data fields stored in the BMessage.

When the fixedSize argument is specified, the bool referenced by fixedSize is set to true if all items in the array specified by name must be the same size, and false if the items can be of different sizes (see AddData()).

Parameters:
name 
type 
is_fixed_size 

status_t GetInfo const char *  name,
type_code *  type,
int32 *  count = 0
const
 

Provides information about the data fields stored in the BMessage.

When passed a name that matches a name within the BMessage, GetInfo() places the type code for data stored under that name in the variable referred to by typeFound and writes the number of data items with that name into the variable referred to by countFound. It then returns B_OK. If it can't find a name field within the BMessage, it sets the countFound variable to 0, and returns B_NAME_NOT_FOUND (without modifying the typeFound variable).

Parameters:
name 
type 
count 

status_t GetInfo type_code  typeRequested,
int32  which,
const char **  name,
type_code *  typeReturned,
int32 *  count = NULL
const
 

Provides information about the data fields stored in the BMessage.

When passed a type and an index, GetInfo() looks only at fields that store data of the requested type and provides information about the field at the requested index. Indices begin at 0 and are type specific. For example, if the requested type is B_DOUBLE_TYPE and the BMessage contains a total of three named fields that store double data, the first field would be at index 0, the second at 1, and the third at 2 - no matter what other types of data actually separate them in the BMessage, and no matter how many data items each field contains. (Note that the index in this case ranges over fields, each with a different name, not over the data items within a particular named field.) If the requested type is B_ANY_TYPE, this function looks at all fields and gets information about the one at index whatever its type.

If successful in finding data of the type requested at index, GetInfo() returns B_OK and provides information about the data through the last three arguments:

  • It places a pointer to the name of the data field in the variable referred to by nameFound.
  • It puts the code for the type of data the field contains in the variable referred to by typeFound. This will be the same as the type requested, unless the requested type is B_ANY_TYPE, in which case typeFound will be the actual type stored under the name.
  • It records the number of data items stored within the field in the variable referred to by countFound.

Parameters:
typeRequested 
which 
name 
typeReturned 
count If GetInfo() can't find data of the requested type at index, it sets the countFound variable to 0, and returns B_BAD_TYPE. If the index is out of range, it returns B_BAD_INDEX.

status_t GetNextName void **  cookie,
const char **  outName,
type_code *  outType = NULL,
int32 *  outCount = NULL
const
 

bool HasAtom const char *  ,
int32  n = 0
const
 

bool HasAtomRef const char *  ,
int32  n = 0
const
 

bool HasBool const char *  ,
int32  n = 0
const
 

bool HasData const char *  ,
type_code  ,
int32  n = 0
const
 

bool HasDouble const char *  ,
int32  n = 0
const
 

bool HasFlat const char *  ,
int32  ,
const BFlattenable
const
 

bool HasFlat const char *  ,
const BFlattenable
const
 

bool HasFloat const char *  ,
int32  n = 0
const
 

bool HasInt16 const char *  ,
int32  n = 0
const
 

bool HasInt32 const char *  ,
int32  n = 0
const
 

bool HasInt64 const char *  ,
int32  n = 0
const
 

bool HasInt8 const char *  ,
int32  n = 0
const
 

bool HasMessage const char *  ,
int32  n = 0
const
 

bool HasMessenger const char *  ,
int32  n = 0
const
 

bool HasPoint const char *  ,
int32  n = 0
const
 

bool HasPointer const char *  ,
int32  n = 0
const
 

bool HasRect const char *  ,
int32  n = 0
const
 

bool HasRef const char *  ,
int32  n = 0
const
 

bool HasRGBColor const char *  name,
int32  n = 0,
bool  allow_int32_type = false
const
 

bool HasSpecifiers  )  const
 

Returns:
true if the BMessage has specifiers added by an AddSpecifier() function, and false if not.

bool HasString const char *  ,
int32  n = 0
const
 

bool HasWhen  )  const
 

bool IsEmpty  )  const
 

Returns:
returns true if the BMessage has no data (whether or not it was emptied by MakeEmpty()), and false if it has some.

bool IsReply  )  const
 

This function can help if you're engaged in an exchange of messages or managing an ongoing communication.

Returns:
true if the BMessage is a reply to a previous message (if it was sent by the SendReply() function), and false if not.

bool IsReplyRequested  )  const
 

bool IsSourceRemote  )  const
 

This function can help if you're engaged in an exchange of messages or managing an ongoing communication.

Returns:
true if the message had its source in another application, and false if the source is local or the message hasn't been delivered yet.

bool IsSourceWaiting  )  const
 

This function can help if you're engaged in an exchange of messages or managing an ongoing communication.

Returns:
true if the message source is waiting for a synchronous reply, and false if not. The source thread can request and wait for a reply when calling either BMessenger's SendMessage() or BMessage's SendReply() function.

bool IsSystem  )  const
 

Returns:
true if the what data member of the BMessage object identifies it as a system-defined message, and false if not.

status_t MakeEmpty  ) 
 

Removes and frees all data that has been added to the BMessage, without altering the what constant.

Returns:
B_OK, unless the message can't be altered (as it can't if it's being dragged), in which case it returns B_ERROR.

void operator delete void *  ptr,
size_t  size
 

Frees memory allocated by the BMessage version of new, which may mean restoring the memory to the cache.

void * operator new size_t  ,
void *  arg
 

void * operator new size_t  size,
const std::nothrow_t & 
 

void * operator new size_t  size  ) 
 

Allocates memory for a BMessage object, or takes the memory from a previously allocated cache. The caching mechanism is an efficient way of managing memory for objects that are created frequently and used for short periods of time, as BMessages typically are.

Parameters:
size Number of bytes

BMessage & operator= const BMessage msg  ) 
 

Assigns one BMessage object to another. After the assignment, the two objects are duplicates of each other without shared data.

Parameters:
msg BMessage

status_t PopSpecifier  ) 
 

The specifiers in a message are ordered and, until PopSpecifier() is called, the one that was added last - the one with the greatest index - is the current specifier. PopSpecifier() merely decrements the index that picks the current specifier; it doesn't delete anything from the BMessage.

PopSpecifier() fails if the BMessage isn't one that has been delivered to you after being processed through a message loop. When it fails PopSpecifier() returns B_BAD_VALUE. On success, both functions return B_OK

Returns:
B_BAD_VALUE or B_OK

const BMessage * Previous  )  const
 

This function can help if you're engaged in an exchange of messages or managing an ongoing communication.

Returns:
the previous message - the message to which the current BMessage is a reply. It works only for a BMessage that's received as an asynchronous reply to a previous message. A synchronous reply is received in the context of the previous message, so it's not necessary to call a function to get it. But when an asynchronous reply is received, the context of the original message is lost; this function can provide it. Previous() returns NULL if the BMessage isn't an asynchronous reply to another message.

void PrintToStream  )  const
 

Prints information about the BMessage to the standard output stream (stdout). Each field of named data is reported in the following format,

entry name, type = type, count = count

where name is the name that the data is registered under, type is the constant that indicates what type of data it is, and count is the number of data items in the named array.

const void * RawPortData  )  const
 

size_t RawPortSize  )  const
 

status_t ReadPort port_id  port,
ssize_t  size = -1,
int32 *  outCode = NULL,
uint32  flags = 0,
bigtime_t  timeout = B_INFINITE_TIMEOUT
 

status_t RemoveData const char *  name,
int32  index = 0
 

Removes the single item of data at index in the name array. If the array has just one data item, it removes the array and name just as RemoveName() would.

Parameters:
name Name of the array
index Index of the single item of data
The function free the memory that was allocated to hold the data, and return B_OK when successful. However, if there's no data in the BMessage under name, they return a B_NAME_NOT_FOUND error. If message data can be read but can't be changed (as it can't for a message that's being dragged), they return B_ERROR.

status_t RemoveName const char *  name  ) 
 

Removes all data entered in the BMessage under name and the name itself.

Parameters:
name Name of the BMessage parts to remove
Returns:
B_OK when successful

there's no data in the BMessage under name, they return a B_NAME_NOT_FOUND

message data can be read but can't be changed (as it can't for a message that's being dragged), they return B_ERROR

The function free the memory that was allocated to hold the data, and return B_OK when successful. However, if there's no data in the BMessage under name, they return a B_NAME_NOT_FOUND error. If message data can be read but can't be changed (as it can't for a message that's being dragged), they return B_ERROR.

status_t Rename const char *  old_entry,
const char *  new_entry
 

status_t ReplaceAtom const char *  name,
int32  index,
const atom< BAtom > &  atm
 

status_t ReplaceAtom const char *  name,
const atom< BAtom > &  atm
 

status_t ReplaceAtom const char *  name,
int32  index,
const BAtom atm
 

status_t ReplaceAtom const char *  name,
const BAtom atm
 

status_t ReplaceAtomRef const char *  name,
int32  index,
const atomref< BAtom > &  atm
 

status_t ReplaceAtomRef const char *  name,
const atomref< BAtom > &  atm
 

status_t ReplaceAtomRef const char *  name,
int32  index,
const BAtom atm
 

status_t ReplaceAtomRef const char *  name,
const BAtom atm
 

status_t ReplaceBool const char *  name,
int32  index,
bool  a_bool
 

status_t ReplaceBool const char *  name,
bool  a_bool
 

status_t ReplaceData const char *  name,
type_code  type,
int32  index,
const void *  data,
ssize_t  data_size
 

status_t ReplaceData const char *  name,
type_code  type,
const void *  data,
ssize_t  data_size
 

status_t ReplaceDouble const char *  name,
int32  index,
double  a_double
 

status_t ReplaceDouble const char *  name,
double  a_double
 

status_t ReplaceFlat const char *  name,
int32  index,
const BFlattenable obj
 

status_t ReplaceFlat const char *  name,
const BFlattenable obj
 

status_t ReplaceFloat const char *  name,
int32  index,
float  a_float
 

status_t ReplaceFloat const char *  name,
float  a_float
 

status_t ReplaceInt16 const char *  name,
int32  index,
int16  val
 

status_t ReplaceInt16 const char *  name,
int16  val
 

status_t ReplaceInt32 const char *  name,
int32  index,
int32  val
 

status_t ReplaceInt32 const char *  name,
int32  val
 

status_t ReplaceInt64 const char *  name,
int32  index,
int64  val
 

status_t ReplaceInt64 const char *  name,
int64  val
 

status_t ReplaceInt8 const char *  name,
int32  index,
int8  val
 

status_t ReplaceInt8 const char *  name,
int8  val
 

status_t ReplaceMessage const char *  name,
int32  index,
const BMessage msg
 

status_t ReplaceMessage const char *  name,
const BMessage msg
 

status_t ReplaceMessenger const char *  name,
int32  index,
BMessenger  msngr
 

status_t ReplaceMessenger const char *  name,
BMessenger  messenger
 

status_t ReplacePoint const char *  name,
int32  index,
BPoint  a_point
 

status_t ReplacePoint const char *  name,
BPoint  a_point
 

status_t ReplacePointer const char *  name,
int32  index,
const void *  ptr
 

status_t ReplacePointer const char *  name,
const void *  ptr
 

status_t ReplaceRect const char *  name,
int32  index,
BRect  a_rect
 

status_t ReplaceRect const char *  name,
BRect  a_rect
 

status_t ReplaceRef const char *  name,
int32  index,
const entry_ref ref
 

status_t ReplaceRef const char *  name,
const entry_ref ref
 

status_t ReplaceRGBColor const char *  name,
int32  index,
rgb_color  a_color,
bool  allow_int32_type = false
 

status_t ReplaceRGBColor const char *  name,
rgb_color  a_color,
bool  allow_int32_type = false
 

status_t ReplaceString const char *  name,
int32  index,
const BString string
 

status_t ReplaceString const char *  name,
const BString string
 

status_t ReplaceString const char *  name,
int32  index,
const char *  string
 

status_t ReplaceString const char *  name,
const char *  string
 

BMessenger ReturnAddress  )  const
 

Returns:
A BMessenger object that can be used to reply to the BMessage.
Calling the BMessenger's SendMessage() function is equivalent to calling SendReply(), except that the return message won't be marked as a reply. If a reply isn't allowed (if the BMessage wasn't delivered), the returned BMessenger will be invalid.

If you want to use the ReturnAddress() BMessenger to send a synchronous reply, you must do so before the BMessage is deleted and a default reply is sent.

status_t SendReply BMessage the_reply,
BMessage reply_to_reply,
bigtime_t  send_timeout = B_INFINITE_TIMEOUT,
bigtime_t  reply_timeout = B_INFINITE_TIMEOUT
 

Sends a reply message back to the sender of the BMessage (in the case of a synchronous reply) or to a target BHandler (in the case of an asynchronous reply). Whether the reply is synchronous or asynchronous depends on how the BMessage that's sending the reply was itself sent:

Parameters:
the_reply 
reply_to_reply 
send_timeout (default is B_INFINITE_TIMEOUT)
reply_timeout (default is B_INFINITE_TIMEOUT)
  • The reply is delivered synchronously if the message sender is waiting for one to arrive. The function that sent the BMessage doesn't return until it receives the reply (or a timeout expires). If an expected reply has not been sent by the time the BMessage object is deleted, a default B_NO_REPLY message is returned to the sender. If a reply is sent after the sender gave up waiting for it to arrive, the reply message disappears into the bowels of the system.

  • The reply is delivered asynchronously if the message sender isn't waiting for a reply. In this case, the sending function designates a target BHandler and BLooper for any replies that might be sent, then returns immediately after putting the BMessage in the pipeline. Posted messages and messages that are dragged and dropped are also eligible for asynchronous replies.

SendReply() works only for BMessage objects that have been processed through a message loop and delivered to you. The caller retains ownership of the reply message passed to SendReply(); it can be deleted (or left to die on the stack) after the function returns.

SendReply() sends a message - a reply message, to be sure, but a message nonetheless. It behaves exactly like the other message-sending function, BMessenger's SendMessage():

  • By passing it a reply argument, you can ask for a synchronous reply to the reply message it sends. It won't return until it receives the reply.

By default, SendReply() doesn't return until the reply message is delivered (placed in the BLooper's port queue). It's possible, in some circumstances, for the receiving port queue to be full, in which case SendReply() will block until a slot becomes free. However, you can limit how long SendReply() will wait to deliver the message before it gives up and returns. The sendTimeout argument is the number of microseconds you give the function to do its work. If the time limit is exceeded, the function fails and returns an error (B_TIMED_OUT).

When asking for a synchronous reply, separate sendTimeout and replyTimeout limits can be set for sending the message and receiving the reply. There is no time limit if a timeout value is set to B_INFINITE_TIMEOUT - as it is by default. The function won't block at all if the timeout is set to 0.

If a command is passed rather than a message, SendReply() constructs the reply BMessage, initializes its what data member with the command constant, and sends it just like any other reply. The command versions of this function have infinite timeouts; they block until the message is delivered and, if requested, a synchronous reply is received.

This function returns B_OK if the reply is successfully sent. If there's a problem in sending the message, it returns the same sort of error code as BMessenger's SendMessage(). It may also report a reply-specific problem. The more informative return values are as follows:

Error code Is returned when
B_BAD_REPLY Attempting to reply to a message that hasn't been delivered yet.
B_DUPLICATE_REPLY Sending a reply after one has already been sent and delivered.
B_BAD_THREAD_ID Sending a reply to a destination thread that no longer exists.
B_BAD_PORT_ID Sending a reply to a BLooper and port that no longer exist.
B_TIMED_OUT Taking longer than the specified time limit to deliver a reply message or to receive a synchronous reply to the reply

If you want to delay sending a reply and keep the BMessage object beyond the time it's scheduled to be deleted, you may be able to detach it from the message loop. See DetachCurrentMessage() in the BLooper class.

status_t SendReply BMessage the_reply,
BMessenger  reply_to,
bigtime_t  timeout = B_INFINITE_TIMEOUT
 

Parameters:
the_reply 
reply_to 
timeout 

status_t SendReply BMessage the_reply,
BHandler reply_to = NULL,
bigtime_t  timeout = B_INFINITE_TIMEOUT
 

Parameters:
the_reply 
reply_to 
timeout 
SendReply() sends a message - a reply message, to be sure, but a message nonetheless. It behaves exactly like the other message-sending function, BMessenger's SendMessage():

  • By supplying a reply_to argument, you can arrange for an expected asynchronous reply. If a specific target isn't specified, the BApplication object will handle the reply if one is sent.

status_t SendReply uint32  command,
BHandler reply_to
 

Parameters:
command 
reply_to 

status_t SendReply uint32  command,
BMessage reply_to_reply
 

Parameters:
command 
reply_to_reply 

status_t SendReply const BMessage the_reply,
BMessage reply_to_reply,
uint32  flags = B_TIMEOUT,
bigtime_t  send_timeout = B_INFINITE_TIMEOUT,
bigtime_t  reply_timeout = B_INFINITE_TIMEOUT
 

Parameters:
the_reply 
reply_to_reply 
flags 
send_timeout 
reply_timeout 

status_t SendReply uint32  command,
const BMessenger reply_to
 

Parameters:
command 
reply_to 

status_t SendReply uint32  command  ) 
 

Parameters:
command 

status_t SendReply const BMessage the_reply,
const BMessenger reply_to,
uint32  flags = B_TIMEOUT,
bigtime_t  timeout = B_INFINITE_TIMEOUT
 

Parameters:
the_reply 
reply_to 
flags 
timeout 

status_t SetCurrentSpecifier int32  index  ) 
 

void SetWhen bigtime_t  time  ) 
 

status_t Unflatten BDataIO stream  ) 
 

Empties the BMessage of any information it may happen to contain, then initializes the object from data read from the buffer. If passed a BDataIO object, it calls the object's Read() function to read the message data. If passed a buffer address, it begins reading at the start of the buffer. It's up to the caller to make sure that Unflatten() reads data that Flatten() wrote and that pointers are positioned correctly.

Parameters:
stream 
Returns:
If it doesn't recognize the data in the buffer as being a flattened object or there's a failure in reading the data, Unflatten() returns B_BAD_VALUE. If it doesn't have adequate memory to recreate the whole message, it returns B_NO_MEMORY. Otherwise, it returns B_OK.

status_t Unflatten const char *  ptr  ) 
 

Empties the BMessage of any information it may happen to contain, then initializes the object from data read from the buffer. If passed a BDataIO object, it calls the object's Read() function to read the message data. If passed a buffer address, it begins reading at the start of the buffer. It's up to the caller to make sure that Unflatten() reads data that Flatten() wrote and that pointers are positioned correctly.

Parameters:
ptr 
Returns:
If it doesn't recognize the data in the buffer as being a flattened object or there's a failure in reading the data, Unflatten() returns B_BAD_VALUE. If it doesn't have adequate memory to recreate the whole message, it returns B_NO_MEMORY. Otherwise, it returns B_OK.

status_t Update const BMessage from,
bool  recursive = false
 

bool WasDelivered  )  const
 

This function can help if you're engaged in an exchange of messages or managing an ongoing communication.

WasDelivered() indicates whether it's possible to send a reply to a message.

Returns:
true for a BMessage that was posted, sent, or dropped - that is, one that has been processed through a message loop - and false for a message that has not yet been delivered by any means.

bool WasDropped  )  const
 

Returns:
true if the user delivered the BMessage by dragging and dropping it, and false if the message was posted or sent in application code or if it hasn't yet been delivered at all.

bigtime_t When  )  const
 

status_t WritePort port_id  port,
int32  code,
uint32  flags = 0,
bigtime_t  timeout = B_INFINITE_TIMEOUT
const
 


Friends And Related Function Documentation

int _delete_message_  )  [friend]
 

int32 _get_message_target_ BMessage  )  [friend]
 

int _init_message_  )  [friend]
 

void _msg_cache_cleanup_  )  [friend]
 

BMessage* _reconstruct_msg_ uint32  what,
uint32  serverBase
[friend]
 

void _set_message_reply_ BMessage ,
BMessenger 
[friend]
 

void _set_message_target_ BMessage ,
int32  ,
bool 
[friend]
 

bool _use_preferred_target_ BMessage  )  [friend]
 

friend class BApplication [friend]
 

friend class BMessageList [friend]
 

friend class BMessenger [friend]
 

friend class BParcel [friend]
 

BDataIO& operator<< BDataIO io,
const BMessage message
[friend]
 


Member Data Documentation

uint32 what
 


Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.