diff options
author | thlo <smarttv640@gmail.com> | 2013-04-21 16:20:52 +0200 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-04-21 16:20:52 +0200 |
commit | 037e0f4ecf781aa8a5819ec036d3cfbb852768a7 (patch) | |
tree | 97d66165ef8bde60e9008026222742f2447d465a /mngurls.c | |
parent | 02b651b454c16fc6af688c90839543db2e5e518d (diff) | |
download | vdr-plugin-smarttvweb-037e0f4ecf781aa8a5819ec036d3cfbb852768a7.tar.gz vdr-plugin-smarttvweb-037e0f4ecf781aa8a5819ec036d3cfbb852768a7.tar.bz2 |
Plugin code refactoring.
Diffstat (limited to 'mngurls.c')
-rw-r--r-- | mngurls.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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(); } |