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 45 by douglas, 2004-07-23T17:52:53-07:00 vs.
Revision 46 by douglas, 2004-08-16T18:52:59-07:00

# Line 5 | Line 5
5   // $Id$
6  
7   #include "AwayMessage.hpp"
8 + #include "Matcher.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 +                cerr << Zoe::program << ": AwayMessage::getTag(" << buddy << ")\n";
27 +
28 +                exit(1);
29 +        }
30 + }
31  
32   AwayMessage::operator ext::String() const
33   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines