summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-09-11 12:07:54 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-09-11 12:07:54 +0000
commit0281b129e7bdde83400eaa9cb26d5dbe0635591a (patch)
treeaad2280f0da2905c85e2958744cbb22b9989418e
parentc69242aac5f4d5b3f5c9cf2dae4f519ec3787cae (diff)
downloadvdr-plugin-muggle-0281b129e7bdde83400eaa9cb26d5dbe0635591a.tar.gz
vdr-plugin-muggle-0281b129e7bdde83400eaa9cb26d5dbe0635591a.tar.bz2
Documentation added
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@154 e10066b5-e1e2-0310-b819-94efdf66514b
-rwxr-xr-xmg_content_interface.c8
-rw-r--r--mg_media.c32
-rw-r--r--mg_media.h69
-rw-r--r--vdr_menu.c25
-rw-r--r--vdr_menu.h8
5 files changed, 72 insertions, 70 deletions
diff --git a/mg_content_interface.c b/mg_content_interface.c
index 5c4890b..65a564f 100755
--- a/mg_content_interface.c
+++ b/mg_content_interface.c
@@ -55,20 +55,16 @@ mgTracklist::~mgTracklist()
}
/*!
- *****************************************************************************
* \brief returns a pointer to the list of elements
- *
- ****************************************************************************/
+ */
vector<mgContentItem*> *mgTracklist::getAll()
{
return &m_list;
}
/*!
- *****************************************************************************
* \brief returns the number of elements in the list
- *
- ****************************************************************************/
+ */
unsigned int mgTracklist::getNumItems()
{
return m_list.size();
diff --git a/mg_media.c b/mg_media.c
index 96dc3f7..6cf5339 100644
--- a/mg_media.c
+++ b/mg_media.c
@@ -2,9 +2,9 @@
* \brief Top level access to media in vdr plugin muggle
*
* \version $Revision: 1.14 $
- * \date $Date: 2004/07/29 06:17:40 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author Responsible author: $Author: lvw $
+ * \author Responsible author: $Author$
*/
/* makes sure we dont parse the same declarations twice */
@@ -173,7 +173,7 @@ mgMedia::mgMedia(contentType mediatype)
case GD_MP3:
{
errval = GdInitDatabase(&m_db);
- mgDebug(3, "Successfully conntected to sql database %s", the_setup.DbName );
+ mgDebug(3, "Successfully connected to sql database %s", the_setup.DbName );
}
}
if(errval < 0)
@@ -192,10 +192,6 @@ mgMedia::mgMedia(contentType mediatype)
}
}
-/*!
- *******************************************************************
- * \brief
- ********************************************************************/
mgMedia::~mgMedia()
{
if( m_filters )
@@ -204,10 +200,6 @@ mgMedia::~mgMedia()
}
}
-/*!
- *******************************************************************
- * \brief
- ********************************************************************/
string mgMedia::getMediaTypeName()
{
switch(m_mediatype)
@@ -221,11 +213,6 @@ string mgMedia::getMediaTypeName()
return "";
}
-
-/*!
- *******************************************************************
- * \brief
- ********************************************************************/
mgSelectionTreeNode* mgMedia::getSelectionRoot()
{
switch(m_mediatype)
@@ -237,21 +224,12 @@ mgSelectionTreeNode* mgMedia::getSelectionRoot()
return NULL;
}
-
-/*!
- *******************************************************************
- * \brief
- ********************************************************************/
mgPlaylist* mgMedia::createTemporaryPlaylist()
{
string tmpname = "current";
return loadPlaylist( tmpname );
}
-/*!
- * \brief Load a playlist from the database
- *
- */
mgPlaylist* mgMedia::loadPlaylist(string name)
{
mgPlaylist *list;
@@ -259,9 +237,9 @@ mgPlaylist* mgMedia::loadPlaylist(string name)
{
case GD_MP3:
{
- list = new GdPlaylist(name, m_db);
+ list = new GdPlaylist( name, m_db );
list->setDisplayColumns(getDefaultCols());
-
+
return list;
} break;
}
diff --git a/mg_media.h b/mg_media.h
index 394db13..90a43f2 100644
--- a/mg_media.h
+++ b/mg_media.h
@@ -3,9 +3,9 @@
* \brief Top level access to media in vdr plugin muggle
*
* \version $Revision: 1.11 $
- * \date $Date: 2004/05/28 15:29:18 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author Responsible author: $Author: lvw $
+ * \author Responsible author: $Author$
*/
// makes sure we dont use parse the same declarations twice
@@ -41,39 +41,66 @@ class mgFilterSets
std::vector<std::string> m_titles;
public:
- // constructor, constracts a number >=1 of filter sets
- // the first set (index 0 ) is active by default
+
+ /*!
+ * \brief a constructor
+ *
+ * constracts a number >=1 of filter sets the first set (index 0 ) is active by default
+ */
mgFilterSets();
- // destructor
+ /*!
+ * \brief the destructor
+ */
virtual ~mgFilterSets();
- // returns the number of available sets
+ /*!
+ * \brief returns the number of available sets
+ */
int numSets();
- // proceeds to the next one in a circular fashion
+ /*!
+ * \brief proceeds to the next one in a circular fashion
+ */
void nextSet();
- // activates a specific set by index
+ /*!
+ * \brief activates a specific set by index
+ */
void select(int n);
- // restores the default values for all filter values in the active set
- // normally, the default values represent 'no restrictions'
+ /*!
+ * \brief restore empty state
+ *
+ * Restores the default values for all filter values in the active set
+ * normally, the default values represent 'no restrictions'
+ */
virtual void clear();
- // stores the current filter values
+ /*!
+ * \brief stores the current filter values
+ */
void accept();
- // returns the active set to the application
- // the application may temporarily modify the filter values
- // accept() needs to be called to memorize the changed values
+ /*!
+ * \brief returns the active set to the application
+ *
+ * The application may temporarily modify the filter values
+ * accept() needs to be called to memorize the changed values
+ */
std::vector<mgFilter*> *getFilters();
- // computes the (e.g. sql-) restrictions specified by the active filter set
- // and returns the index of the appropriate defualt view in viewPrt
- virtual std::string computeRestriction(int *viewPrt)=0;
-
- // returns title of active filter set
+ /*!
+ * \brief compute restrictions
+ *
+ * computes the (e.g. sql-) restrictions specified by the active filter set
+ * and returns the index of the appropriate defualt view in viewPrt
+ */
+ virtual std::string computeRestriction(int *viewPrt) = 0;
+
+ /*!
+ * \brief returns title of active filter set
+ */
std::string getTitle();
};
@@ -112,10 +139,12 @@ class mgMedia
mgSelectionTreeNode* getSelectionRoot();
- // playlist management
+ /*! \brief playlist management */
+ //@{
mgPlaylist* createTemporaryPlaylist();
mgPlaylist* loadPlaylist( std::string name );
std::vector<std::string> *getStoredPlaylists();
+ //@}
std::vector<int> getDefaultCols();
mgTracklist* getTracks();
diff --git a/vdr_menu.c b/vdr_menu.c
index fd02c11..54a9318 100644
--- a/vdr_menu.c
+++ b/vdr_menu.c
@@ -3,11 +3,11 @@
* \brief Implements menu handling for browsing media libraries within VDR
*
* \version $Revision: 1.27 $
- * \date $Date: 2004/07/27 20:50:54 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author Responsible author: $Author: lvw $
+ * \author Responsible author: $Author$
*
- * $Id: vdr_menu.c,v 1.27 2004/07/27 20:50:54 lvw Exp $
+ * $Id$
*/
#include <string>
@@ -324,6 +324,8 @@ eOSState mgMainMenu::ProcessKey(eKeys key)
// load the selected playlist
m_current_playlist -> clear();
+ delete m_current_playlist;
+
string selected = (*m_plists)[ Current() ];
m_current_playlist = m_media->loadPlaylist( selected.c_str() );
@@ -523,8 +525,6 @@ void mgMainMenu::DisplayTreeSubmenu()
// Add items
Add( new cOsdItem( "1 - Instant play" ) );
- Add( new cOsdItem( "9 - Test9" ) );
- Add( new cOsdItem( "0 - Test0" ) );
Display();
}
@@ -575,7 +575,6 @@ eOSState mgMainMenu::TreeSubmenuAction( int n )
void mgMainMenu::DisplayPlaylist( int index_current )
{
- mgDebug( 1, "mgMainMenu::DisplayPlaylist: entering." );
m_state = PLAYLIST;
// make sure we have a current playlist
@@ -656,16 +655,16 @@ void mgMainMenu::DisplayPlaylistSubmenu()
SetTitle( "Muggle - Playlist View Commands" );
// Add items
- Add( new cOsdItem( "1 - Load playlist" ) );
- Add( new cOsdItem( "2 - Save playlist" ) );
- Add( new cOsdItem( "3 - Rename playlist" ) );
- Add( new cOsdItem( "4 - Clear playlist" ) );
- Add( new cOsdItem( "5 - Remove entry from list" ) );
- Add( new cOsdItem( "6 - Export playlist" ) );
+ Add( new cOsdItem( "Load playlist" ) );
+ Add( new cOsdItem( "Save playlist" ) );
+ Add( new cOsdItem( "Rename playlist" ) );
+ Add( new cOsdItem( "Clear playlist" ) );
+ Add( new cOsdItem( "Remove entry from list" ) );
+ Add( new cOsdItem( "Export playlist" ) );
if( m_playlist_commands )
{
- Add( new cOsdItem( "7 - External playlist commands" ) );
+ Add( new cOsdItem( "External playlist commands" ) );
}
Display();
diff --git a/vdr_menu.h b/vdr_menu.h
index 5ff7f34..e827a33 100644
--- a/vdr_menu.h
+++ b/vdr_menu.h
@@ -3,11 +3,11 @@
* \brief Implements menu handling for broswing media libraries within VDR
*
* \version $Revision: 1.13 $
- * \date $Date: 2004/07/25 21:33:35 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author Responsible author: $Author: lvw $
+ * \author Responsible author: $Author$
*
- * $Id: vdr_menu.h,v 1.13 2004/07/25 21:33:35 lvw Exp $
+ * $Id$
*/
#ifndef _VDR_MENU_H
@@ -107,7 +107,7 @@ class mgMainMenu : public cOsdMenu
mgSelectionTreeNode *m_root;
mgSelectionTreeNode *m_node;
mgPlaylist *m_current_playlist;
- std::vector<std::string> *m_plists;
+ std::vector<std::string> *m_plists;
MuggleStatus m_state;
std::list<int> m_history;