ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Buddy.hpp
(Generate patch)

Comparing trunk/Buddy.hpp (file contents):
Revision 15 by douglas, 2004-07-13T20:14:49-07:00 vs.
Revision 25 by douglas, 2004-07-17T16:29:02-07:00

# Line 13 | Line 13 | class Buddy
13   {
14   private:
15          ext::String login, rss;
16 +        ext::Uuid id;
17   public:
18 <        Buddy(const ext::String& login, const ext::String& rss) : login(login),
19 <                rss(rss) {}
20 <        ~Buddy() {}
18 >        Buddy(const ext::String& login, const ext::String& rss = "") :
19 >                login(net::Oscar::collapse(login)), rss(rss.IsEmpty() ? login + ".rss" :
20 >                rss) {}
21 >        Buddy(const net::Oscar::UserInfo& user) :
22 >                login(net::Oscar::collapse(user.screenname)) {}
23 >        const ext::String& getRss() const { return rss; }
24 >        const ext::Uuid& getId() const { return id; }
25 >        void setId(const ext::Uuid& id) { this->id = id; }
26          bool operator==(const Buddy& buddy) const { return login == buddy.login; }
27          bool operator<(const Buddy& buddy) const { return login < buddy.login; }
28          operator const ext::String&() const { return login; }
29 + // friends:
30 +        friend std::ostream& operator<<(std::ostream& sout, const Buddy& buddy);
31   };
32  
33   #endif // _Buddy_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines