ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Publisher.cpp
Revision: 25
Committed: 2004-07-17T16:29:02-07:00 (20 years, 11 months ago) by douglas
File size: 902 byte(s)
Log Message:
RSS 2.0, baby!

File Contents

# Content
1 // Zoe AIM Away Message RSS Feed Generator
2 //
3 // Seth King and Douglas Thrift
4 //
5 // $Id$
6
7 #include "Publisher.hpp"
8 #include "Rss.hpp"
9
10 Publisher::Publisher(const std::set<Buddy>& buddies, const Database& database,
11 bool start) : buddies(buddies), database(database), start(start)
12 {
13 if (start)
14 {
15 publisher.Spawn(etl::Bind<0>(&Publisher::publish, this));
16 }
17 }
18
19 int Publisher::publish()
20 {
21 cerr << bright << green << "Publisher::publish()\n" << reset;
22
23 // publish
24
25 Buddy buddy(*buddies.find(ext::String("douglaswth")));
26 std::vector<AwayMessage> messages;
27
28 messages.push_back(AwayMessage("<font size=3>Ice Cream!</font> :-D",
29 ext::String("Sat, 17 Jul 2004 20:45:32 GMT")));
30 messages.push_back(AwayMessage(ext::String("<font size=3>Apparently, I hav")
31 + "e left my computer, isn't that strange?</font> :-P", ext::String('S')
32 + "at, 17 Jul 2004 21:39:13 GMT"));
33
34 Rss rss(buddy, messages);
35 }

Properties

Name Value
svn:eol-style native
svn:keywords Id