2 * Copyright 2001-2011 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold (bonefish@users.sf.net)
13 #include <ByteOrder.h>
23 BMessenger(const char* signature
,
25 status_t
* result
= NULL
);
26 BMessenger(const BHandler
* handler
,
27 const BLooper
* looper
= NULL
,
28 status_t
* result
= NULL
);
29 BMessenger(const BMessenger
& other
);
34 bool IsTargetLocal() const;
35 BHandler
* Target(BLooper
**looper
) const;
36 bool LockTarget() const;
37 status_t
LockTargetWithTimeout(
38 bigtime_t timeout
) const;
42 status_t
SendMessage(uint32 command
,
43 BHandler
* replyTo
= NULL
) const;
44 status_t
SendMessage(BMessage
* message
,
45 BHandler
* replyTo
= NULL
,
47 = B_INFINITE_TIMEOUT
) const;
48 status_t
SendMessage(BMessage
* message
,
51 = B_INFINITE_TIMEOUT
) const;
52 status_t
SendMessage(uint32 command
,
53 BMessage
* reply
) const;
54 status_t
SendMessage(BMessage
* message
,
56 bigtime_t deliveryTimeout
58 bigtime_t replyTimeout
59 = B_INFINITE_TIMEOUT
) const;
63 status_t
SetTo(const char* signature
,
65 status_t
SetTo(const BHandler
* handler
,
66 const BLooper
* looper
= NULL
);
68 BMessenger
& operator=(const BMessenger
& other
);
69 bool operator==(const BMessenger
& other
) const;
74 uint32
HashValue() const;
76 //----- Private or reserved -----------------------------------------
83 void _SetTo(team_id team
, port_id port
,
85 void _InitData(const char* signature
,
86 team_id team
, status_t
* result
);
87 void _InitData(const BHandler
* handler
,
88 const BLooper
*looper
,
99 bool operator<(const BMessenger
& a
, const BMessenger
& b
);
100 bool operator!=(const BMessenger
& a
, const BMessenger
& b
);
103 #endif // _MESSENGER_H