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

Comparing trunk/AwayMessage.cpp (file contents):
Revision 39 by douglas, 2004-07-23T17:52:53-07:00 vs.
Revision 69 by douglas, 2004-12-15T16:14:13-08:00

# Line 4 | Line 4
4   //
5   // $Id$
6  
7 + #include "Matcher/Matcher.hpp"
8   #include "AwayMessage.hpp"
9  
10 + ext::String AwayMessage::getLink(const Buddy& buddy) const
11 + {
12 +        return buddy.getLink() + "#z" + stamp.getW3();
13 + }
14 +
15 + ext::String AwayMessage::getTag(const Buddy& buddy) const
16 + {
17 +        Matcher matcher("^http://([a-zA-Z.\\-0-9]+)(/.*)$");
18 +
19 +        if (buddy.getLink() == matcher)
20 +        {
21 +                return "tag:" + matcher[1] + "," + stamp.get8601() + ":" + matcher[2]
22 +                        + "/z" + stamp.getW3();
23 +        }
24 +        else
25 +        {
26 +                api::Cerr << Zoe::program << ": AwayMessage::getTag(" << buddy << ")\n";
27 +
28 +                exit(1);
29 +        }
30 + }
31 +
32   AwayMessage::operator ext::String() const
33   {
34          std::string message(this->message);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines