2 * Copyright 2007-2009 Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
5 #ifndef PLAYLIST_OBSERVER_H
6 #define PLAYLIST_OBSERVER_H
8 #include "AbstractLOAdapter.h"
12 MSG_PLAYLIST_ITEM_ADDED
= 'plia',
13 MSG_PLAYLIST_ITEM_REMOVED
= 'plir',
14 MSG_PLAYLIST_ITEMS_SORTED
= 'plis',
15 MSG_PLAYLIST_CURRENT_ITEM_CHANGED
= 'plcc',
16 MSG_PLAYLIST_IMPORT_FAILED
= 'plif'
19 class PlaylistObserver
: public Playlist::Listener
, public AbstractLOAdapter
{
21 PlaylistObserver(BHandler
* target
);
22 virtual ~PlaylistObserver();
24 virtual void ItemAdded(PlaylistItem
* item
, int32 index
);
25 virtual void ItemRemoved(int32 index
);
27 virtual void ItemsSorted();
29 virtual void CurrentItemChanged(int32 newIndex
, bool play
);
31 virtual void ImportFailed();
34 #endif // PLAYLIST_OBSERVER_H