aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playlistformat.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-12-22 10:46:29 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-12-22 10:46:29 +0000
commit954146ff9b69591f0cf3895e96922bb55ad88502 (patch)
treeb495690d6ed2a6b5251fd1e8a428b550354a0cba /src/qmmpui/playlistformat.h
parent2b286b3f3713a224839b9444579046556b608c58 (diff)
downloadqmmp-954146ff9b69591f0cf3895e96922bb55ad88502.tar.gz
qmmp-954146ff9b69591f0cf3895e96922bb55ad88502.tar.bz2
qmmp-954146ff9b69591f0cf3895e96922bb55ad88502.zip
playlist format api cleanup
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3088 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistformat.h')
-rw-r--r--src/qmmpui/playlistformat.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/qmmpui/playlistformat.h b/src/qmmpui/playlistformat.h
index 4c152d786..a2dd2ee10 100644
--- a/src/qmmpui/playlistformat.h
+++ b/src/qmmpui/playlistformat.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2009 by Ilya Kotov *
+ * Copyright (C) 2006-2012 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -24,6 +24,16 @@
class PlayListItem;
+/*! @brief Helper structure to store playlist format properies.
+ * @author Ilya Kotov <forkotov02@hotmail.ru>
+ */
+struct PlayListFormatProperties
+{
+ QString shortName; /*!< Unique name of the playlist format for internal usage */
+ QStringList filters; /*!< File filters (example: "*.m3u") */
+ QStringList contentTypes; /*!< Supported content types */
+};
+
/*! @brief Abstract interface for playlist formats.
* @author Vladimir Kuznetsov <vovanec@gmail.com>
*/
@@ -33,10 +43,11 @@ public:
/*!
* Object destructor
*/
- virtual ~PlayListFormat()
- {
- ;
- }
+ virtual ~PlayListFormat() {}
+ /*!
+ * Returns playlist format properties.
+ */
+ virtual const PlayListFormatProperties properties() const = 0;
/*!
* Takes raw contents of playlist file, should return string list of
* ready file pathes to fill the playlist.
@@ -47,18 +58,6 @@ public:
* encoded playlist file
*/
virtual QString encode(const QList<PlayListItem*>& contents) = 0;
- /*!
- * Returns list of file extensions that current format supports
- */
- virtual QStringList getExtensions()const = 0;
- /*!
- * Verifies is the \b ext file extension supported by current playlist format.
- */
- virtual bool hasFormat(const QString& ext) = 0;
- /*!
- * Unique name of playlist format.
- */
- virtual QString name() const = 0;
};
Q_DECLARE_INTERFACE(PlayListFormat,"PlayListFormatInterface/1.0")