2 * Copyright 2001-2010 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _MESSAGE_RUNNER_H
6 #define _MESSAGE_RUNNER_H
12 class BMessageRunner
{
14 BMessageRunner(BMessenger target
,
15 const BMessage
* message
, bigtime_t interval
,
17 BMessageRunner(BMessenger target
,
18 const BMessage
& message
, bigtime_t interval
,
20 BMessageRunner(BMessenger target
,
21 const BMessage
* message
, bigtime_t interval
,
22 int32 count
, BMessenger replyTo
);
23 BMessageRunner(BMessenger target
,
24 const BMessage
& message
, bigtime_t interval
,
25 int32 count
, BMessenger replyTo
);
26 virtual ~BMessageRunner();
28 status_t
InitCheck() const;
30 status_t
SetInterval(bigtime_t interval
);
31 status_t
SetCount(int32 count
);
32 status_t
GetInfo(bigtime_t
* interval
,
35 static status_t
StartSending(BMessenger target
,
36 const BMessage
* message
, bigtime_t interval
,
38 static status_t
StartSending(BMessenger target
,
39 const BMessage
* message
, bigtime_t interval
,
40 int32 count
, BMessenger replyTo
);
43 BMessageRunner(const BMessageRunner
&);
44 BMessageRunner
& operator=(const BMessageRunner
&);
46 static int32
_RegisterRunner(BMessenger target
,
47 const BMessage
* message
, bigtime_t interval
,
48 int32 count
, bool detach
,
51 void _InitData(BMessenger target
,
52 const BMessage
* message
, bigtime_t interval
,
53 int32 count
, BMessenger replyTo
);
54 status_t
_SetParams(bool resetInterval
,
55 bigtime_t interval
, bool resetCount
,
58 virtual void _ReservedMessageRunner1();
59 virtual void _ReservedMessageRunner2();
60 virtual void _ReservedMessageRunner3();
61 virtual void _ReservedMessageRunner4();
62 virtual void _ReservedMessageRunner5();
63 virtual void _ReservedMessageRunner6();
71 #endif // _MESSAGE_RUNNER_H