Linux multi-monitor fullscreen support
[ryzomcore.git] / snowballs2 / client / src / network.h
blob1c22eb273e29a180eefbfa08bf425cb0cf4e1216
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef NETWORK_H
18 #define NETWORK_H
21 // Includes
24 #include <string>
26 #include <nel/misc/time_nl.h>
28 #include "entities.h"
31 // External definitions
34 namespace NLMISC
36 class CVector;
39 namespace NLNET
41 class CCallbackClient;
44 namespace SBCLIENT {
47 // External variables
50 // Pointer to the connection to the server
51 extern NLNET::CCallbackClient *Connection;
54 // External functions
57 // Return true if the client is online
58 bool isOnline ();
60 // Send the new entity (the player)
61 void sendAddEntity (uint32 id, std::string &name, uint8 race);
63 // Send a chat line to the server
64 void sendChatLine (std::string Line);
66 // Send the user entity position to the server
67 void sendEntityPos (CEntity &entity);
69 // Send a new snowball to the server
70 void sendSnowBall (uint32 eid, const NLMISC::CVector &position, const NLMISC::CVector &target, float speed, float deflagRadius);
72 void initNetwork (const std::string &lc, const std::string &addr);
73 void updateNetwork ();
74 void releaseNetwork ();
76 } /* namespace SBCLIENT */
78 #endif // NETWORK_H
80 /* End of network.h */