btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / mediaplayer / ControllerObserver.h
blob7c6028e183552706176af6e06e2850f975aec0c1
1 /*
2 * Copyright 2007-2009, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
8 #ifndef CONTROLLER_OBSERVER_H
9 #define CONTROLLER_OBSERVER_H
12 #include "AbstractLOAdapter.h"
13 #include "Controller.h"
16 enum {
17 MSG_CONTROLLER_FILE_FINISHED = 'cnff',
18 MSG_CONTROLLER_FILE_CHANGED = 'cnfc',
20 MSG_CONTROLLER_VIDEO_TRACK_CHANGED = 'cnvt',
21 MSG_CONTROLLER_AUDIO_TRACK_CHANGED = 'cnat',
22 MSG_CONTROLLER_SUB_TITLE_TRACK_CHANGED = 'cnst',
24 MSG_CONTROLLER_VIDEO_STATS_CHANGED = 'cnvs',
25 MSG_CONTROLLER_AUDIO_STATS_CHANGED = 'cnas',
27 MSG_CONTROLLER_PLAYBACK_STATE_CHANGED = 'cnps',
28 MSG_CONTROLLER_POSITION_CHANGED = 'cnpc',
29 MSG_CONTROLLER_SEEK_HANDLED = 'cnsh',
30 MSG_CONTROLLER_VOLUME_CHANGED = 'cnvc',
31 MSG_CONTROLLER_MUTED_CHANGED = 'cnmc'
34 enum {
35 OBSERVE_FILE_CHANGES = 0x0001,
36 OBSERVE_TRACK_CHANGES = 0x0002,
37 OBSERVE_STAT_CHANGES = 0x0004,
38 OBSERVE_PLAYBACK_STATE_CHANGES = 0x0008,
39 OBSERVE_POSITION_CHANGES = 0x0010,
40 OBSERVE_VOLUME_CHANGES = 0x0020,
42 OBSERVE_ALL_CHANGES = 0xffff
46 class ControllerObserver
47 : public Controller::Listener, public AbstractLOAdapter {
48 public:
49 ControllerObserver(BHandler* target,
50 uint32 observeFlags = OBSERVE_ALL_CHANGES);
51 virtual ~ControllerObserver();
53 // Controller::Listener interface
54 virtual void FileFinished();
55 virtual void FileChanged(PlaylistItem* item, status_t result);
57 virtual void VideoTrackChanged(int32 index);
58 virtual void AudioTrackChanged(int32 index);
59 virtual void SubTitleTrackChanged(int32 index);
61 virtual void VideoStatsChanged();
62 virtual void AudioStatsChanged();
64 virtual void PlaybackStateChanged(uint32 state);
65 virtual void PositionChanged(float position);
66 virtual void SeekHandled(int64 seekFrame);
67 virtual void VolumeChanged(float volume);
68 virtual void MutedChanged(bool muted);
70 private:
71 uint32 fObserveFlags;
74 #endif // CONTROLLER_OBSERVER_H