3
// Copyright (C) 2000, 2001 Neil Stevens <multivac@fcmail.com>
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
12
// The above copyright notice and this permission notice shall be included in
13
// all copies or substantial portions of the Software.
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19
// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
// Except as contained in this notice, the name(s) of the author(s) shall not be
23
// used in advertising or otherwise to promote the sale, use or other dealings
24
// in this Software without prior written authorization from the author(s).
29
#include <kio/global.h>
33
#include "noatunplaylist.h"
42
class MCP : public Playlist
47
MCP(QObject *parent, const char *name = 0);
50
virtual void reset(void);
51
virtual void clear(void);
53
void play(PlaylistItem *);
54
virtual PlaylistItem *next(void);
55
virtual PlaylistItem *current(void);
56
virtual PlaylistItem *previous(void);
58
virtual PlaylistItem *getFirst(void) const;
59
virtual PlaylistItem *getAfter(const PlaylistItem *) const;
60
PlaylistItem *getBefore(const PlaylistItem *) const;
62
void moveAfter(PlaylistItem *item, PlaylistItem *afterThisOne);
64
virtual void addFile(const KURL &, bool = false);
65
PlaylistItem *addFile(const KURL &, PlaylistItem *);
66
PlaylistItem *addDirectory(const KURL & , PlaylistItem * = 0);
67
PlaylistItem *importWindowsPlaylist(const KURL &, PlaylistItem * = 0);
68
PlaylistItem *importPlaylist(const KURL &, PlaylistItem * = 0);
70
virtual bool listVisible(void) const;
72
void setShuffle(bool);
73
void setApplyVolume(bool);
78
* To be used by MCPItem only
80
void itemModified(PlaylistItem *);
83
virtual void showList(void);
84
virtual void hideList(void);
85
virtual void toggleList(void);
86
virtual void remove(PlaylistItem *);
88
void load(const KURL &, bool errorFree = false);
89
void save(const KURL &);
95
void modified(PlaylistItem *);
96
void removed(PlaylistItem *);
97
void moved(PlaylistItem *item, PlaylistItem *afterThis);
100
* This is emitted when the current playlist item is set or changed
102
void current(PlaylistItem *);
105
void setVolume(PlaylistItem *);
108
void listFinished(KIO::Job *);
109
void listEntries(KIO::Job *, const KIO::UDSEntryList &);
111
PlaylistItem *listLastAdded;
114
static const MCPItem *AtBottom;
116
void clearInternal(void);
117
MCPItem *addFileG(const KURL &_url, bool _play = false, MCPItem *_afterThis = const_cast<MCPItem *>(AtBottom));
123
QList<MCPItem> shuffleUnused;