1
/* This file is part of the KDE Project
2
Copyright (c) 2004 K�vin Ottens <ervin ipsquad net>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
26
class MediaList : public QObject
33
// FIXME: should be <const Medium> or something similar...
34
const QPtrList<Medium> list() const;
35
const Medium *findById(const QString &id) const;
36
const Medium *findByName(const QString &name) const;
39
QString addMedium(Medium *medium, bool allowNotification = true);
40
bool removeMedium(const QString &id, bool allowNotification = true);
42
bool changeMediumState(const Medium &medium, bool allowNotification);
43
bool changeMediumState(const QString &id,
44
const QString &baseURL,
45
bool allowNotification = true,
46
const QString &mimeType = QString::null,
47
const QString &iconName = QString::null,
48
const QString &label = QString::null);
49
bool changeMediumState(const QString &id,
50
const QString &deviceNode,
51
const QString &mountPoint,
52
const QString &fsType, bool mounted,
53
bool allowNotification = true,
54
const QString &mimeType = QString::null,
55
const QString &iconName = QString::null,
56
const QString &label = QString::null);
57
bool changeMediumState(const QString &id, bool mounted,
58
bool allowNotification = true,
59
const QString &mimeType = QString::null,
60
const QString &iconName = QString::null,
61
const QString &label = QString::null);
63
bool setUserLabel(const QString &name, const QString &label);
66
void mediumAdded(const QString &id, const QString &name,
67
bool allowNotification);
68
void mediumRemoved(const QString &id, const QString &name,
69
bool allowNotification);
70
void mediumStateChanged(const QString &id, const QString &name,
71
bool mounted, bool allowNotification);
74
QPtrList<Medium> m_media;
75
QMap<QString,Medium*> m_nameMap;
76
QMap<QString,Medium*> m_idMap;