ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Zoe.hpp
Revision: 60
Committed: 2004-09-15T19:43:29-07:00 (20 years, 9 months ago) by douglas
File size: 1799 byte(s)
Log Message:
Switched to ios::PrintWriter from std::istream, using ios::String instead of
lexical_cast for UUIDs, worky, worky!

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

Properties

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