vfs: check userland buffers before reading them.
[haiku.git] / src / apps / mediaplayer / support / MessageEvent.cpp
blobe60bf419d93515c15c8a2adba9dcc9e756133a79
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>
8 #include "MessageEvent.h"
11 MessageEvent::MessageEvent(bigtime_t time, BHandler* handler, uint32 command)
12 : Event(time),
13 AbstractLOAdapter(handler),
14 fMessage(command)
19 MessageEvent::MessageEvent(bigtime_t time, BHandler* handler,
20 const BMessage& message)
21 : Event(time),
22 AbstractLOAdapter(handler),
23 fMessage(message)
28 MessageEvent::MessageEvent(bigtime_t time, const BMessenger& messenger)
29 : Event(time),
30 AbstractLOAdapter(messenger)
35 MessageEvent::~MessageEvent()
40 void
41 MessageEvent::Execute()
43 BMessage msg(fMessage);
44 msg.AddInt64("time", Time());
45 DeliverMessage(msg);