1 /* 2 * Copyright 2007, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 #ifndef PLAYLIST_OBSERVER_H 9 #define PLAYLIST_OBSERVER_H 10 11 #include "AbstractLOAdapter.h" 12 #include "Playlist.h" 13 14 enum { 15 MSG_PLAYLIST_REF_ADDED = 'plra', 16 MSG_PLAYLIST_REF_REMOVED = 'plrr', 17 MSG_PLAYLIST_REFS_SORTED = 'plrs', 18 MSG_PLAYLIST_CURRENT_REF_CHANGED = 'plcc' 19 }; 20 21 class PlaylistObserver : public Playlist::Listener, 22 public AbstractLOAdapter { 23 public: 24 PlaylistObserver(BHandler* target); 25 virtual ~PlaylistObserver(); 26 27 virtual void RefAdded(const entry_ref& ref, int32 index); 28 virtual void RefRemoved(int32 index); 29 30 virtual void RefsSorted(); 31 32 virtual void CurrentRefChanged(int32 newIndex); 33 }; 34 35 #endif // PLAYLIST_OBSERVER_H 36