diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Library/ml_downloads/AtomParse.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Plugins/Library/ml_downloads/AtomParse.h')
-rw-r--r-- | Src/Plugins/Library/ml_downloads/AtomParse.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Src/Plugins/Library/ml_downloads/AtomParse.h b/Src/Plugins/Library/ml_downloads/AtomParse.h new file mode 100644 index 00000000..ab76a1f9 --- /dev/null +++ b/Src/Plugins/Library/ml_downloads/AtomParse.h @@ -0,0 +1,51 @@ +#ifndef NULLSOFT_ATOMPARSEH +#define NULLSOFT_ATOMPARSEH +#if 0 +#include "RFCDate.h" +#include "XMLNode.h" +#include "Feeds.h" +#include "../nu/AutoChar.h" +#include "ChannelSync.h" + +void ReadAtomItem(XMLNode *item, Channel &channel) +{ +} + +void ReadAtomChannel(XMLNode *node, Channel &newChannel) +{ + XMLNode *curNode = 0; + curNode = node->Get(L"title"); + if (curNode) + newChanneltitle = curNode->content; + + curNode = node->Get(L"subtitle"); + if (curNode) + newChannel.description = curNode->content; + + XMLNode::NodeList &links = node->GetList(L"link"); + XMLNode::NodeList::iterator linkItr; + for (linkItr=links.begin();linkItr!=links.end();linkItr++) + { + if ((*linkItr)->properties[L"rel"].empty() + || (*linkItr)->properties[L"rel"]== L"alternate") + newChannel.link = (*linkItr)->properties[L"href"]; + } + + XMLNode::NodeList &entries = node->GetList(L"entry"); + XMLNode::NodeList::iterator entryItr; + for (entryItr=entries.begin();entryItr!=entries.end();entryItr++) + { + } +} + +void ReadAtom(XMLNode *atom, ChannelSync *sync) +{ + sync->BeginChannelSync(); + Channel newChannel; + ReadAtomChannel(atom, newChannel); + sync->NewChannel(newChannel); + + sync->EndChannelSync(); +} +#endif +#endif
\ No newline at end of file |