1 |
douglas |
13 |
// Zoe AIM Away Message RSS Feed Generator |
2 |
|
|
// |
3 |
|
|
// Seth King and Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _AwayMessage_hpp_ |
8 |
|
|
#define _AwayMessage_hpp_ |
9 |
|
|
|
10 |
douglas |
25 |
#include "Stamp.hpp" |
11 |
douglas |
13 |
|
12 |
|
|
class AwayMessage |
13 |
|
|
{ |
14 |
|
|
private: |
15 |
|
|
ext::String message; |
16 |
douglas |
25 |
Stamp stamp; |
17 |
douglas |
13 |
public: |
18 |
douglas |
39 |
AwayMessage(const Buddy& buddy, net::Oscar::InfoTool& info) : |
19 |
|
|
message(info.GetAwayMessage(buddy)) {} |
20 |
|
|
AwayMessage(const ext::String& message, const Stamp& stamp) : |
21 |
|
|
message(message), stamp(stamp) {} |
22 |
douglas |
25 |
const Stamp& getStamp() const { return stamp; } |
23 |
douglas |
46 |
ext::String getLink(const Buddy& buddy) const; |
24 |
|
|
ext::String getTag(const Buddy& buddy) const; |
25 |
douglas |
51 |
bool operator<(const AwayMessage& message) const { return stamp < message.stamp; } |
26 |
|
|
bool operator>(const AwayMessage& message) const { return stamp > message.stamp; } |
27 |
douglas |
39 |
operator ext::String() const; |
28 |
douglas |
13 |
}; |
29 |
|
|
|
30 |
douglas |
60 |
inline ios::PrintWriter& operator<<(ios::PrintWriter& pout, |
31 |
|
|
const AwayMessage& message) |
32 |
douglas |
31 |
{ |
33 |
douglas |
60 |
return pout << ext::String(message); |
34 |
douglas |
31 |
} |
35 |
|
|
|
36 |
douglas |
13 |
#endif // _AwayMessage_hpp_ |