Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7786 was 7490, checked in by scheusso, 14 years ago

cleaning up function calls a bit in order to buffer calls for not (yet) existing objects

  • Property svn:eol-style set to native
File size: 4.2 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{
[7163]66  static const unsigned int GAMESTATEID_INITIAL     = static_cast<unsigned int>(-1);
67  static const unsigned int CLIENTID_UNKNOWN        = static_cast<unsigned int>(-2);
68  extern const char* LAN_DISCOVERY_MESSAGE;
69  extern const char* LAN_DISCOVERY_ACK;
70  static const unsigned int LAN_DISCOVERY_PORT      = 55557;
[2662]71}
72
73//-----------------------------------------------------------------------
[5929]74// Enums
75//-----------------------------------------------------------------------
76
77namespace orxonox
78{
79  namespace packet
80  {
81    namespace PacketFlag
82    {
83      enum Value
84      {
85        Reliable   = 1,
86        Unsequence = 2,
87        NoAllocate = 4
88      };
89    }
90  }
91}
92
93//-----------------------------------------------------------------------
[1168]94// Forward declarations
95//-----------------------------------------------------------------------
[2773]96
97// from ENet
98struct _ENetPeer;
99typedef _ENetPeer ENetPeer;
100struct _ENetPacket;
101typedef _ENetPacket ENetPacket;
102struct _ENetEvent;
103typedef _ENetEvent ENetEvent;
104struct _ENetHost;
105typedef _ENetHost ENetHost;
106struct _ENetAddress;
107typedef _ENetAddress ENetAddress;
108
[2171]109namespace orxonox
[1168]110{
[5929]111  class ChatListener;
[1168]112  class Client;
113  class ClientConnection;
[2087]114  class ClientConnectionListener;
[1168]115  class ClientInformation;
[3214]116  class Connection;
[7490]117  class FunctionCall;
[3084]118  class FunctionCallManager;
[1735]119  class GamestateClient;
[5929]120  class GamestateHandler;
[1735]121  class GamestateManager;
[5929]122  class Host;
[3084]123  class NetworkFunctionBase;
[5929]124  struct NetworkFunctionPointer;
[3084]125  class NetworkFunctionStatic;
[5929]126  template <class T>
127  class NetworkMemberFunction;
[3084]128  class NetworkMemberFunctionBase;
[1168]129  class Server;
[3214]130  class ServerConnection;
131  class TrafficControl;
[2662]132
[5929]133  // packet
[2662]134  namespace packet
135  {
[3084]136    class Acknowledgement;
137    class Chat;
138    class ClassID;
[5929]139    class DeleteObjects;
[3084]140    class FunctionCalls;
141    class FunctionIDs;
[1735]142    class Gamestate;
143    class Packet;
144    class Welcome;
[5929]145  }
[3214]146
[5929]147  // synchronisable
148  template <class T>
149  class NetworkCallback;
[6417]150  template <class T, class U>
151  class NetworkCallbackNotify;
[5929]152  class NetworkCallbackBase;
153  class NetworkCallbackManager;
154  class Synchronisable;
155  class SynchronisableHeader;
156  template <class T>
157  class SynchronisableVariable;
158  class SynchronisableVariableBase;
159  template <class T>
160  class SynchronisableVariableBidirectional;
[1168]161}
162
163#endif /* _NetworkPrereqs_H__ */
Note: See TracBrowser for help on using the repository browser.