Invoker for the 5th SendMessage() version added.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@369 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
15df6f8a0c
commit
037c2e4631
@ -121,3 +121,31 @@ SMInvoker4::Invoke(BMessenger &target, BHandler *replyHandler,
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// SMInvoker5
|
||||
|
||||
// constructor
|
||||
SMInvoker5::SMInvoker5(bool useMessage, bool useReply,
|
||||
bigtime_t deliveryTimeout, bigtime_t replyTimeout)
|
||||
: SMInvoker(),
|
||||
fUseMessage(useMessage),
|
||||
fUseReply(useReply),
|
||||
fDeliveryTimeout(deliveryTimeout),
|
||||
fReplyTimeout(replyTimeout)
|
||||
{
|
||||
}
|
||||
|
||||
// Invoke
|
||||
status_t
|
||||
SMInvoker5::Invoke(BMessenger &target, BHandler *replyHandler,
|
||||
BMessenger &replyMessenger)
|
||||
{
|
||||
if (fUseReply)
|
||||
fReplyMessage = new BMessage(0UL);
|
||||
BMessage _message(MSG_TEST);
|
||||
BMessage *message = (fUseMessage ? &_message : NULL);
|
||||
status_t result = target.SendMessage(message, fReplyMessage,
|
||||
fDeliveryTimeout, fReplyTimeout);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -72,4 +72,20 @@ private:
|
||||
bool fUseReply;
|
||||
};
|
||||
|
||||
// Invoker for SendMessage(BMessage *, BMessage *, bigtime_t, bigtime_t)
|
||||
class SMInvoker5 : public SMInvoker {
|
||||
public:
|
||||
SMInvoker5(bool useMessage, bool useReply, bigtime_t deliveryTimeout,
|
||||
bigtime_t replyTimeout);
|
||||
|
||||
virtual status_t Invoke(BMessenger &target, BHandler *replyHandler,
|
||||
BMessenger &replyMessenger);
|
||||
|
||||
private:
|
||||
bool fUseMessage;
|
||||
bool fUseReply;
|
||||
bigtime_t fDeliveryTimeout;
|
||||
bigtime_t fReplyTimeout;
|
||||
};
|
||||
|
||||
#endif // SM_INVOKER_H
|
||||
|
Loading…
Reference in New Issue
Block a user