ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Zoe.hpp
Revision: 43
Committed: 2004-08-15T21:33:25-07:00 (20 years, 10 months ago) by douglas
File size: 1724 byte(s)
Log Message:
Let cron handle timing!

File Contents

# Content
1 // Zoe AIM Away Message RSS Feed Generator
2 //
3 // Seth King and Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Zoe_hpp_
8 #define _Zoe_hpp_
9
10 #include <iostream>
11
12 using std::cin;
13 using std::cout;
14 using std::cerr;
15
16 #include <map>
17 #include <set>
18 #include <vector>
19
20 #include <menes-api/console.hpp>
21 #include <menes-api/files.hpp>
22 #include <menes-api/timing.hpp>
23 #include <menes-dbi/connection.hpp>
24 #include <menes-dbi/resultset.hpp>
25 #include <menes-etl/fnbind.hpp>
26 #include <menes-ext/casts.hpp>
27 #include <menes-ext/string.hpp>
28 #include <menes-net/oscar/session.hpp>
29 #include <menes-net/oscar/tools/auth.hpp>
30 #include <menes-net/oscar/tools/buddy.hpp>
31 #include <menes-net/oscar/tools/chat.hpp>
32 #include <menes-net/oscar/tools/icbm.hpp>
33 #include <menes-net/oscar/tools/info.hpp>
34 #include <menes-xml/document.hpp>
35 #include <menes-xml/nodeset.hpp>
36 #include <menes-xml/parse.hpp>
37 #include <menes-xml/textwriter.hpp>
38
39 #include "Buddy.hpp"
40
41 struct Database { ext::String driver, host, user, password, db; };
42
43 class Zoe
44 {
45 private:
46 ext::String login, password;
47 Database database;
48 std::set<Buddy> buddies;
49 void configure();
50 void initialize();
51 public:
52 Zoe();
53 enum Generator { all, agent, url, version };
54 static bool debug, collector, publisher, color;
55 static ext::String program, config;
56 static void usage();
57 static ext::String generator(Generator generator = all);
58 };
59
60 enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden,
61 black = 30, red, green, yellow, blue, magenta, cyan, white,
62 _black = 40, _red, _green, _yellow, _blue, _magenta, _cyan, _white };
63
64 inline std::ostream& operator<<(std::ostream& sout, Color color)
65 {
66 return Zoe::color ? sout << "\033[" << unsigned(color) << 'm' : sout;
67 }
68
69 #endif // _Zoe_hpp_

Properties

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