(svn r17699) -Codechange: move #ifdef ENABLE_NETWORK till after the 'generic' includes so compilation without network support doesn't get broken as easily by changes in header files

This commit is contained in:
rubidium
2009-10-04 20:00:56 +00:00
parent 7866de8912
commit 67a11a5776
13 changed files with 26 additions and 26 deletions

View File

@@ -12,13 +12,13 @@
#ifndef NETWORK_ADDRESS_H
#define NETWORK_ADDRESS_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "config.h"
#include "../../string_func.h"
#include "../../core/smallmap_type.hpp"
#ifdef ENABLE_NETWORK
class NetworkAddress;
typedef SmallVector<NetworkAddress, 4> NetworkAddressList;
typedef SmallMap<NetworkAddress, SOCKET, 4> SocketList;

View File

@@ -14,11 +14,11 @@
#ifndef NETWORK_CORE_H
#define NETWORK_CORE_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "../../newgrf_config.h"
#ifdef ENABLE_NETWORK
bool NetworkCoreInitialize();
void NetworkCoreShutdown();

View File

@@ -15,12 +15,12 @@
#ifndef NETWORK_CORE_GAME_H
#define NETWORK_CORE_GAME_H
#ifdef ENABLE_NETWORK
#include "config.h"
#include "../../newgrf_config.h"
#include "../../date_type.h"
#ifdef ENABLE_NETWORK
/**
* The game information that is not generated on-the-fly and has to
* be sent to the clients.

View File

@@ -14,11 +14,11 @@
#ifndef NETWORK_CORE_PACKET_H
#define NETWORK_CORE_PACKET_H
#ifdef ENABLE_NETWORK
#include "config.h"
#include "core.h"
#ifdef ENABLE_NETWORK
typedef uint16 PacketSize; ///< Size of the whole packet.
typedef uint8 PacketType; ///< Identifier for the packet

View File

@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_TCP_H
#define NETWORK_CORE_TCP_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "address.h"
#include "core.h"
#include "packet.h"
#ifdef ENABLE_NETWORK
/** Base socket handler for all TCP sockets */
class NetworkTCPSocketHandler : public NetworkSocketHandler {
private:

View File

@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_CONTENT_H
#define NETWORK_CORE_CONTENT_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "tcp.h"
#include "packet.h"
#include "../../debug.h"
#ifdef ENABLE_NETWORK
/** The values in the enum are important; they are used as database 'keys' */
enum ContentType {
CONTENT_TYPE_BEGIN = 1, ///< Helper to mark the begin of the types

View File

@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_TCP_GAME_H
#define NETWORK_CORE_TCP_GAME_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "tcp.h"
#include "packet.h"
#include "../../core/pool_type.hpp"
#ifdef ENABLE_NETWORK
/**
* Enum with all types of UDP packets.
* The order of the first 4 packets MUST not be changed, as

View File

@@ -71,8 +71,6 @@
#ifndef NETWORK_CORE_UDP_H
#define NETWORK_CORE_UDP_H
#ifdef ENABLE_NETWORK
#include "os_abstraction.h"
#include "address.h"
#include "core.h"
@@ -80,6 +78,8 @@
#include "packet.h"
#include "../../debug.h"
#ifdef ENABLE_NETWORK
/** Enum with all types of UDP packets. The order MUST not be changed **/
enum PacketUDPType {
PACKET_UDP_CLIENT_FIND_SERVER, ///< Queries a game server for game information