aboutsummaryrefslogtreecommitdiff
path: root/lib/service/servicefs.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-24 00:29:54 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-24 00:29:54 +0000
commit5ff227c657e02ebe2bc719faf4bd2231a04850c8 (patch)
tree8e7361161ee08db583147d47e2662b94219ed324 /lib/service/servicefs.cpp
parent3e9bd06034d9656d4346225e90e68a65327a4aa0 (diff)
downloadenigma2-5ff227c657e02ebe2bc719faf4bd2231a04850c8.tar.gz
enigma2-5ff227c657e02ebe2bc719faf4bd2231a04850c8.zip
add ability to copy providers or all services from satellites to favourites (this creates a new bouquet)
add ability to remove a complete bouquet both are just working with enabled multi bouquet mode
Diffstat (limited to 'lib/service/servicefs.cpp')
-rw-r--r--lib/service/servicefs.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/service/servicefs.cpp b/lib/service/servicefs.cpp
index a22b88d3..8254e63b 100644
--- a/lib/service/servicefs.cpp
+++ b/lib/service/servicefs.cpp
@@ -96,7 +96,7 @@ eServiceFS::~eServiceFS()
{
}
-RESULT eServiceFS::getContent(std::list<eServiceReference> &list)
+RESULT eServiceFS::getContent(std::list<eServiceReference> &list, bool sorted)
{
DIR *d=opendir(path.c_str());
if (!d)
@@ -141,6 +141,33 @@ RESULT eServiceFS::getContent(std::list<eServiceReference> &list)
}
}
closedir(d);
+
+ if (sorted)
+ list.sort(iListableServiceCompare(this));
+
+ return 0;
+}
+
+RESULT eServiceFS::getContent(PyObject *list, bool sorted)
+{
+ if (!list || !PyList_Check(list))
+ return -1;
+
+ std::list<eServiceReference> tmplist;
+
+ getContent(tmplist, sorted);
+
+ if (sorted)
+ tmplist.sort(iListableServiceCompare(this));
+
+ for (std::list<eServiceReference>::iterator it(tmplist.begin());
+ it != tmplist.end(); ++it)
+ {
+ PyObject *refobj = New_eServiceReference(*it);
+ PyList_Append(list, refobj);
+ Py_DECREF(refobj);
+ }
+
return 0;
}