vfs: check userland buffers before reading them.
[haiku.git] / src / apps / mediaplayer / ControllerView.h
blob9919367eff9eb8494e636c0f9abfc1d090cefaf0
1 /*
2 * Controller.cpp - Media Player for the Haiku Operating System
4 * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de>
5 * Copyright (C) 2007 Stephan Aßmus <superstippi@gmx.de>
6 * Copyright (C) 2008-2009 Fredrik Modéen <[FirstName]@[LastName].se> (MIT ok)
8 * Released under the terms of the MIT license.
9 */
10 #ifndef __CONTROLLER_VIEW_H
11 #define __CONTROLLER_VIEW_H
14 #include "TransportControlGroup.h"
17 class Controller;
18 class Playlist;
19 class PlaylistObserver;
22 class ControllerView : public TransportControlGroup {
23 public:
24 ControllerView(BRect frame, Controller* controller,
25 Playlist* playlist);
26 ~ControllerView();
28 // TransportControlGroup interface
29 virtual void TogglePlaying();
30 virtual void Stop();
31 virtual void Rewind();
32 virtual void Forward();
33 virtual void SkipBackward();
34 virtual void SkipForward();
35 virtual void VolumeChanged(float value);
36 virtual void ToggleMute();
37 virtual void PositionChanged(float value);
39 private:
40 void AttachedToWindow();
41 void MessageReceived(BMessage* message);
42 void Draw(BRect updateRect);
44 // ControllerView
45 void _CheckSkippable();
47 private:
48 Controller* fController;
49 Playlist* fPlaylist;
50 PlaylistObserver* fPlaylistObserver;
53 #endif // __CONTROLLER_VIEW_H