X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetwork%2Fclient.h;h=94fa78545da9ef52b977acac9084b694256f7636;hb=f8873062b146028c07f55ad625d2767e45133c27;hp=a9ced6fc4f02e7cbb6cd17fcd283f754c32ed0ee;hpb=754ac497179474d0266b55e881a084fef7d5d6a1;p=r2c2.git diff --git a/source/network/client.h b/source/network/client.h index a9ced6f..94fa785 100644 --- a/source/network/client.h +++ b/source/network/client.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2009-2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef R2C2_NET_CLIENT_H_ #define R2C2_NET_CLIENT_H_ @@ -22,6 +15,7 @@ class Client: Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, + Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, Msp::Net::PacketReceiver, @@ -35,7 +29,7 @@ public: sigc::signal signal_error; private: - const Catalogue &catalogue; + Catalogue &catalogue; Protocol proto; Msp::Net::StreamSocket *socket; Msp::Net::Communicator *comm; @@ -46,7 +40,7 @@ private: std::map trains; public: - Client(const Catalogue &); + Client(Catalogue &); ~Client(); void use_event_dispatcher(Msp::IO::EventDispatcher &); @@ -56,10 +50,12 @@ public: void send(const P &pkt) { if(comm) comm->send(pkt); } - const Catalogue &get_catalogue() const { return catalogue; } + Catalogue &get_catalogue() const { return catalogue; } const std::list &get_routes() const { return routes; } void set_power(bool); void set_halt(bool); + bool get_power() const { return power; } + bool get_halt() const { return halt; } NetTrain &get_train(unsigned) const; const std::map &get_trains() const { return trains; } @@ -69,6 +65,7 @@ private: virtual void receive(const TrainInfoPacket &); virtual void receive(const TrainControlPacket &); virtual void receive(const TrainFunctionPacket &); + virtual void receive(const TrainAIControlPacket &); virtual void receive(const TrainStatusPacket &); virtual void receive(const RouteInfoPacket &); virtual void receive(const TrainRoutePacket &);