]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/server.cpp
Rename the project to R²C²
[r2c2.git] / source / network / server.cpp
index d27683965897161a1c50f26db4716070c53f5002..404faa94a6fa83826f46403fd7ff08110d1d231d 100644 (file)
@@ -1,20 +1,20 @@
 /* $Id$
 
-This file is part of the MSP Märklin suite
+This file is part of R²C²
 Copyright © 2009-2010  Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
 #include <msp/net/inet.h>
-#include "libmarklin/route.h"
-#include "libmarklin/train.h"
-#include "libmarklin/vehicletype.h"
+#include "libr2c2/route.h"
+#include "libr2c2/train.h"
+#include "libr2c2/vehicletype.h"
 #include "server.h"
 
 using namespace std;
 using namespace Msp;
 
-namespace Marklin {
+namespace R2C2 {
 
 Server::Server(Layout &l):
        layout(l),
@@ -54,7 +54,7 @@ void Server::train_added(Train &train)
 
        TrainInfoPacket pkt;
        pkt.address = train.get_address();
-       pkt.loco_type = train.get_locomotive_type().get_article_number();
+       pkt.loco_type = train.get_locomotive_type().get_article_number().str();
        pkt.name = train.get_name();
        send(pkt);
 }
@@ -135,7 +135,7 @@ void Server::Connection::handshake_done()
                {
                        TrainInfoPacket pkt;
                        pkt.address = train.get_address();
-                       pkt.loco_type = train.get_locomotive_type().get_article_number();
+                       pkt.loco_type = train.get_locomotive_type().get_article_number().str();
                        pkt.name = train.get_name();
                        comm.send(pkt);
                }
@@ -222,4 +222,4 @@ void Server::Connection::error(const string &msg)
        comm.send(pkt);
 }
 
-} // namespace Marklin
+} // namespace R2C2