ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Zoe.cpp
(Generate patch)

Comparing trunk/Zoe.cpp (file contents):
Revision 11 by douglas, 2004-07-10T22:30:54-07:00 vs.
Revision 12 by douglas, 2004-07-11T20:45:38-07:00

# Line 4 | Line 4
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   {
# Line 37 | Line 37 | int main(int argc, char* argv[])
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  
# Line 56 | Line 56 | Zoe::Zoe() : rss("zoe.rss")
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);
# Line 67 | Line 67 | void Zoe::configure()
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines