1 /* 2 * Copyright (c) 2000-2008, Ingo Weinhold <ingo_weinhold@gmx.de>, 3 * Copyright (c) 2000-2008, Stephan Aßmus <superstippi@gmx.de>, 4 * All Rights Reserved. Distributed under the terms of the MIT license. 5 */ 6 #include <Message.h> 7 8 #include "MessageEvent.h" 9 10 11 MessageEvent::MessageEvent(bigtime_t time, BHandler* handler, uint32 command) 12 : Event(time), 13 AbstractLOAdapter(handler), 14 fMessage(command) 15 { 16 } 17 18 19 MessageEvent::MessageEvent(bigtime_t time, BHandler* handler, 20 const BMessage& message) 21 : Event(time), 22 AbstractLOAdapter(handler), 23 fMessage(message) 24 { 25 } 26 27 28 MessageEvent::MessageEvent(bigtime_t time, const BMessenger& messenger) 29 : Event(time), 30 AbstractLOAdapter(messenger) 31 { 32 } 33 34 35 MessageEvent::~MessageEvent() 36 { 37 } 38 39 40 void 41 MessageEvent::Execute() 42 { 43 BMessage msg(fMessage); 44 msg.AddInt64("time", Time()); 45 DeliverMessage(msg); 46 } 47 48