summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mg_content.c17
-rw-r--r--mg_content.h23
-rw-r--r--mg_order.h17
-rw-r--r--mg_tools.h5
-rw-r--r--vdr_decoder.c1
-rw-r--r--vdr_setup.c7
-rw-r--r--vdr_setup.h5
7 files changed, 53 insertions, 22 deletions
diff --git a/mg_content.c b/mg_content.c
index 74b9fce..a87c5ed 100644
--- a/mg_content.c
+++ b/mg_content.c
@@ -71,6 +71,11 @@ string mgContentItem::getGenre () const
}
+long mgContentItem::getTrackid() const
+{
+ return m_trackid;
+}
+
string mgContentItem::getLanguage() const
{
return m_language;
@@ -88,6 +93,18 @@ string mgContentItem::getImageFile () const
}
+string mgContentItem::getArtist () const
+{
+ return m_artist;
+}
+
+
+string mgContentItem::getTitle () const
+{
+ return m_title;
+}
+
+
string mgContentItem::getAlbum () const
{
return m_albumtitle;
diff --git a/mg_content.h b/mg_content.h
index ee97745..4a64c29 100644
--- a/mg_content.h
+++ b/mg_content.h
@@ -34,33 +34,26 @@ class mgContentItem
public:
mgContentItem ();
+//! \brief returns the corresponding mgSelItem
mgSelItem* getKeyItem(mgKeyTypes kt);
- //! \brief copy constructor
+//! \brief copy constructor
mgContentItem(const mgContentItem* c);
- //! \brief construct an item from an SQL row
+//! \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;
- }
+ long getTrackid () const;
-//! \brief returns title
- string getTitle () const
- {
- return m_title;
- }
+//! \brief returns the track title
+ string getTitle () const;
//! \brief returns filename
string getSourceFile (bool AbsolutePath=true) const;
//! \brief returns artist
- string getArtist () const
- {
- return m_artist;
- }
+ string getArtist () const;
//! \brief returns the name of the album
string getAlbum () const;
diff --git a/mg_order.h b/mg_order.h
index 8bbaaa5..f9c2781 100644
--- a/mg_order.h
+++ b/mg_order.h
@@ -18,6 +18,7 @@ strlist& operator+=(strlist&a, strlist b);
//! \brief adds string n to string s, using string sep to separate them
string& addsep (string & s, string sep, string n);
+//! \brief all key types
enum mgKeyTypes {
keyGenre1=1, // the genre types must have exactly this order!
keyGenre2,
@@ -46,10 +47,12 @@ const mgKeyTypes mgKeyTypesLow = keyGenre1;
const mgKeyTypes mgKeyTypesHigh = keyCollectionItem;
const unsigned int mgKeyTypesNr = keyCollectionItem;
+//! \brief returns true if kt is one of the genre key types
bool iskeyGenre(mgKeyTypes kt);
class mgParts;
+//! \brief defines a foreign key
class mgReference {
public:
mgReference(string t1,string f1,string t2,string f2);
@@ -64,10 +67,12 @@ class mgReference {
string m_f2;
};
+//! \brief a list of all foreign keys
class mgReferences : public vector<mgReference> {
public:
- // \todo memory leak for vector ref?
+ //! \todo memory leak for vector ref?
mgReferences();
+ //! \brief returns the code needed to add a foreign key to the SQL statement
mgParts Connect(string c1, string c2) const;
private:
bool Equal(unsigned int i,string table1, string table2) const;
@@ -78,15 +83,25 @@ private:
class mgSelItem
{
public:
+ //! \brief constructs an invalid item
mgSelItem();
+ //! \brief constructs a valid item
mgSelItem(string v,string i,unsigned int c=0);
+ //! \brief sets the item values making the item valid
void set(string v,string i,unsigned int c=0);
+ //! \brief assignment operator
void operator=(const mgSelItem& from);
+ //! \brief assignment operator
void operator=(const mgSelItem* from);
+ //! \brief equal operator
bool operator==(const mgSelItem& other) const;
+ //! \brief the value of the item (user friendly)
string value() const { return m_value; }
+ //! \brief the id of the item (computer friendly)
string id() const { return m_id; }
+ //! \brief the number of tracks associated with this item
unsigned int count() const { return m_count; }
+ //! \brief true if the item is valid/set
bool valid() const { return m_valid; }
private:
bool m_valid;
diff --git a/mg_tools.h b/mg_tools.h
index 65ba262..821405d 100644
--- a/mg_tools.h
+++ b/mg_tools.h
@@ -84,6 +84,11 @@ class mgLog
std::string trim(std::string const& source, char const* delims = " \t\r\n");
+//! \brief extracts folder names from a filename
+// \param filename the full path
+// \param folders an array of char * where the single folders will be placed in
+// \param fcount the maximum number of folders that can be returned
+// \return a buffer hold all folder strings
char *SeparateFolders(const char *filename, char * folders[],unsigned int fcount);
#endif /* _MUGGLE_TOOLS_H */
diff --git a/vdr_decoder.c b/vdr_decoder.c
index eb6d3cc..7d6a318 100644
--- a/vdr_decoder.c
+++ b/vdr_decoder.c
@@ -21,7 +21,6 @@
#include <sys/stat.h>
#include <sys/vfs.h>
-#include "mg_selection.h"
#include <videodir.h>
#include <interface.h>
diff --git a/vdr_setup.c b/vdr_setup.c
index df10c0d..4282424 100644
--- a/vdr_setup.c
+++ b/vdr_setup.c
@@ -14,14 +14,15 @@
* (C) 2001,2002 Stefan Huelswitt <huels@iname.com>
*/
+#include "vdr_setup.h"
+#include "vdr_actions.h"
+#include "i18n.h"
+
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
-#include "vdr_setup.h"
-#include "vdr_actions.h"
-#include "i18n.h"
// --- mgMenuSetup -----------------------------------------------------------
diff --git a/vdr_setup.h b/vdr_setup.h
index 6a8ebdb..cab2ff8 100644
--- a/vdr_setup.h
+++ b/vdr_setup.h
@@ -17,12 +17,13 @@
#ifndef ___VDR_SETUP_MG_H
#define ___VDR_SETUP_MG_H
-// #include <osd.h>
-#include <menuitems.h>
#include <string>
#include "mg_setup.h"
+#include <menuitems.h>
+
+
/*!
* \brief allow user to modify setup on OSD
*/