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

Comparing trunk/Zoe.cpp (file contents):
Revision 22 by douglas, 2004-07-17T00:54:46-07:00 vs.
Revision 31 by douglas, 2004-07-20T00:11:56-07:00

# Line 15 | Line 15
15   extern "C"
16   {
17   #include <pwd.h>
18 + #include <sys/utsname.h>
19   #include <unistd.h>
20   }
21  
# Line 72 | Line 73 | Zoe::Zoe()
73   bool Zoe::debug(false), Zoe::collector(false), Zoe::publisher(false);
74   ext::String Zoe::program, Zoe::config("zoe.xml");
75  
76 + ext::String Zoe::generator()
77 + {
78 +        utsname system;
79 +
80 +        uname(&system);
81 +
82 +        return ext::String("Zoe/0.9 (") + system.sysname + "; http://computers.doug"
83 +                + "lasthrift.net/zoe.xml)";
84 + }
85 +
86   void Zoe::configure()
87   {
88          if (debug) cerr << "config = " << config << '\n';
# Line 118 | Line 129 | void Zoe::configure()
129                  cerr << "buddies = {\n";
130  
131                  for (std::set<Buddy>::const_iterator buddy(this->buddies.begin()); buddy
132 <                        != this->buddies.end(); ++buddy) cerr << "   " << *buddy << '\n';
132 >                        != this->buddies.end(); ++buddy) cerr << "   " << *buddy << " = "
133 >                        << buddy->getRss() << '\n';
134  
135                  cerr << "}\n";
136          }
# Line 162 | Line 174 | void Zoe::initialize()
174                  api::Uuid::CreateSequential(id);
175  
176                  buddy->setId(id);
177 <                db->Execute("INSERT INTO buddies (id, buddy) VALUES ('" +
178 <                        lexical_cast<ext::String>(id) + "', '" + ext::String(*buddy) +
167 <                        "')");
177 >                db->Execute("INSERT INTO buddies (id, buddy) VALUES ('" + id + "', '" +
178 >                        *buddy + "')");
179                  
180                  buddies_.insert(*buddy);
181          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines