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