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

Comparing trunk/Atom.cpp (file contents):
Revision 35 by douglas, 2004-07-21T20:43:31-07:00 vs.
Revision 46 by douglas, 2004-08-16T18:52:59-07:00

# Line 13 | Line 13 | Atom::Atom(const Buddy& buddy, const std
13          xml::ScopeElement feed(atom, "feed");
14  
15          atom.SetAttribute("version", "0.3");
16 +        atom.SetAttribute("xmlns", "http://purl.org/atom/ns#");
17          atom.OpenElement("title");
18          atom.SetAttribute("mode", "escaped");
19          atom.OutputText(ext::String(buddy) + "'s Away Messages");
20          atom.CloseElement();
21          atom.OpenElement("link");
22          atom.SetAttribute("rel", "alternate");
23 <        atom.SetAttribute("type", "text/html"); // XXX
24 <        atom.SetAttribute("href", "http://computers.douglasthrift.net/zoe.xml");
23 >        atom.SetAttribute("type", "text/html");
24 >        atom.SetAttribute("href", buddy.getLink());
25 >        atom.CloseElement();
26 >        atom.OpenElement("link");
27 >        atom.SetAttribute("rel", "alternate");
28 >        atom.SetAttribute("type", "application/rss+xml");
29 >        atom.SetAttribute("href", buddy.getRssLink());
30          atom.CloseElement();
31          atom.OpenElement("author");
32          atom.OpenElement("name");
# Line 29 | Line 35 | Atom::Atom(const Buddy& buddy, const std
35          atom.CloseElement();
36          atom.OpenElement("tagline");
37          atom.SetAttribute("mode", "escaped");
38 <        atom.OutputText(ext::String(buddy) + "'s AIM Away Messages from the past 30 days.");
38 >        atom.OutputText(ext::String(buddy) + "'s AIM Away Messages from the past 30"
39 >                " days.");
40          atom.CloseElement();
41          atom.OpenElement("generator");
42 <        atom.SetAttribute("url", "http://computers.douglasthrift.net/zoe.xml");
43 <        atom.SetAttribute("version", "0.9");
44 <        atom.OutputText(Zoe::generator());
42 >        atom.SetAttribute("url", Zoe::generator(Zoe::url));
43 >        atom.SetAttribute("version", Zoe::generator(Zoe::version));
44 >        atom.OutputText(Zoe::generator(Zoe::agent));
45          atom.CloseElement();
46 +        atom.OpenElement("modified");
47 +        atom.OutputText(stamp.getW3());
48 +        atom.CloseElement();
49 +
50 +        for (std::vector<AwayMessage>::const_iterator message(messages.begin());
51 +                message != messages.end(); ++message)
52 +        {
53 +                xml::ScopeElement entry(atom, "entry");
54 +
55 +                atom.OpenElement("title");
56 +                atom.CloseElement();
57 +                atom.OpenElement("link");
58 +                atom.SetAttribute("rel", "alternate");
59 +                atom.SetAttribute("type", "text/html");
60 +                atom.SetAttribute("href", message->getLink(buddy));
61 +                atom.CloseElement();
62 +                atom.OpenElement("id");
63 +                atom.OutputText(message->getTag(buddy));
64 +                atom.CloseElement();
65 +                atom.OpenElement("modified");
66 +                atom.OutputText(message->getStamp().getW3());
67 +                atom.CloseElement();
68 +                atom.OpenElement("issued");
69 +                atom.OutputText(message->getStamp().getW3());
70 +                atom.CloseElement();
71 +                atom.OpenElement("content");
72 +                atom.SetAttribute("type", "text/html");
73 +                atom.SetAttribute("mode", "escaped");
74 +                atom.OutputText(*message);
75 +                atom.CloseElement();
76 +        }
77   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines