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-dbi/connection.hpp> |
23 |
#include <menes-dbi/resultset.hpp> |
24 |
#include <menes-etl/fnbind.hpp> |
25 |
#include <menes-ext/casts.hpp> |
26 |
#include <menes-ext/string.hpp> |
27 |
#include <menes-net/oscar/session.hpp> |
28 |
#include <menes-net/oscar/tools/auth.hpp> |
29 |
#include <menes-net/oscar/tools/buddy.hpp> |
30 |
#include <menes-net/oscar/tools/chat.hpp> |
31 |
#include <menes-net/oscar/tools/icbm.hpp> |
32 |
#include <menes-net/oscar/tools/info.hpp> |
33 |
#include <menes-xml/document.hpp> |
34 |
#include <menes-xml/nodeset.hpp> |
35 |
#include <menes-xml/parse.hpp> |
36 |
#include <menes-xml/textwriter.hpp> |
37 |
|
38 |
enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden, |
39 |
black = 30, red, green, yellow, blue, magenta, cyan, white, _black = 40, |
40 |
_red, _green, _yellow, _blue, _magenta, _cyan, _white }; |
41 |
|
42 |
inline std::ostream& operator<<(std::ostream& sout, Color color) |
43 |
{ |
44 |
sout << "\033[" << unsigned(color) << 'm'; |
45 |
|
46 |
return sout; |
47 |
} |
48 |
|
49 |
#include "Buddy.hpp" |
50 |
|
51 |
struct Database { ext::String driver, host, user, password, db; }; |
52 |
|
53 |
class Zoe |
54 |
{ |
55 |
private: |
56 |
ext::String login, password; |
57 |
Database database; |
58 |
std::set<Buddy> buddies; |
59 |
void configure(); |
60 |
void initialize(); |
61 |
public: |
62 |
Zoe(); |
63 |
~Zoe() {} |
64 |
static bool debug, collector, publisher; |
65 |
static ext::String program, config; |
66 |
}; |
67 |
|
68 |
#endif // _Zoe_hpp_ |