diff options
Diffstat (limited to 'muggle-plugin/mg_content_interface.c')
| -rwxr-xr-x | muggle-plugin/mg_content_interface.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/muggle-plugin/mg_content_interface.c b/muggle-plugin/mg_content_interface.c index defa0ac..d017997 100755 --- a/muggle-plugin/mg_content_interface.c +++ b/muggle-plugin/mg_content_interface.c @@ -9,7 +9,6 @@ * Implements main classes of for content items and abstract interfaces to media access * * This file implements the following classes - * - mgContentItem * - mgTracklist * - mgSelectionTreeNode */ @@ -51,6 +50,19 @@ unsigned int mgTracklist::getNumItems() return m_list.size(); } +unsigned long mgTracklist::getLength() +{ + unsigned long result = 0; + std::vector<mgContentItem*>::iterator iter; + + for( iter = m_list.begin(); iter != m_list.end (); iter++ ) + { + result += (*iter)->getLength(); + } + + return result; +} + void mgTracklist::shuffle() { random_shuffle( m_list.begin(), m_list.end () ); |
