summaryrefslogtreecommitdiff
path: root/mngurls.c
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-04-21 16:20:52 +0200
committerthlo <t.lohmar@gmx.de>2013-04-21 16:20:52 +0200
commit037e0f4ecf781aa8a5819ec036d3cfbb852768a7 (patch)
tree97d66165ef8bde60e9008026222742f2447d465a /mngurls.c
parent02b651b454c16fc6af688c90839543db2e5e518d (diff)
downloadvdr-plugin-smarttvweb-037e0f4ecf781aa8a5819ec036d3cfbb852768a7.tar.gz
vdr-plugin-smarttvweb-037e0f4ecf781aa8a5819ec036d3cfbb852768a7.tar.bz2
Plugin code refactoring.
Diffstat (limited to 'mngurls.c')
-rw-r--r--mngurls.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mngurls.c b/mngurls.c
index e9f18d0..dabcfe7 100644
--- a/mngurls.c
+++ b/mngurls.c
@@ -39,6 +39,7 @@ cManageUrls::~cManageUrls() {
//TODO: delete entries
};
+
//called from outside to add an entry
void cManageUrls::appendEntry(string type, string url) {
// iter through entries
@@ -61,6 +62,27 @@ void cManageUrls::appendEntry(string type, string url) {
}
}
+
+void cManageUrls::deleteEntry(string type, string url) {
+ *(mLog->log()) << " cManageUrls::deleteEntry: type= " << type << "guid= " << url << endl;
+
+ bool found = false;
+ if (type.compare("YT") !=0) {
+ return;
+ }
+ for (int i = 0; i < mEntries.size(); i ++) {
+ if (url.compare(mEntries[i]->mEntry) == 0) {
+ // delete the entry here
+ *(mLog->log()) << " cManageUrls::deleteEntry ... " << endl;
+ found = true;
+ break;
+ }
+ }
+
+}
+
+
+
size_t cManageUrls::size() {
return mEntries.size();
}