4 |
|
// |
5 |
|
// $Id$ |
6 |
|
|
7 |
– |
#include "Zoe.hpp" |
7 |
|
#include "Matcher.hpp" |
8 |
+ |
#include "Buddy.hpp" |
9 |
|
|
10 |
|
int main(int argc, char* argv[]) |
11 |
|
{ |
37 |
|
return 0; |
38 |
|
} |
39 |
|
|
40 |
< |
Zoe::Zoe() : rss("zoe.rss") |
40 |
> |
Zoe::Zoe() |
41 |
|
{ |
42 |
|
configure(); |
43 |
|
|
44 |
|
// This is just to figure out Jay's XML output, seems to have worked! |
45 |
|
// It should really go in Rss.cpp later |
46 |
< |
api::FileOutputStream fout(this->rss != "-" ? this->rss : "/dev/null"); |
46 |
> |
/* api::FileOutputStream fout(this->rss != "-" ? this->rss : "/dev/null"); |
47 |
|
xml::TextWriter rss(this->rss != "-" ? fout : api::Cout.GetStream()); |
48 |
|
xml::ScopeElement root(rss, "rss"); |
49 |
|
|
56 |
|
rss.CloseElement(); |
57 |
|
rss.OpenElement("link"); |
58 |
|
rss.OutputText("http://computers.douglasthrift.net/zoe.xml"); |
59 |
< |
rss.CloseElement(); |
59 |
> |
rss.CloseElement();*/ |
60 |
|
} |
61 |
|
|
62 |
|
bool Zoe::debug(false); |
67 |
|
ext::Handle<xml::Document> document(xml::Parse(config)); |
68 |
|
ext::Handle<xml::Node> zoe(*document/"zoe"); |
69 |
|
|
70 |
< |
login = *zoe/"login"; |
71 |
< |
password = *zoe/"password"; |
70 |
> |
login = std::string(*zoe/"login"); |
71 |
> |
password = std::string(*zoe/"password"); |
72 |
> |
|
73 |
> |
xml::NodeSet buddies(*zoe/"buddy"); |
74 |
|
|
75 |
< |
if (!(*zoe/"rss").IsEmpty()) rss = *zoe/"rss"; |
75 |
> |
for (xml::NodeSet::Iterator buddy(buddies.Begin()); buddy != buddies.End(); |
76 |
> |
++buddy) |
77 |
> |
{ |
78 |
> |
this->buddies.insert(Buddy(**buddy/"login", **buddy/"rss")); |
79 |
> |
} |
80 |
|
} |