reman3/Rayman_X/cpa/tempgrp/NET/PrivNetSer.h

116 lines
3.6 KiB
C

/*
PrivNetSer.h : Level 2 declarations
*/
#if !defined(__NETSER_TYPES__)
#define __NETSER_TYPES__
#if !defined(ONLY_TYPES)
#define NETSER_UNDEF
#define ONLY_TYPES
#endif /* !ONLY_TYPES */
/*////////////////////////////////////////////////////////////////////
INCLUDE FILES
////////////////////////////////////////////////////////////////////*/
#include "PrivNetDef.h"
#include "NetEnd.h"
#include <NET\NetSer.h>
#if defined(NETSER_UNDEF)
#undef ONLY_TYPES
#undef NETSER_UNDEF
#endif /* !NETSER_UNDEF */
/*////////////////////////////////////////////////////////////////////
DEFINITION OF TYPES :
////////////////////////////////////////////////////////////////////*/
/* Description of an adding player operation */
typedef struct NetLib_tdstAddPlayerDesc_
{
NetLib_tduxPlayerId m_tduxPlayerId;
tdpPointer m_pPlayerDescriptionData;
NetLib_tduxDescriptionLength m_uxPlayerDesciptionLength;
tdstAddPlayerL1Desc m_stL1AddPlayerDesc;
short IsYou;
NetLib_tduwJoinType JoinType;
char *Options;
}NetLib_tdstAddPlayerDesc;
#endif /* !__NETSER_TYPES__ */
#if !defined(ONLY_TYPES)
#if !defined(__NETSER_VARS__)
#define __NETSER_VARS__
#undef EXTERN
#undef extern
#if !defined(GLOBALS)
#define EXTERN extern
#else /* !GLOBALS */
#define EXTERN
#endif /* !GLOBALS */
/* Global variables : */
#endif /* !__NETSER_VARS__ */
#if !defined (__NETSER_PROTOS__)
#define __NETSER_PROTOS__
/* Private functions :*/
_NET_EXPORT_ NetLib_tdeErrorStatus _NET_CALLING_CONV_ NetLib_eAddNewPlayer(NetLib_tdstAddPlayerDesc*);
_NET_EXPORT_ NetLib_tdeErrorStatus _NET_CALLING_CONV_ eNetDisconnectPlayer(NetLib_tduxPlayerId uxPlayerId,long lParam);
_NET_EXPORT_ NetLib_tdeErrorStatus _NET_CALLING_CONV_ eNetInternalSendMessage(NetLib_tdstSendDesc *p_stSendDesc,tdeNetMessageType eMessageType);
_NET_EXPORT_ NetLib_tdeErrorStatus _NET_CALLING_CONV_ eNetSendReadReceiptMessage(tdstNetMessage *p_stMsg);
#define M_ulNetPlayerIdSlot(p_stPlayerDesc)\
((p_stPlayerDesc)->m_uxPlayerId)
#define M_ucNetPlayerDescLengthSlot(p_stPlayerDesc)\
((p_stPlayerDesc)->uxPlayerDescriptionLength)
#define M_pNetPlayerDescriptionSlot(p_stPlayerDesc)\
((p_stPlayerDesc)->pPlayerDescriptionData)
#define NetLib_M_ulSessionIdSlot(pstSessionInfo)\
((pstSessionInfo)->uxSessionId)
#define NetLib_M_pSessionDescriptionSlot(pstSessionInfo)\
((pstSessionInfo)->pSessionDescriptionData)
#define NetLib_M_ucSessionDescLengthSlot(pstSessionInfo)\
((pstSessionInfo)->uxSessionDescriptionLength)
#define NetLib_M_uwSessionNbrOfPlayersSlot(pstSessionInfo)\
((pstSessionInfo)->uwNumberOfPlayers)
#define NetLib_M_uwSessionMaxNbrOfPlayersSlot(pstSessionInfo)\
((pstSessionInfo)->uwMaxNumberOfPlayers)
#define NetLib_M_ulSessionPlayerIdSlot(pstSessionInfo,uwIndex)\
(M_ulNetPlayerIdSlot(&((pstSessionInfo)->d_stPlayerInfo[uwIndex])))
#define NetLib_M_pSessionPlayerDescriptionSlot(pstSessionInfo,uwIndex)\
(M_pNetPlayerDescriptionSlot(&((pstSessionInfo)->d_stPlayerInfo[uwIndex])))
#define NetLib_M_ucSessionPlayerDescLengthSlot(pstSessionInfo,uwIndex)\
(M_ucNetPlayerDescLengthSlot(&((pstSessionInfo)->d_stPlayerInfo[uwIndex])))
/* Initialisation of differents level-0*/
#include "Privl0serial.h"
#include "Privl0ipx.h"
#include "Privl0udp.h"
#include "Privl0tcp.h"
#include "Privl0shamem.h"
#include "Privl0modem.h"
#include "Privl0ten.h"
#include "Privl0gsubi.h"
#endif /* !__NETSER_PROTOS__ */
#endif /* !ONLY_TYPES */