Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/libraries/network/NetworkPrereqs.h @ 8328

Last change on this file since 8328 was 8327, checked in by scheusso, 14 years ago

merging network6 into trunk

  • Property svn:eol-style set to native
File size: 4.6 KB
RevLine 
[1168]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
[1232]3 *                    > www.orxonox.net <
[1168]4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
[5929]30@file
31@brief
32    Shared library macros, enums, constants and forward declarations for the network library
[1168]33*/
34
35#ifndef _NetworkPrereqs_H__
36#define _NetworkPrereqs_H__
37
[2710]38#include "OrxonoxConfig.h"
[1168]39
40//-----------------------------------------------------------------------
41// Shared library settings
42//-----------------------------------------------------------------------
[5929]43
[2710]44#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( NETWORK_STATIC_BUILD )
[1168]45#  ifdef NETWORK_SHARED_BUILD
46#    define _NetworkExport __declspec(dllexport)
47#  else
48#    if defined( __MINGW32__ )
49#      define _NetworkExport
50#    else
51#      define _NetworkExport __declspec(dllimport)
52#    endif
53#  endif
54#elif defined ( ORXONOX_GCC_VISIBILITY )
55#  define _NetworkExport  __attribute__ ((visibility("default")))
56#else
57#  define _NetworkExport
58#endif
59
[1360]60//-----------------------------------------------------------------------
[5929]61// Constants
[2662]62//-----------------------------------------------------------------------
[5929]63
[2662]64namespace orxonox
65{
[7801]66  static const unsigned int GAMESTATEID_INITIAL       = static_cast<unsigned int>(-1);
[7163]67  extern const char* LAN_DISCOVERY_MESSAGE;
68  extern const char* LAN_DISCOVERY_ACK;
[7801]69  static const unsigned int LAN_DISCOVERY_PORT          = 55558;
70  static const unsigned int NETWORK_PEER_ID_SERVER      = 0;
[8327]71  static const unsigned int NETWORK_PEER_ID_BROADCAST   = static_cast<unsigned int>(-1);
72  static const unsigned int NETWORK_PEER_ID_UNKNOWN     = static_cast<unsigned int>(-2);
[7801]73  static const unsigned int NETWORK_CHANNEL_DEFAULT     = 0;
74  static const unsigned int NETWORK_CHANNEL_UNRELIABLE  = 1;
75  static const unsigned int NETWORK_CHANNEL_COUNT       = 2;
[2662]76}
77
78//-----------------------------------------------------------------------
[5929]79// Enums
80//-----------------------------------------------------------------------
81
82namespace orxonox
83{
84  namespace packet
85  {
86    namespace PacketFlag
87    {
88      enum Value
89      {
[7801]90        Reliable    = 1,
91        Unsequenced = 2,
92        NoAllocate  = 4
[5929]93      };
94    }
95  }
96}
97
98//-----------------------------------------------------------------------
[1168]99// Forward declarations
100//-----------------------------------------------------------------------
[2773]101
102// from ENet
103struct _ENetPeer;
[7801]104typedef _ENetPeer     ENetPeer;
[2773]105struct _ENetPacket;
[7801]106typedef _ENetPacket   ENetPacket;
[2773]107struct _ENetEvent;
[7801]108typedef _ENetEvent    ENetEvent;
[2773]109struct _ENetHost;
[7801]110typedef _ENetHost     ENetHost;
[2773]111struct _ENetAddress;
[7801]112typedef _ENetAddress  ENetAddress;
113typedef uint8_t       ENetChannelID;
[2773]114
[2171]115namespace orxonox
[1168]116{
[5929]117  class ChatListener;
[1168]118  class Client;
119  class ClientConnection;
[2087]120  class ClientConnectionListener;
[1168]121  class ClientInformation;
[3214]122  class Connection;
[7490]123  class FunctionCall;
[3084]124  class FunctionCallManager;
[1735]125  class GamestateClient;
[5929]126  class GamestateHandler;
[1735]127  class GamestateManager;
[5929]128  class Host;
[3084]129  class NetworkFunctionBase;
[5929]130  struct NetworkFunctionPointer;
[3084]131  class NetworkFunctionStatic;
[5929]132  template <class T>
133  class NetworkMemberFunction;
[3084]134  class NetworkMemberFunctionBase;
[1168]135  class Server;
[3214]136  class ServerConnection;
137  class TrafficControl;
[2662]138
[5929]139  // packet
[2662]140  namespace packet
141  {
[3084]142    class Acknowledgement;
143    class Chat;
144    class ClassID;
[5929]145    class DeleteObjects;
[3084]146    class FunctionCalls;
147    class FunctionIDs;
[1735]148    class Gamestate;
149    class Packet;
150    class Welcome;
[5929]151  }
[3214]152
[5929]153  // synchronisable
154  template <class T>
155  class NetworkCallback;
[6417]156  template <class T, class U>
157  class NetworkCallbackNotify;
[5929]158  class NetworkCallbackBase;
159  class NetworkCallbackManager;
160  class Synchronisable;
161  class SynchronisableHeader;
162  template <class T>
163  class SynchronisableVariable;
164  class SynchronisableVariableBase;
165  template <class T>
166  class SynchronisableVariableBidirectional;
[1168]167}
168
[7801]169namespace boost
170{
171  class mutex;
172  class thread;
173}
174
[1168]175#endif /* _NetworkPrereqs_H__ */
Note: See TracBrowser for help on using the repository browser.