summaryrefslogtreecommitdiff
path: root/muggle-plugin/mg_content.h
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-22 06:47:53 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-22 06:47:53 +0000
commite2de0c5ed7bbbe4b236246e8bfd71cc87c8d974f (patch)
tree616f2f0a482597e3968e281ccf8adcfd04f45bbc /muggle-plugin/mg_content.h
parent101360901576c7e91196de60e2e6ebd6a4b145dd (diff)
downloadvdr-plugin-muggle-0.1.6-BETA.tar.gz
vdr-plugin-muggle-0.1.6-BETA.tar.bz2
Added 0.1.6 beta tag0.1.6-BETA
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/tags/0.1.6-BETA@586 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/mg_content.h')
-rw-r--r--muggle-plugin/mg_content.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/muggle-plugin/mg_content.h b/muggle-plugin/mg_content.h
new file mode 100644
index 0000000..ee97745
--- /dev/null
+++ b/muggle-plugin/mg_content.h
@@ -0,0 +1,115 @@
+/*!
+ * \file mg_selection.h
+ * \brief A general interface to data items, currently only GiantDisc
+ *
+ * \version $Revision: 1.0 $
+ * \date $Date: 2004-12-07 10:10:35 +0200 (Tue, 07 Dec 2004) $
+ * \author Wolfgang Rohdewald
+ * \author Responsible author: $Author: wr $
+ *
+ */
+
+#ifndef _MG_CONTENT_H
+#define _MG_CONTENT_H
+#include <stdlib.h>
+#include <mysql/mysql.h>
+#include <string>
+#include <list>
+#include <vector>
+#include <map>
+using namespace std;
+
+#include "mg_tools.h"
+#include "mg_valmap.h"
+#include "mg_order.h"
+
+typedef vector<string> strvector;
+
+
+class mgSelection;
+
+//! \brief represents a content item like an mp3 file.
+class mgContentItem
+{
+ public:
+ mgContentItem ();
+
+ mgSelItem* getKeyItem(mgKeyTypes kt);
+
+ //! \brief copy constructor
+ mgContentItem(const mgContentItem* c);
+
+ //! \brief construct an item from an SQL row
+ mgContentItem (const mgSelection* sel, const MYSQL_ROW row);
+//! \brief returns track id
+ long getTrackid () const
+ {
+ return m_trackid;
+ }
+
+//! \brief returns title
+ string getTitle () const
+ {
+ return m_title;
+ }
+
+//! \brief returns filename
+ string getSourceFile (bool AbsolutePath=true) const;
+
+//! \brief returns artist
+ string getArtist () const
+ {
+ return m_artist;
+ }
+
+//! \brief returns the name of the album
+ string getAlbum () const;
+
+//! \brief returns the name of genre
+ string getGenre () const;
+
+//! \brief returns the name of the language
+ string getLanguage () const;
+
+//! \brief returns the bitrate
+ string getBitrate () const;
+
+//! \brief returns the file name of the album image
+ string getImageFile () const;
+
+//! \brief returns year
+ int getYear () const;
+
+//! \brief returns rating
+ int getRating () const;
+
+//! \brief returns duration
+ int getDuration () const;
+
+//! \brief returns samplerate
+ int getSampleRate () const;
+
+//! \brief returns # of channels
+ int getChannels () const;
+
+ private:
+ long m_trackid;
+ string m_title;
+ string m_mp3file;
+ string m_artist;
+ string m_albumtitle;
+ string m_genre1_id;
+ string m_genre2_id;
+ string m_genre1;
+ string m_genre2;
+ string m_bitrate;
+ string m_language_id;
+ string m_language;
+ int m_year;
+ int m_rating;
+ int m_duration;
+ int m_samplerate;
+ int m_channels;
+};
+
+#endif