diff options
author | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-22 08:07:59 +0000 |
---|---|---|
committer | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-22 08:07:59 +0000 |
commit | 6f968c8997348410c1adb259e6ea0f6a14f3f083 (patch) | |
tree | e2208de212231b6a959b979441da106bbfdb8b49 | |
parent | 1ab4f0336fbde0a5395b344b5b7b2ca763698004 (diff) | |
download | vdr-plugin-muggle-release/0.1.5-wr.tar.gz vdr-plugin-muggle-release/0.1.5-wr.tar.bz2 |
fix compilation for 2.95release/0.1.5-wr
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.5-wr@588 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | mg_content.c | 17 | ||||
-rw-r--r-- | mg_content.h | 23 | ||||
-rw-r--r-- | mg_order.h | 17 | ||||
-rw-r--r-- | mg_tools.h | 5 | ||||
-rw-r--r-- | vdr_decoder.c | 1 | ||||
-rw-r--r-- | vdr_setup.c | 7 | ||||
-rw-r--r-- | vdr_setup.h | 5 |
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; @@ -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; @@ -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 */ |