repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / mediaplayer / playlist / PlaylistObserver.h
blob7a2d3bf642bdfc9a823ea4b9e4504d3e3be34399
1 /*
2 * Copyright 2007-2009 Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef PLAYLIST_OBSERVER_H
6 #define PLAYLIST_OBSERVER_H
8 #include "AbstractLOAdapter.h"
9 #include "Playlist.h"
11 enum {
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 {
20 public:
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