| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2007 Maximilian Kossick <[email protected]> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
#ifndef AMAROK_CAPABILITY_H |
| 18 |
#define AMAROK_CAPABILITY_H |
| 19 |
|
| 20 |
#include "amarokcore_export.h" |
| 21 |
|
| 22 |
#include <QObject> |
| 23 |
|
| 24 |
namespace Capabilities |
| 25 |
{ |
| 26 |
/** The capabilities are used by several amarok objects to express add on functionality. |
| 27 |
Capabilities are used inside Amarok to implement a Java-like interface pattern. |
| 28 |
Several object (Collection, Track, Album) can return capability object. |
| 29 |
Since the implementation of these objects is in a library usually it would |
| 30 |
be otherwise difficult to implement something like this. |
| 31 |
|
| 32 |
Please note that the capability object will be created on demand and |
| 33 |
also destroyed. |
| 34 |
*/ |
| 35 |
class AMAROKCORE_EXPORT Capability : public QObject |
| 36 |
{ |
| 37 |
Q_OBJECT |
| 38 |
|
| 39 |
public: |
| 40 |
//add additional capabilities here |
| 41 |
enum Type { Unknown = 0 |
| 42 |
// not longer used |
| 43 |
// not longer used |
| 44 |
, Buyable = 3 |
| 45 |
, Actions = 4 |
| 46 |
, EditablePlaylist = 5 |
| 47 |
, MultiPlayable = 6 |
| 48 |
, Organisable = 7 |
| 49 |
, SourceInfo = 8 |
| 50 |
// not longer used |
| 51 |
, StreamInfo = 10 |
| 52 |
// not longer used |
| 53 |
// not longe used |
| 54 |
// not longer used |
| 55 |
, BookmarkThis = 14 |
| 56 |
, WriteTimecode = 15 |
| 57 |
, LoadTimecode = 16 |
| 58 |
, MultiSource = 17 |
| 59 |
, BoundedPlayback = 18 |
| 60 |
// not longer used |
| 61 |
, ReadLabel = 20 |
| 62 |
, WriteLabel = 21 |
| 63 |
, FindInSource = 22 |
| 64 |
, CollectionImport = 23 |
| 65 |
, CollectionScan = 24 |
| 66 |
, Transcode = 25 |
| 67 |
}; |
| 68 |
Q_ENUM( Type ) |
| 69 |
|
| 70 |
~Capability() override; |
| 71 |
|
| 72 |
}; |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
#endif |