Init
This commit is contained in:
206
DependentExtensions/Swig/SwigInterfaceFiles/RakNet.i
Normal file
206
DependentExtensions/Swig/SwigInterfaceFiles/RakNet.i
Normal file
@ -0,0 +1,206 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
|
||||
//This is the main file that puts everything together, large sections are put into thier own file
|
||||
//Smaller sections are placed directly in this file
|
||||
|
||||
#ifdef RAKNET_COMPATIBILITY
|
||||
#define SLNet RakNet
|
||||
#define SLikeNet RakNet
|
||||
#define SLikeNetPINVOKE RakNetPINVOKE
|
||||
%module(directors="1") RakNet
|
||||
#else
|
||||
%module(directors="1") SLikeNet
|
||||
#endif
|
||||
|
||||
#pragma SWIG nowarn=312,302,314,473,516,325
|
||||
|
||||
#if defined(SWIG_ADDITIONAL_AUTOPATCHER_MYSQL) || defined(SWIG_ADDITIONAL_AUTOPATCHER_POSTGRESQL)
|
||||
#define SWIG_ADDITIONAL_AUTOPATCHER
|
||||
#endif
|
||||
|
||||
%include "RakNetCSharpCPlusIncludes.i"
|
||||
//----------------Includes for swig functions -----------
|
||||
%include cpointer.i
|
||||
%include "arrays_csharp.i"
|
||||
%include "typemaps.i"
|
||||
%include "carrays.i"
|
||||
//----------------------Features--------------------
|
||||
//The director featur is required for C# function overrides to work on the C++ classes
|
||||
%feature("director") NatPunchthroughDebugInterface;
|
||||
%feature("director") FileListTransferCBInterface;
|
||||
%feature("director") UDPProxyClientResultHandler;
|
||||
%feature("director") UDPProxyServerResultHandler;
|
||||
%feature("director") NetworkIDObject;
|
||||
|
||||
%nestedworkaround DataStructures::Table::Row;
|
||||
%nestedworkaround DataStructures::Table::Cell;
|
||||
%nestedworkaround DataStructures::Table::FilterQuery;
|
||||
%nestedworkaround DataStructures::Table::ColumnDescriptor;
|
||||
%nestedworkaround DataStructures::Table::SortQuery;
|
||||
%nestedworkaround SLNet::FileListTransferCBInterface::OnFileStruct;
|
||||
%nestedworkaround SLNet::FileListTransferCBInterface::FileProgressStruct;
|
||||
%nestedworkaround SLNet::FileListTransferCBInterface::DownloadCompleteStruct;
|
||||
|
||||
//----------------Extra Swig PreProcessor------------
|
||||
%include "RakNetCSharpPreprocessor.i"
|
||||
|
||||
//----------Ignores----------------
|
||||
%include "RakNetCSharpIgnores.i"
|
||||
|
||||
//------------------------------TypeMaps--------------------------
|
||||
%include "RakNetCSharpTypeMaps.i"
|
||||
|
||||
//----------------------------Method modifiers---------------------
|
||||
%include "RakNetCSharpMethodModifiers.i"
|
||||
|
||||
//--------------------------Renames--------------------------------
|
||||
%include "RakNetCSharpRenames.i"
|
||||
|
||||
//--------------------------------Extends-----------------------------------
|
||||
%include "RakNetCSharpExtends.i"
|
||||
|
||||
//----------------------------Additional Class/Struct Defines-----------------------
|
||||
%include "RakNetStructsAndClasses.i"
|
||||
|
||||
//---------------------------Extra global functions---------------
|
||||
|
||||
//What these two functions are for, is to get around the string in/out problem I return the string
|
||||
//These helper functions are hidden from the user, the user sees the original in/out api
|
||||
//This is the C++ code insert
|
||||
%{
|
||||
char * StatisticsToStringHelper( SLNet::RakNetStatistics *s,char * buffer,int verbosityLevel )
|
||||
{
|
||||
StatisticsToString( s, buffer, verbosityLevel );
|
||||
return buffer;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
//This code is for Swig parsing
|
||||
char * StatisticsToStringHelper( SLNet::RakNetStatistics *s,char * buffer,int verbosityLevel );
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
//Swig parsing
|
||||
/*bool CreatePatchHelper(unsigned char *inByteArray, unsigned oldsize, unsigned char *inByteArray2, unsigned int newsize, unsigned char * inOutByteArray, unsigned *outSize);
|
||||
|
||||
//Code include
|
||||
%{
|
||||
bool CreatePatchHelper(unsigned char *inByteArray, unsigned oldsize, unsigned char *inByteArray2, unsigned int newsize, unsigned char * inOutByteArray, unsigned *outSize)
|
||||
{
|
||||
char ** passedArrayPointer;
|
||||
*passedArrayPointer= new char[99];
|
||||
bool returnVal=CreatePatch((char *) inByteArray,oldsize,(char *) inByteArray2,newsize,passedArrayPointer,outSize);
|
||||
//memcpy(inOutByteArray, *passedArrayPointer, (size_t)1);
|
||||
return true;
|
||||
}
|
||||
%}*/
|
||||
#endif
|
||||
|
||||
//------------------------------Header includes for parsing by swig----------------------------
|
||||
%include "RakNetCSharpSwigIncludes.i"
|
||||
using namespace SLNet;
|
||||
|
||||
//-------------------------Special Extends----------------------------------
|
||||
//For whatever reason these extends need to be placed after swig parsing.
|
||||
|
||||
//For the template to work the DataStructures namespace needs to be parsed by swig
|
||||
%extend DataStructures::Table
|
||||
{
|
||||
DataStructures::Page<unsigned, Row*, _TABLE_BPLUS_TREE_ORDER> * GetListHeadHelper()
|
||||
{//Bypass of strange bug reprted by user
|
||||
return self->GetListHead();
|
||||
}
|
||||
|
||||
void SortTableHelper(DataStructures::List< SortQuery > *sortQueries, unsigned numSortQueries, DataStructures::List< Row > *out)
|
||||
{
|
||||
SortQuery * passedArray=NULL;
|
||||
if (sortQueries!=NULL)
|
||||
{
|
||||
passedArray=&((*sortQueries)[0]); /*The memory should be contigous since this is a vector class copy. It was last time I checked the implementation. So this will efficiently pass the array without needing to copy it*/
|
||||
}
|
||||
|
||||
int numRows = self->GetRowCount();
|
||||
Row **tempIn = NULL;
|
||||
tempIn = new Row*[numRows];
|
||||
self->SortTable(passedArray,numSortQueries, tempIn);
|
||||
|
||||
for (int i=0;i<numRows;i++)
|
||||
{
|
||||
out->Insert(*(tempIn[i]),__FILE__,__LINE__);
|
||||
}
|
||||
delete [] tempIn;
|
||||
|
||||
}
|
||||
|
||||
void GetCellValueByIndexHelper(unsigned rowIndex, unsigned columnIndex, unsigned char *inOutByteArray, int *outputLength)
|
||||
{
|
||||
self->GetCellValueByIndex(rowIndex, columnIndex, (char *)inOutByteArray, outputLength);
|
||||
}
|
||||
|
||||
char * GetCellValueByIndexHelper(unsigned rowIndex, unsigned columnIndex, char *output)
|
||||
{
|
||||
self->GetCellValueByIndex(rowIndex,columnIndex,output);
|
||||
return output;
|
||||
}
|
||||
|
||||
/// \brief Prints out the names of all the columns.
|
||||
/// \param[out] inOutByteArray A pointer to an array of bytes which will hold the output.
|
||||
/// \param[in] outLength The size of the \a out array
|
||||
/// \param[in] columnDelineator What character to print to delineate columns
|
||||
void PrintColumnHeaders(unsigned char *inOutByteArray, int byteArrayLength, char columnDelineator) const
|
||||
{
|
||||
self->PrintColumnHeaders((char *) inOutByteArray,byteArrayLength, columnDelineator);
|
||||
}
|
||||
|
||||
/// \brief Writes a text representation of the row to \a out.
|
||||
/// \param[out] inOutByteArray A pointer to an array of bytes which will hold the output.
|
||||
/// \param[in] outLength The size of the \a out array
|
||||
/// \param[in] columnDelineator What character to print to delineate columns
|
||||
/// \param[in] printDelineatorForBinary Binary output is not printed. True to still print the delineator.
|
||||
/// \param[in] inputRow The row to print
|
||||
void PrintRow(unsigned char *inOutByteArray, int byteArrayLength, char columnDelineator, bool printDelineatorForBinary, DataStructures::Table::Row* inputRow) const
|
||||
{
|
||||
self->PrintRow((char *)inOutByteArray,byteArrayLength,columnDelineator,printDelineatorForBinary,inputRow);
|
||||
}
|
||||
|
||||
void QueryTableHelper(unsigned *columnIndicesSubset, unsigned numColumnSubset, DataStructures::List <FilterQuery> * inclusionFilters, unsigned numInclusionFilters, unsigned *rowIds, unsigned numRowIDs, Table *result)
|
||||
{
|
||||
FilterQuery * passedArray=NULL;
|
||||
if (inclusionFilters!=NULL)
|
||||
{
|
||||
passedArray=&((*inclusionFilters)[0]); /*The memory should be contigous since this is a vector class copy. It was last time I checked the implementation. So this will efficiently pass the array without needing to copy it*/
|
||||
}
|
||||
self->QueryTable(columnIndicesSubset, numColumnSubset, passedArray, numInclusionFilters, rowIds, numRowIDs, result);
|
||||
|
||||
}
|
||||
|
||||
bool UpdateCell(unsigned rowId, unsigned columnIndex, int byteLength, unsigned char *inByteArray)
|
||||
{
|
||||
return self->UpdateCell( rowId, columnIndex, byteLength, (char *) inByteArray);
|
||||
}
|
||||
|
||||
bool UpdateCellByIndex(unsigned rowIndex, unsigned columnIndex, int byteLength, unsigned char *inByteArray)
|
||||
{
|
||||
return self->UpdateCellByIndex( rowIndex, columnIndex, byteLength, (char *) inByteArray);
|
||||
}
|
||||
|
||||
//This is needed because Swig Will not ignore the definistion I tell it to, so I need to ignore all ColumnIndexes
|
||||
unsigned ColumnIndexHelper(const char *columnName) const
|
||||
{
|
||||
return self->ColumnIndex(columnName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------Template Defines-------------------------
|
||||
%include "RakNetCSharpTemplateDefines.i"
|
||||
@ -0,0 +1,151 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//This is not parsed by swig but inserted into the generated C++ wrapper, these includes
|
||||
//are needed so the wrapper includes the needed .h filese
|
||||
//This also includes the typemaps used.
|
||||
%{
|
||||
/* Includes the header in the wrapper code */
|
||||
//Defines
|
||||
#ifdef SWIGWIN
|
||||
#define _MSC_VER 10000
|
||||
#define WIN32
|
||||
#define _WIN32
|
||||
#define _DEBUG
|
||||
#define _RAKNET_DLL
|
||||
#endif
|
||||
//TypeDefs
|
||||
typedef int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef uint32_t DefaultIndexType;
|
||||
#ifdef SWIGWIN
|
||||
typedef unsigned int SOCKET;
|
||||
#endif
|
||||
//Includes
|
||||
#include "slikenet/smartptr.h"
|
||||
#include "slikenet/defines.h"
|
||||
#include "slikenet/MessageIdentifiers.h"
|
||||
#include "slikenet/Export.h"
|
||||
#include "slikenet/SimpleMutex.h"
|
||||
#include "slikenet/string.h"
|
||||
#include "slikenet/wstring.h"
|
||||
#include "slikenet/BitStream.h"
|
||||
#include "slikenet/DS_List.h"
|
||||
#include "slikenet/DS_ByteQueue.h"
|
||||
#include "slikenet/assert.h"
|
||||
#include "slikenet/NativeTypes.h"
|
||||
#include "slikenet/SocketIncludes.h"
|
||||
#include "slikenet/time.h"
|
||||
#include "slikenet/Export.h"
|
||||
#include "slikenet/memoryoverride.h"
|
||||
#include "slikenet/types.h"
|
||||
#include "slikenet/socket.h"
|
||||
#include "slikenet/statistics.h"
|
||||
#include "slikenet/NetworkIDObject.h"
|
||||
#include "slikenet/NetworkIDManager.h"
|
||||
//The below three classes have been removed from interface, if PluginInterface2 is fully exposed again
|
||||
//or another class needs them uncomment them and the related typemaps
|
||||
//#include "slikenet/TCPInterface.h"
|
||||
//#include "slikenet/PacketizedTCP.h"
|
||||
//#include "slikenet/InternalPacket.h"
|
||||
#include "slikenet/PluginInterface2.h"
|
||||
#include "slikenet/peerinterface.h"
|
||||
#include "slikenet/peer.h"
|
||||
#include "slikenet/PacketPriority.h"
|
||||
#include "slikenet/PacketLogger.h"
|
||||
#include "slikenet/PacketFileLogger.h"
|
||||
#include "slikenet/NatTypeDetectionClient.h"
|
||||
#include "slikenet/NatPunchthroughClient.h"
|
||||
#include "slikenet/Router2.h"
|
||||
#include "slikenet/UDPProxyClient.h"
|
||||
#include "slikenet/FullyConnectedMesh2.h"
|
||||
#include "slikenet/ReadyEvent.h"
|
||||
//#include "slikenet/TeamBalancer.h"
|
||||
#include "slikenet/TeamManager.h"
|
||||
#include "slikenet/NatPunchthroughServer.h"
|
||||
#include "slikenet/UDPForwarder.h"
|
||||
#include "slikenet/UDPProxyServer.h"
|
||||
#include "slikenet/UDPProxyCoordinator.h"
|
||||
#include "slikenet/NatTypeDetectionServer.h"
|
||||
#include "slikenet/DS_BPlusTree.h"
|
||||
#include "slikenet/DS_Table.h"
|
||||
#include "slikenet/FileListTransferCBInterface.h"//
|
||||
#include "slikenet/IncrementalReadInterface.h"//
|
||||
#include "slikenet/FileListNodeContext.h"//
|
||||
#include "slikenet/FileList.h"//
|
||||
#include "slikenet/TransportInterface.h"//
|
||||
#include "slikenet/CommandParserInterface.h"//
|
||||
#include "slikenet/LogCommandParser.h"//
|
||||
#include "slikenet/MessageFilter.h"//
|
||||
#include "slikenet/DirectoryDeltaTransfer.h"//
|
||||
#include "slikenet/FileListTransfer.h"//
|
||||
#include "slikenet/ThreadsafePacketLogger.h"//
|
||||
#include "slikenet/PacketConsoleLogger.h"//
|
||||
#include "slikenet/PacketFileLogger.h"//
|
||||
#include "slikenet/DS_Multilist.h"
|
||||
#include "slikenet/ConnectionGraph2.h"
|
||||
#include "slikenet/GetTime.h"
|
||||
//#include "slikenet/transport2.h"
|
||||
//#include "slikenet/RoomsPlugin.h"
|
||||
//Macros
|
||||
//Swig C++ code only TypeDefs
|
||||
//Most of these are nested structs/classes that swig needs to understand as global
|
||||
//They will reference the nested struct/class while appearing global
|
||||
typedef SLNet::RakString::SharedString SharedString;
|
||||
typedef DataStructures::Table::Row Row;
|
||||
typedef DataStructures::Table::Cell Cell;
|
||||
typedef DataStructures::Table::FilterQuery FilterQuery;
|
||||
typedef DataStructures::Table::ColumnDescriptor ColumnDescriptor;
|
||||
typedef DataStructures::Table::SortQuery SortQuery;
|
||||
typedef SLNet::FileListTransferCBInterface::OnFileStruct OnFileStruct;
|
||||
typedef SLNet::FileListTransferCBInterface::FileProgressStruct FileProgressStruct;
|
||||
typedef SLNet::FileListTransferCBInterface::DownloadCompleteStruct DownloadCompleteStruct;
|
||||
|
||||
%}
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE
|
||||
%{
|
||||
#include "SQLite3PluginCommon.h"
|
||||
#include "SQLite3ClientPlugin.h"
|
||||
#include "SQLiteLoggerCommon.h"
|
||||
#include "SQLiteClientLoggerPlugin.h"
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE_SERVER
|
||||
#include "SQLite3ServerPlugin.h"
|
||||
#include "SQLiteServerLoggerPlugin.h"
|
||||
#endif
|
||||
typedef SLNet::LogParameter::DataUnion DataUnion;
|
||||
typedef SLNet::SQLiteClientLoggerPlugin::ParameterListHelper ParameterListHelper;
|
||||
%}
|
||||
#endif
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
%{
|
||||
#include "slikenet/AutopatcherRepositoryInterface.h"
|
||||
#include "AutopatcherServer.h"
|
||||
#include "AutopatcherClient.h"
|
||||
#include "AutopatcherMySQLRepository.h"
|
||||
#include "CreatePatch.h"
|
||||
#include "MemoryCompressor.h"
|
||||
#include "ApplyPatch.h"
|
||||
#include "slikenet/AutopatcherPatchContext.h"
|
||||
%}
|
||||
#endif
|
||||
|
||||
#ifdef RAKNET_COMPATIBILITY
|
||||
%{
|
||||
using namespace RakNet;
|
||||
%}
|
||||
#else
|
||||
%{
|
||||
using namespace SLNet;
|
||||
%}
|
||||
#endif
|
||||
|
||||
@ -0,0 +1,632 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//--------------------------------Extends-----------------------------------
|
||||
//This file extends classes with new C++ code, note that not all things are possible because
|
||||
//while typically it acts like the code is inserted into the class, it isn't really
|
||||
//The extends are generated in the wrapper
|
||||
//An example of a problem is accessing private variables and functions.
|
||||
//Also instead of just calling the function in the class you use a pointer called self that is a pointer to the object
|
||||
|
||||
%extend SLNet::BitStream
|
||||
{
|
||||
inline const char * CSharpStringReader(const char * inString)
|
||||
{
|
||||
self->Read((char *)inString);
|
||||
return inString;
|
||||
}
|
||||
|
||||
inline bool CSharpByteReader(unsigned char* inOutByteArray,unsigned int numberOfBytes)
|
||||
{
|
||||
return self->Read((char *)inOutByteArray,numberOfBytes);
|
||||
}
|
||||
|
||||
inline char * CSharpStringReaderCompressedDelta(char * inString)
|
||||
{
|
||||
self->ReadCompressedDelta(inString);
|
||||
return inString;
|
||||
}
|
||||
|
||||
inline char * CSharpStringReaderDelta( char * inString)
|
||||
{
|
||||
self->ReadDelta(inString);
|
||||
return inString;
|
||||
}
|
||||
|
||||
inline char * CSharpStringReaderCompressed(char * inString)
|
||||
{
|
||||
self->ReadCompressed(inString);
|
||||
return inString;
|
||||
}
|
||||
|
||||
void Write( unsigned char* inputByteArray, const unsigned int numberOfBytes )
|
||||
{
|
||||
self->Write((const char*)inputByteArray,numberOfBytes);
|
||||
}
|
||||
|
||||
BitSize_t CSharpCopyDataHelper(unsigned char* inOutByteArray)
|
||||
{
|
||||
BitSize_t returnVal;
|
||||
returnVal=self->GetNumberOfBitsAllocated();
|
||||
memcpy(inOutByteArray, self->GetData(), sizeof(unsigned char) * (size_t) ( BITS_TO_BYTES( returnVal ) ) );
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
inline char * CSharpPrintBitsHelper(char * inString)
|
||||
{
|
||||
self->PrintBits(inString);
|
||||
return inString;
|
||||
|
||||
}
|
||||
|
||||
inline char * CSharpPrintHexHelper(char * inString)
|
||||
{
|
||||
self->PrintHex(inString);
|
||||
return inString;
|
||||
}
|
||||
|
||||
void Serialize(bool writeToBitstream, unsigned char* inputByteArray, const unsigned int numberOfBytes )
|
||||
{
|
||||
self->Serialize(writeToBitstream,(char*)inputByteArray,numberOfBytes);
|
||||
}
|
||||
|
||||
bool ReadAlignedBytesSafe(unsigned char *inOutByteArray, int inputLength, const int maxBytesToRead )
|
||||
{
|
||||
|
||||
return self->ReadAlignedBytesSafe( (char *)inOutByteArray,inputLength, maxBytesToRead );
|
||||
}
|
||||
|
||||
bool ReadAlignedBytesSafe(unsigned char *inOutByteArray, unsigned int inputLength, const unsigned int maxBytesToRead )
|
||||
{
|
||||
return self->ReadAlignedBytesSafe((char *)inOutByteArray,inputLength, maxBytesToRead );
|
||||
}
|
||||
|
||||
void WriteAlignedVar8(unsigned char *inByteArray)
|
||||
{
|
||||
self->WriteAlignedVar8((const char *)inByteArray);
|
||||
}
|
||||
|
||||
bool ReadAlignedVar8(unsigned char *inOutByteArray)
|
||||
{
|
||||
return self->ReadAlignedVar8((char *)inOutByteArray);
|
||||
}
|
||||
|
||||
void WriteAlignedVar16(unsigned char *inByteArray)
|
||||
{
|
||||
self->WriteAlignedVar16((const char *)inByteArray);
|
||||
}
|
||||
|
||||
bool ReadAlignedVar16(unsigned char *inOutByteArray)
|
||||
{
|
||||
return self->ReadAlignedVar16((char *)inOutByteArray);
|
||||
}
|
||||
|
||||
void WriteAlignedVar32(unsigned char *inByteArray)
|
||||
{
|
||||
self->WriteAlignedVar32((const char *)inByteArray);
|
||||
}
|
||||
|
||||
bool ReadAlignedVar32(unsigned char *inOutByteArray)
|
||||
{
|
||||
return self->ReadAlignedVar32((char *)inOutByteArray);
|
||||
}
|
||||
|
||||
void WriteAlignedBytesSafe( unsigned char *inByteArray, const unsigned int inputLength, const unsigned int maxBytesToWrite )
|
||||
{
|
||||
self->WriteAlignedBytesSafe((const char *)inByteArray, inputLength, maxBytesToWrite );
|
||||
}
|
||||
}
|
||||
|
||||
%define RAKPEERANDINTERFACEEXTEND()
|
||||
{
|
||||
uint32_t Send( unsigned char *inByteArray, const int length, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast )
|
||||
{
|
||||
return self->Send((const char*)inByteArray,length,priority,reliability,orderingChannel,systemIdentifier,broadcast);
|
||||
|
||||
}
|
||||
void SendLoopback( unsigned char *inByteArray, const int length )
|
||||
{
|
||||
self->SendLoopback( (const char *)inByteArray, length );
|
||||
|
||||
}
|
||||
void SetOfflinePingResponse( unsigned char *inByteArray, const unsigned int length )
|
||||
{
|
||||
self->SetOfflinePingResponse((const char *) inByteArray,length);
|
||||
|
||||
}
|
||||
bool AdvertiseSystem( const char *host, unsigned short remotePort, unsigned char *inByteArray, int dataLength, unsigned connectionSocketIndex=0 )
|
||||
{
|
||||
return self->AdvertiseSystem(host,remotePort,(const char *) inByteArray,dataLength,connectionSocketIndex);
|
||||
|
||||
}
|
||||
|
||||
const char *CSharpGetIncomingPasswordHelper( const char* passwordData, int *passwordDataLength )
|
||||
{
|
||||
self->GetIncomingPassword((char*)passwordData,passwordDataLength);
|
||||
return passwordData;
|
||||
}
|
||||
|
||||
void SetIncomingPassword( unsigned char* passwordDataByteArray, int passwordDataLength )
|
||||
{
|
||||
self->SetIncomingPassword((char*)passwordDataByteArray,passwordDataLength);
|
||||
}
|
||||
|
||||
void GetIncomingPassword( unsigned char* passwordDataByteArray, int *passwordDataLength )
|
||||
{
|
||||
self->GetIncomingPassword((char*)passwordDataByteArray,passwordDataLength);
|
||||
}
|
||||
|
||||
void CSharpGetOfflinePingResponseHelper( unsigned char *inOutByteArray, unsigned int *outLength )
|
||||
{
|
||||
char * tmp=(char *)inOutByteArray;
|
||||
self->GetOfflinePingResponse(&tmp,outLength);
|
||||
memcpy(inOutByteArray,tmp,(size_t)*outLength);
|
||||
}
|
||||
|
||||
bool GetConnectionList( DataStructures::List <SystemAddress> * remoteSystems, unsigned short *numberOfSystems ) const
|
||||
{
|
||||
SystemAddress inSys[256];
|
||||
bool returnVal = self->GetConnectionList(inSys,numberOfSystems);
|
||||
if(remoteSystems!=NULL)
|
||||
{
|
||||
for (int i=0;i<*numberOfSystems;i++)
|
||||
{
|
||||
remoteSystems->Insert(inSys[i],__FILE__,__LINE__);
|
||||
}
|
||||
}
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
}
|
||||
%enddef
|
||||
|
||||
%extend SLNet::RakPeerInterface
|
||||
RAKPEERANDINTERFACEEXTEND()
|
||||
|
||||
|
||||
%extend SLNet::RakPeer
|
||||
RAKPEERANDINTERFACEEXTEND()
|
||||
|
||||
%extend SLNet::RakString
|
||||
{
|
||||
void AppendBytes(unsigned char *inByteArray, unsigned int count)
|
||||
{
|
||||
self->AppendBytes((const char *)inByteArray,count);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Removed from interface, commented rather than removed in case needed later
|
||||
/*
|
||||
%extend SLNet::PluginInterface2
|
||||
{
|
||||
|
||||
void OnDirectSocketReceive(unsigned char *inByteArray, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
|
||||
{
|
||||
self->OnDirectSocketReceive((const char *)inByteArray, bitsUsed, remoteSystemAddress);
|
||||
}
|
||||
|
||||
void OnDirectSocketSend(unsigned char *inByteArray, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
|
||||
{
|
||||
self->OnDirectSocketSend((const char *)inByteArray, bitsUsed, remoteSystemAddress);
|
||||
}
|
||||
|
||||
void OnPushBackPacket(unsigned char *inByteArray, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
|
||||
{
|
||||
self->OnPushBackPacket((const char *)inByteArray, bitsUsed, remoteSystemAddress);
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
%define STRUCT_UNSIGNED_CHAR_ARRAY_EXTEND(IN_FUNCTION_NAME,IN_DATA_NAME,LENGTH_MEMBER_VAR)
|
||||
void IN_FUNCTION_NAME (unsigned char * inByteArray,int numBytes)
|
||||
{
|
||||
if (self->IN_DATA_NAME!=NULL)
|
||||
{
|
||||
rakFree_Ex(self->IN_DATA_NAME, __FILE__, __LINE__);
|
||||
}
|
||||
//create new with size
|
||||
self->IN_DATA_NAME=(unsigned char*) rakMalloc_Ex(numBytes, __FILE__, __LINE__);
|
||||
//copy
|
||||
memcpy( self->IN_DATA_NAME,inByteArray, numBytes );
|
||||
self->LENGTH_MEMBER_VAR=numBytes;
|
||||
}
|
||||
%enddef
|
||||
|
||||
%extend SLNet::Packet
|
||||
{
|
||||
Packet()
|
||||
{
|
||||
Packet * newPacket = new Packet();
|
||||
newPacket->data=NULL;
|
||||
return newPacket;
|
||||
}
|
||||
STRUCT_CUSTOM_UNSIGNED_CHAR_ARRAY_TYPEMAP(dataIsCached,dataCache,unsigned char * data,SetPacketData,Packet_data_get,Packet,length)
|
||||
STRUCT_UNSIGNED_CHAR_ARRAY_EXTEND(SetPacketData,data,length)
|
||||
}
|
||||
|
||||
//Removed from interface, commented rather than removed in case needed later
|
||||
/*
|
||||
%extend InternalPacket
|
||||
{
|
||||
STRUCT_CUSTOM_UNSIGNED_CHAR_ARRAY_TYPEMAP(dataIsCached,dataCache,unsigned char * data,SetInternalPacketData,InternalPacket_data_get,InternalPacket,dataBitLength/8)
|
||||
STRUCT_UNSIGNED_CHAR_ARRAY_EXTEND(SetInternalPacketData,data)
|
||||
}*/
|
||||
|
||||
%define STRUCT_UNSIGNED_INT_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(IN_FUNCTION_NAME,IN_DATA_NAME)
|
||||
void IN_FUNCTION_NAME (unsigned int * inUnsignedIntArray,int numInts)
|
||||
{
|
||||
for (int i=0;i<numInts;i++)
|
||||
{
|
||||
if (i>=NUMBER_OF_PRIORITIES)
|
||||
{break;}
|
||||
self->IN_DATA_NAME[i]=inUnsignedIntArray[i];
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
%define STRUCT_UNSIGNED_INT64_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(IN_FUNCTION_NAME,IN_DATA_NAME)
|
||||
void IN_FUNCTION_NAME (unsigned long long int * inUint64Array,int numUint64)
|
||||
{
|
||||
for (int i=0;i<numUint64;i++)
|
||||
{
|
||||
if (i>=RNS_PER_SECOND_METRICS_COUNT)
|
||||
{break;}
|
||||
self->IN_DATA_NAME[i]=inUint64Array[i];
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
%define STRUCT_DOUBLE_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(IN_FUNCTION_NAME,IN_DATA_NAME)
|
||||
void IN_FUNCTION_NAME (double * inDoubleArray,int numDoubles)
|
||||
{
|
||||
for (int i=0;i<numDoubles;i++)
|
||||
{
|
||||
if (i>=NUMBER_OF_PRIORITIES)
|
||||
{break;}
|
||||
self->IN_DATA_NAME[i]=inDoubleArray[i];
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
%extend SLNet::RakNetStatistics
|
||||
{
|
||||
STRUCT_DOUBLE_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(SetBytesInSendBuffer,bytesInSendBuffer);
|
||||
STRUCT_UNSIGNED_INT_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(SetMessageInSendBuffer,messageInSendBuffer);
|
||||
STRUCT_UNSIGNED_INT64_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(SetRunningTotal,runningTotal);
|
||||
STRUCT_UNSIGNED_INT64_ARRAY_EXTEND_SPECIAL_RAKNETSTATISTICS(SetValueOverLastSecond,valueOverLastSecond);
|
||||
}
|
||||
|
||||
%extend FileProgressStruct
|
||||
{
|
||||
FileProgressStruct()
|
||||
{
|
||||
FileProgressStruct * returnVal= new FileProgressStruct();
|
||||
returnVal->firstDataChunk=NULL;
|
||||
returnVal->iriDataChunk=NULL;
|
||||
return returnVal;
|
||||
}
|
||||
void SetFirstDataChunk (unsigned char * inByteArray,int numBytes)
|
||||
{
|
||||
if (self->firstDataChunk!=NULL)
|
||||
{
|
||||
rakFree_Ex(self->firstDataChunk, __FILE__, __LINE__);
|
||||
}
|
||||
//create new with size
|
||||
self->firstDataChunk=(char*) rakMalloc_Ex(numBytes, __FILE__, __LINE__);
|
||||
//copy
|
||||
memcpy( self->firstDataChunk,inByteArray, numBytes );
|
||||
}
|
||||
|
||||
void SetIriDataChunk(unsigned char * inByteArray,int numBytes)
|
||||
{
|
||||
if (self->iriDataChunk!=NULL)
|
||||
{
|
||||
rakFree_Ex(self->iriDataChunk, __FILE__, __LINE__);
|
||||
}
|
||||
//create new with size
|
||||
self->iriDataChunk=(char*) rakMalloc_Ex(numBytes, __FILE__, __LINE__);
|
||||
//copy
|
||||
memcpy( self->iriDataChunk,inByteArray, numBytes );
|
||||
}
|
||||
}
|
||||
|
||||
%extend OnFileStruct
|
||||
{
|
||||
OnFileStruct()
|
||||
{
|
||||
OnFileStruct * returnVal= new OnFileStruct();
|
||||
returnVal->fileData=NULL;
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
void SetFileData(unsigned char * inByteArray,int numBytes)
|
||||
{
|
||||
if(self->fileData!=NULL)
|
||||
{
|
||||
rakFree_Ex(self->fileData, __FILE__, __LINE__);
|
||||
}
|
||||
//create new with size
|
||||
self->fileData=(char*) rakMalloc_Ex(numBytes, __FILE__, __LINE__);
|
||||
//copy
|
||||
memcpy( self->fileData,inByteArray, numBytes );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%extend SLNet::IncrementalReadInterface
|
||||
{
|
||||
unsigned int GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, unsigned char *inOutByteArray, FileListNodeContext context)
|
||||
{
|
||||
return self->GetFilePart( filename, startReadBytes, numBytesToRead, (void *)inOutByteArray, context);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
%extend DataStructures::ByteQueue
|
||||
{
|
||||
void WriteBytes(unsigned char *inByteArray, unsigned length, const char *file, unsigned int line)
|
||||
{
|
||||
self->WriteBytes((const char *)inByteArray, length, file, line);
|
||||
}
|
||||
|
||||
bool ReadBytes(unsigned char *inOutByteArray, unsigned maxLengthToRead, bool peek)
|
||||
{
|
||||
return self->ReadBytes((char *)inOutByteArray, maxLengthToRead, peek);
|
||||
}
|
||||
|
||||
unsigned char* PeekContiguousBytesHelper(unsigned int *outLength) const
|
||||
{
|
||||
unsigned char* returnVal=(unsigned char* ) self->PeekContiguousBytes(outLength);
|
||||
return returnVal;
|
||||
}
|
||||
}
|
||||
|
||||
%extend SLNet::PacketLogger
|
||||
{
|
||||
const char * FormatLineHelper(char* into, const char* dir, const char* type, unsigned int packet, unsigned int frame, unsigned char messageIdentifier, const BitSize_t bitLen, unsigned long long time, const SystemAddress& local, const SystemAddress& remote,unsigned int splitPacketId, unsigned int splitPacketIndex, unsigned int splitPacketCount, unsigned int orderingIndex)
|
||||
{
|
||||
self->FormatLine(into,dir,type,packet, frame,messageIdentifier, bitLen,time, local, remote,splitPacketId, splitPacketIndex, splitPacketCount, orderingIndex);
|
||||
return into;
|
||||
}
|
||||
|
||||
const char * FormatLineHelper(char* into, const char* dir, const char* type, unsigned int packet, unsigned int frame, const char* idToPrint, const BitSize_t bitLen, unsigned long long time, const SystemAddress& local, const SystemAddress& remote,unsigned int splitPacketId, unsigned int splitPacketIndex, unsigned int splitPacketCount, unsigned int orderingIndex)
|
||||
{
|
||||
self->FormatLine(into,dir,type,packet,frame, idToPrint, bitLen, time, local, remote, splitPacketId, splitPacketIndex, splitPacketCount, orderingIndex);
|
||||
return into;
|
||||
}
|
||||
}
|
||||
|
||||
%extend Cell
|
||||
{
|
||||
void Set(unsigned char *inByteArray, int inputLength)
|
||||
{
|
||||
self->Set((const char *)inByteArray,inputLength);
|
||||
}
|
||||
|
||||
void Get(unsigned char *inOutByteArray, int *outputLength)
|
||||
{
|
||||
self->Get((char *)inOutByteArray,outputLength);
|
||||
}
|
||||
|
||||
char *GetHelper(char *output)
|
||||
{
|
||||
self->Get(output);
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
%extend Row
|
||||
{
|
||||
void UpdateCell(unsigned columnIndex, int byteLength, unsigned char *inByteArray)
|
||||
{
|
||||
self->UpdateCell(columnIndex, byteLength, (const char *)inByteArray);
|
||||
}
|
||||
}
|
||||
|
||||
%define STRUCT_CHAR_TO_BYTE_ARRAY_TYPEMAP_INSIDE_EXTEND(BOOLNAME,CACHENAME,IN_DATA_CHANGE_FUNCTION,IN_DATA_GET_FUNCTION,IN_CLASS,IN_LEN_ATTRIBUTE,IN_DATA_NAME)
|
||||
%typemap(imtype, out="IntPtr") char * IN_DATA_NAME "IntPtr"
|
||||
|
||||
STRUCT_CUSTOM_GENERAL_ARRAY_TYPEMAP(BOOLNAME,CACHENAME,char * IN_DATA_NAME,byte,byte,IN_DATA_CHANGE_FUNCTION,IN_DATA_GET_FUNCTION,IN_CLASS,IN_LEN_ATTRIBUTE)
|
||||
|
||||
void IN_DATA_CHANGE_FUNCTION (unsigned char * inByteArray,int numBytes)
|
||||
{
|
||||
if (self->IN_DATA_NAME!=NULL)
|
||||
{
|
||||
rakFree_Ex(self->IN_DATA_NAME, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
//create new with size
|
||||
self->IN_DATA_NAME=(char *) rakMalloc_Ex(numBytes, __FILE__, __LINE__);
|
||||
//copy
|
||||
memcpy( self->IN_DATA_NAME,inByteArray, numBytes );
|
||||
self->IN_LEN_ATTRIBUTE=numBytes;
|
||||
}
|
||||
%enddef
|
||||
|
||||
%extend SLNet::FileListNode
|
||||
{
|
||||
FileListNode()
|
||||
{
|
||||
FileListNode *returnVal = new FileListNode();
|
||||
returnVal->data=NULL;
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
STRUCT_CHAR_TO_BYTE_ARRAY_TYPEMAP_INSIDE_EXTEND(dataIsCached,dataCache,SetData,FileListNode_data_get,SLNet::FileListNode,dataLengthBytes,data)
|
||||
}
|
||||
|
||||
%extend SLNet::TransportInterface
|
||||
{
|
||||
void Send( SystemAddress systemAddress, unsigned char * inByteArray)
|
||||
{
|
||||
self->Send( systemAddress, (const char *)inByteArray);
|
||||
}
|
||||
}
|
||||
|
||||
%extend SLNet::FileList
|
||||
{
|
||||
void AddFile(const char *filename, const char *fullPathToFile, unsigned char *inByteArray, const unsigned dataLength, const unsigned fileLength, FileListNodeContext context, bool isAReference=false)
|
||||
{
|
||||
self->AddFile(filename,fullPathToFile, (const char *)inByteArray, dataLength, fileLength, context,isAReference);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%extend SLNet::ConnectionGraph2
|
||||
{
|
||||
|
||||
bool GetConnectionListForRemoteSystemHelper(RakNetGUID remoteSystemGuid, DataStructures::List<SystemAddress> * saOut, DataStructures::List<RakNetGUID> * guidOut, unsigned int *inOutLength)
|
||||
{
|
||||
SystemAddress * tempInSystemAddress;
|
||||
RakNetGUID * tempInRakNetGUID;
|
||||
tempInSystemAddress = new SystemAddress[*inOutLength];
|
||||
tempInRakNetGUID = new RakNetGUID[*inOutLength];
|
||||
|
||||
bool returnVal = self->GetConnectionListForRemoteSystem(remoteSystemGuid,tempInSystemAddress,tempInRakNetGUID,inOutLength);
|
||||
|
||||
for (unsigned int i=0;i<*inOutLength;i++)
|
||||
{
|
||||
saOut->Insert(tempInSystemAddress[i],__FILE__,__LINE__);
|
||||
guidOut->Insert(tempInRakNetGUID[i],__FILE__,__LINE__);
|
||||
}
|
||||
delete [] tempInSystemAddress;
|
||||
delete [] tempInRakNetGUID;
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
void GetParticipantListHelper( DataStructures::List<RakNetGUID> * guidOut)
|
||||
{
|
||||
DataStructures::OrderedList<RakNetGUID, RakNetGUID> participantList;
|
||||
self->GetParticipantList(participantList);
|
||||
for (unsigned int i=0; i < participantList.Size(); i++)
|
||||
guidOut->Insert(participantList[i],__FILE__,__LINE__);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%extend DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>
|
||||
{
|
||||
DataStructures::Table::Row* DeleteHelper(const unsigned key, DataStructures::Table::Row* out,bool &outBool)
|
||||
{
|
||||
outBool=self->Delete(key,out);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
bool BPlusTree<KeyType, DataType, order>::DeleteHelper(const unsigned key)
|
||||
{
|
||||
this->DeleteHelper(key);
|
||||
}
|
||||
|
||||
DataStructures::Table::Row* BPlusTree<KeyType, DataType, order>::GetHelper(const unsigned key, DataStructures::Table::Row* out,bool &outBool) const
|
||||
{
|
||||
outBool=self->Get(key,out);
|
||||
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
|
||||
%extend SLNet::AutopatcherServer
|
||||
{
|
||||
void StartThreadsHelper(int numThreads, DataStructures::List<AutopatcherRepositoryInterface *> *sqlConnectionPtrArray)
|
||||
{
|
||||
AutopatcherRepositoryInterface ** passedArray=NULL;
|
||||
if (sqlConnectionPtrArray!=NULL)
|
||||
{
|
||||
passedArray=&((*sqlConnectionPtrArray)[0]); /*The memory should be contigous since this is a vector class copy. It was last time I checked the implementation. So this will efficiently pass the array without needing to copy it*/
|
||||
}
|
||||
|
||||
self->StartThreads(numThreads,passedArray);
|
||||
}
|
||||
}
|
||||
|
||||
%extend SLNet::AutopatcherMySQLRepository
|
||||
{
|
||||
|
||||
/// Calls mysql_real_connect with the implicit mySqlConnection
|
||||
bool Connect (const char *host,const char *user,const char *passwd,const char *db,unsigned int port,const char *unix_socket,unsigned long clientflag)
|
||||
{
|
||||
return self->Connect (host,user,passwd,db,port,unix_socket,clientflag);
|
||||
}
|
||||
|
||||
/// Disconnect from the database
|
||||
void Disconnect(void)
|
||||
{
|
||||
return self->Disconnect();
|
||||
}
|
||||
|
||||
/// Returns if we are connected to the database
|
||||
bool IsConnected(void) const
|
||||
{
|
||||
return self->IsConnected();
|
||||
}
|
||||
|
||||
/// If any of the above functions fail, the error string is stored internally. Call this to get it.
|
||||
const char *GetLastError(void) const
|
||||
{
|
||||
return self->GetLastError();
|
||||
}
|
||||
|
||||
/// Returns the result of SELECT LOCALTIMESTAMP
|
||||
char *GetLocalTimestamp(void)
|
||||
{
|
||||
return self->GetLocalTimestamp();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%extend MemoryCompressor
|
||||
{
|
||||
/// Compress a block of data. Pass true to finish if this is the last block in the series. If you don't know if it's the last block, you can call it again with 0 for inputLength
|
||||
/// \note Data passed to input isn't necessarily immediately compressed to output. You can force a write by passing true to finish.
|
||||
/// Multiple calls concatenate the written data.
|
||||
/// \param[in] input A pointer to a block of data
|
||||
/// \param[in] inputLength The length of input
|
||||
/// \param[in] finish Write the last of the data.
|
||||
bool Compress(unsigned char *inputByteArray, const unsigned inputLength, bool finish)
|
||||
{
|
||||
return self->Compress((char *) inputByteArray,inputLength,finish);
|
||||
}
|
||||
}
|
||||
|
||||
%extend MemoryDecompressor
|
||||
{
|
||||
/// Read \a inputLength bytes of compressed data from \a input
|
||||
/// Writes the decompressed output to GetOutput(). Note that unlike the class MemoryCompressor, output data is updated immediately and not internally buffered
|
||||
/// \param[in] input A pointer to a block of data
|
||||
/// \param[in] inputLength The length of input
|
||||
/// \param[in] ignoreStreamEnd Normally when Compress is called with finish==true stream end markers are placed. These are honored, such that the read will end early if a stream marker is hit. Pass true to ignore this and just output all the data.
|
||||
bool Decompress(unsigned char *inputByteArray, const unsigned inputLength, bool ignoreStreamEnd)
|
||||
{
|
||||
return self->Decompress((char *) inputByteArray,inputLength,ignoreStreamEnd);
|
||||
}
|
||||
}
|
||||
|
||||
%extend CompressorBase
|
||||
{
|
||||
void GetOutputHelper(unsigned char * inOutByteArray)
|
||||
{
|
||||
char * returnByteArray;
|
||||
returnByteArray=self->GetOutput();
|
||||
|
||||
memcpy(inOutByteArray, returnByteArray, self->GetTotalOutputSize() );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,374 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//----------Ignores----------------
|
||||
//This file specifies things that should be ignored by Swig
|
||||
//Typeically this is used for the following reasons: a C# replacement was made for the function, it is not supported by Swig
|
||||
//,it should not be exposed, or the item is internal and it would take time to convert
|
||||
|
||||
//BitStream
|
||||
%ignore SLNet::BitStream::Write(unsigned char * const inTemplateVar);
|
||||
%ignore SLNet::BitStream::WriteCompressed(unsigned char * const inTemplateVar);
|
||||
%ignore SLNet::BitStream::Write(const unsigned char * const inTemplateVar);
|
||||
%ignore SLNet::BitStream::WriteCompressed(const unsigned char * const inTemplateVar);
|
||||
%ignore SLNet::BitStream::Write( const char* inputByteArray, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::Read(char *varString);
|
||||
%ignore SLNet::BitStream::Read(unsigned char *varString);
|
||||
%ignore SLNet::BitStream::Read( char* output, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::ReadCompressedDelta(char &outTemplateVar);
|
||||
%ignore SLNet::BitStream::ReadDelta(char &outTemplateVar);
|
||||
%ignore SLNet::BitStream::ReadCompressed(char &outTemplateVar);
|
||||
%ignore SLNet::BitStream::ReadCompressedDelta(char* &outTemplateVar);
|
||||
%ignore SLNet::BitStream::ReadDelta(char* &outTemplateVar);
|
||||
%ignore SLNet::BitStream::ReadCompressed(char* &outTemplateVar);
|
||||
%ignore SLNet::BitStream::CopyData(unsigned char** _data ) const;
|
||||
%ignore SLNet::BitStream::PrintBits(char *out) const;
|
||||
%ignore SLNet::BitStream::PrintHex(char *out) const;
|
||||
%ignore SLNet::BitStream::GetData;
|
||||
%ignore SLNet::BitStream::Serialize(bool writeToBitstream, char* inputByteArray, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::SerializeDelta(bool writeToBitstream, char* inputByteArray, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::SerializeCompressed(bool writeToBitstream, char* inputByteArray, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::SerializeCompressedDelta(bool writeToBitstream, char* inputByteArray, const unsigned int numberOfBytes );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafe( char *inOutByteArray, int &inputLength, const int maxBytesToRead );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafe( char *inOutByteArray, unsigned int &inputLength, const unsigned int maxBytesToRead );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafeAlloc( char **outByteArray, int &inputLength, const int maxBytesToRead );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafeAlloc( char **outByteArray, unsigned int &inputLength, const unsigned int maxBytesToRead );
|
||||
%ignore SLNet::BitStream::WriteAlignedVar8(const char *inByteArray);
|
||||
%ignore SLNet::BitStream::WriteAlignedVar8(const char *inByteArray);
|
||||
%ignore SLNet::BitStream::ReadAlignedVar8(char *inOutByteArray);
|
||||
%ignore SLNet::BitStream::WriteAlignedVar16(const char *inByteArray);
|
||||
%ignore SLNet::BitStream::ReadAlignedVar16(char *inOutByteArray);
|
||||
%ignore SLNet::BitStream::WriteAlignedVar32(const char *inByteArray);
|
||||
%ignore SLNet::BitStream::ReadAlignedVar32(char *inOutByteArray);
|
||||
%ignore SLNet::BitStream::WriteAlignedBytesSafe( const char *inByteArray, const unsigned int inputLength, const unsigned int maxBytesToWrite );
|
||||
%ignore SLNet::BitStream::Read( BitStream &bitStream, BitSize_t numberOfBits );
|
||||
%ignore SLNet::BitStream::Read( BitStream &bitStream );
|
||||
%ignore SLNet::BitStream::Write( BitStream &bitStream, BitSize_t numberOfBits );
|
||||
%ignore SLNet::BitStream::Write( BitStream &bitStream );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafeAlloc( char ** outByteArray, unsigned int &inputLength, const unsigned int maxBytesToRead );
|
||||
%ignore SLNet::BitStream::ReadAlignedBytesSafeAlloc( char **outByteArray, int &inputLength, const unsigned int maxBytesToRead );
|
||||
|
||||
//RakPeer
|
||||
%define IGNORERAKPEERANDINTERFACE(theMacroInputFunction)
|
||||
%ignore SLNet::RakPeer::theMacroInputFunction;
|
||||
%ignore SLNet::RakPeerInterface::theMacroInputFunction;
|
||||
%enddef
|
||||
|
||||
IGNORERAKPEERANDINTERFACE(GetIncomingPassword( char* passwordData, int *passwordDataLength ))
|
||||
IGNORERAKPEERANDINTERFACE(GetOfflinePingResponse( char **data, unsigned int *length ))
|
||||
IGNORERAKPEERANDINTERFACE(RegisterAsRemoteProcedureCall( const char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ))
|
||||
IGNORERAKPEERANDINTERFACE(RegisterClassMemberRPC( const char* uniqueID, void *functionPointer ))
|
||||
IGNORERAKPEERANDINTERFACE(UnregisterAsRemoteProcedureCall( const char* uniqueID ))
|
||||
IGNORERAKPEERANDINTERFACE(RPC( const char* uniqueID, const char *data, BitSize_t bitLength, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RakNetTime *includedTimestamp, NetworkID networkID, SLNet::BitStream *replyFromTarget ))
|
||||
IGNORERAKPEERANDINTERFACE(RPC( const char* uniqueID, const SLNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RakNetTime *includedTimestamp, NetworkID networkID, SLNet::BitStream *replyFromTarget ))
|
||||
IGNORERAKPEERANDINTERFACE(GetRPCString( const char *data, const BitSize_t bitSize, const SystemAddress systemAddress))
|
||||
IGNORERAKPEERANDINTERFACE(SendOutOfBand(const char *host, unsigned short remotePort, MessageID header, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 ))
|
||||
IGNORERAKPEERANDINTERFACE(SetUserUpdateThread(void (*_userUpdateThreadPtr)(RakPeerInterface *, void *), void *_userUpdateThreadData))
|
||||
IGNORERAKPEERANDINTERFACE(SendList)
|
||||
IGNORERAKPEERANDINTERFACE(ReleaseSockets)
|
||||
IGNORERAKPEERANDINTERFACE(GetSocket( const SystemAddress target ))
|
||||
IGNORERAKPEERANDINTERFACE(GetSockets( DataStructures::List<RakNetSmartPtr<RakNetSocket> > &sockets ))
|
||||
IGNORERAKPEERANDINTERFACE(ConnectWithSocket)
|
||||
IGNORERAKPEERANDINTERFACE(SetRouterInterface)
|
||||
IGNORERAKPEERANDINTERFACE(RemoveRouterInterface)
|
||||
IGNORERAKPEERANDINTERFACE(GetConnectionList( SystemAddress *remoteSystems, unsigned short *numberOfSystems ) const)
|
||||
IGNORERAKPEERANDINTERFACE(SetIncomingDatagramEventHandler( bool (*_incomingDatagramEventHandler)(RNS2RecvStruct *) ))
|
||||
|
||||
//RakPeer only
|
||||
//Swig doesn't know how to handle friend functions, so even if it is in the protected section
|
||||
//They must be explicitly ignored
|
||||
//This Specific case is somehow placed in the SLNet namespace rather than SLNet::RakPeer
|
||||
//Ignore both to be safe
|
||||
%ignore SLNet::RakPeerInterface::GetStatisticsList;
|
||||
%ignore SLNet::RakPeer::GetStatisticsList;
|
||||
%ignore SLNet::RakPeer::ProcessOfflineNetworkPacket;
|
||||
%ignore SLNet::RakPeer::ProcessNetworkPacket;
|
||||
%ignore SLNet::ProcessOfflineNetworkPacket;
|
||||
%ignore SLNet::ProcessNetworkPacket;
|
||||
|
||||
//RakString
|
||||
%ignore AppendBytes(const char *bytes, unsigned int count);//Interface remade
|
||||
%ignore SLNet::RakString::FPrintf(FILE *fp); //Expects C file pointer
|
||||
//RakString Internal
|
||||
%ignore SLNet::RakString::RakString( SharedString *_sharedString );
|
||||
%ignore SLNet::RakString::sharedString;
|
||||
%ignore SLNet::RakString::RakString(const unsigned char *format, ...);
|
||||
%ignore SLNet::RakString::freeList;
|
||||
%ignore SLNet::RakString::emptyString;
|
||||
|
||||
//List
|
||||
%ignore DataStructures::List::operator[];
|
||||
|
||||
//SystemAddress
|
||||
%ignore SLNet::SystemAddress::ToString(bool writePort, char *dest) const;
|
||||
%ignore SLNet::SystemAddress::ToString() const;
|
||||
|
||||
//RakNetGUID
|
||||
%ignore SLNet::RakNetGUID::ToString(char *dest) const;
|
||||
|
||||
//AddressOrGUID
|
||||
%ignore SLNet::AddressOrGUID::ToString(bool writePort, char *dest) const;
|
||||
%ignore SLNet::AddressOrGUID::ToString() const;
|
||||
|
||||
//PacketizedTCP
|
||||
%ignore SLNet::PacketizedTCP::SendList;
|
||||
%ignore SLNet::TCPInterface::SendList;
|
||||
|
||||
//InternalPacket
|
||||
%ignore SLNet::InternalPacket::refCountedData;
|
||||
%ignore SLNet::InternalPacketRefCountedData;
|
||||
|
||||
//RemoteClient
|
||||
%ignore SLNet::RemoteClient::SendOrBuffer;
|
||||
|
||||
//NetworkIDManager
|
||||
%ignore SLNet::NetworkIDManager::GET_OBJECT_FROM_ID;
|
||||
%ignore SLNet::NetworkIDManager::TrackNetworkIDObject;
|
||||
%ignore SLNet::NetworkIDManager::StopTrackingNetworkIDObject;
|
||||
|
||||
//NetworkIDObject
|
||||
%ignore SLNet::NetworkIDObject::SetParent;
|
||||
%ignore SLNet::NetworkIDObject::GetParent;
|
||||
|
||||
//RakNetSocket
|
||||
%ignore RakNetSocket::recvEvent;
|
||||
%ignore RakNetSocket::Fcntl;
|
||||
|
||||
//To allow easier future support if needed, rather than not parsing the PluginInterface2 ignore the functions
|
||||
//Later if decided that is needed remove the ignores and the commented typemaps and includes
|
||||
%ignore SLNet::PluginInterface2::OnAttach;
|
||||
%ignore SLNet::PluginInterface2::OnDetach;
|
||||
%ignore SLNet::PluginInterface2::Update;
|
||||
%ignore SLNet::PluginInterface2::OnReceive;
|
||||
%ignore SLNet::PluginInterface2::OnStartup;
|
||||
%ignore SLNet::PluginInterface2::OnShutdown;
|
||||
%ignore SLNet::PluginInterface2::OnClosedConnection;
|
||||
%ignore SLNet::PluginInterface2::OnNewConnection;
|
||||
%ignore SLNet::PluginInterface2::OnFailedConnectionAttempt;
|
||||
%ignore SLNet::PluginInterface2::OnDirectSocketSend;
|
||||
%ignore SLNet::PluginInterface2::OnInternalPacket;
|
||||
%ignore SLNet::PluginInterface2::OnAck;
|
||||
%ignore SLNet::PluginInterface2::OnPushBackPacket;
|
||||
%ignore SLNet::PluginInterface2::OnDirectSocketReceive;
|
||||
%ignore SLNet::PluginInterface2::OnRakPeerShutdown;
|
||||
%ignore SLNet::PluginInterface2::OnRakPeerStartup;
|
||||
%ignore SLNet::PluginInterface2::OnReliabilityLayerPacketError;
|
||||
|
||||
//NatPunchthroughClient
|
||||
/// \internal For plugin handling
|
||||
%ignore SLNet::NatPunchthroughClient::Update(void);
|
||||
/// \internal For plugin handling
|
||||
%ignore SLNet::NatPunchthroughClient::OnReceive(Packet *packet);
|
||||
/// \internal For plugin handling
|
||||
%ignore SLNet::NatPunchthroughClient::OnNewConnection(SystemAddress systemAddress, RakNetGUID rakNetGUID, bool isIncoming);
|
||||
/// \internal For plugin handling
|
||||
%ignore SLNet::NatPunchthroughClient::OnClosedConnection(SystemAddress systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason );
|
||||
%ignore SLNet::NatPunchthroughClient::OnAttach();
|
||||
%ignore SLNet::NatPunchthroughClient::OnDetach();
|
||||
%ignore SLNet::NatPunchthroughClient::OnRakPeerShutdown();
|
||||
|
||||
//Uin24_t
|
||||
%ignore SLNet::uint24_t::operator++(int);
|
||||
%ignore SLNet::uint24_t::operator--(int);
|
||||
|
||||
//ReadyEvent
|
||||
%ignore SLNet::ReadyEvent::RemoteSystemCompBySystemAddress;
|
||||
%ignore SLNet::ReadyEvent::RemoteSystem;
|
||||
%ignore SLNet::ReadyEvent::ReadyEventNodeComp;
|
||||
%ignore SLNet::ReadyEvent::ReadyEventNode;
|
||||
|
||||
//PacketLoggger
|
||||
%ignore SLNet::PacketLogger::FormatLine;
|
||||
|
||||
//FullyConnectedMesh2
|
||||
%ignore SLNet::FullyConnectedMesh2::GetElapsedRuntime;
|
||||
%ignore SLNet::FullyConnectedMesh2::OnReceive;
|
||||
|
||||
//Structs
|
||||
%ignore SLNet::PI2_FailedConnectionAttemptReason;
|
||||
%ignore SLNet::PI2_LostConnectionReason;
|
||||
//These are internal
|
||||
%ignore SLNet::PluginInterface2::SetRakPeerInterface;
|
||||
%ignore SLNet::PluginInterface2::SetPacketizedTCP;
|
||||
|
||||
//ByteQueue
|
||||
%ignore DataStructures::ByteQueue::WriteBytes(const char *in, unsigned length, const char *file, unsigned int line);
|
||||
%ignore DataStructures::ByteQueue::ReadBytes(char *out, unsigned maxLengthToRead, bool peek);
|
||||
%ignore DataStructures::ByteQueue::PeekContiguousBytes(unsigned int *outLength) const;
|
||||
|
||||
//UDPProxyClient
|
||||
%ignore SLNet::UDPProxyClient::pingServerGroups;
|
||||
%ignore SLNet::UDPProxyClient::OnReceive;
|
||||
|
||||
//NatPunchThroughServer
|
||||
%ignore SLNet::NatPunchthroughServer::NatPunchthroughUserComp;
|
||||
|
||||
//UDPForwarder
|
||||
%ignore SLNet::UDPForwarder::threadOperationIncomingQueue;
|
||||
%ignore SLNet::UDPForwarder::threadOperationOutgoingQueue;
|
||||
%ignore SLNet::UDPForwarder::forwardList;
|
||||
%ignore AddForwardingEntry(SrcAndDest srcAndDest, SLNet::TimeMS timeoutOnNoDataMS, unsigned short *port, const char *forceHostAddress);
|
||||
|
||||
//MessageFilter
|
||||
%ignore SLNet::FilterSet;//internal
|
||||
%ignore SLNet::MessageFilterStrComp;//internal
|
||||
%ignore SLNet::FilterSetComp;//internal
|
||||
%ignore SLNet::FilteredSystem;//internal
|
||||
%ignore SLNet::FilteredSystemComp;//internal
|
||||
%ignore SLNet::MessageFilter::SetDisallowedMessageCallback(int filterSetID, void *userData, void (*invalidMessageCallback)(RakPeerInterface *peer, AddressOrGUID addressOrGUID, int filterSetID, void *userData, unsigned char messageID)); //Void pointer
|
||||
%ignore SLNet::MessageFilter::SetTimeoutCallback(int filterSetID, void *userData, void (*invalidMessageCallback)(RakPeerInterface *peer, AddressOrGUID addressOrGUID, int filterSetID, void *userData)); //Void pointer
|
||||
|
||||
//Table
|
||||
//%ignore DataStructures::Table::GetRows;
|
||||
%ignore DataStructures::Table::GetListHead;
|
||||
%ignore DataStructures::Table::SortTable(Table::SortQuery *sortQueries, unsigned numSortQueries, Table::Row** out);//Completely C# replacement using a helper function
|
||||
%ignore DataStructures::Table::GetCellValueByIndex(unsigned rowIndex, unsigned columnIndex, char *output);
|
||||
%ignore DataStructures::Table::GetCellValueByIndex(unsigned rowIndex, unsigned columnIndex, char *output, int *outputLength);
|
||||
%ignore DataStructures::Table::PrintColumnHeaders(char *out, int outLength, char columnDelineator) const;
|
||||
%ignore DataStructures::Table::PrintRow(char *out, int outLength, char columnDelineator, bool printDelineatorForBinary, Table::Row* inputRow) const;
|
||||
%ignore DataStructures::Table::QueryTable(unsigned *columnIndicesSubset, unsigned numColumnSubset, FilterQuery *inclusionFilters, unsigned numInclusionFilters, unsigned *rowIds, unsigned numRowIDs, Table *result);
|
||||
%ignore UpdateCell(unsigned rowId, unsigned columnIndex, int byteLength, char *data);
|
||||
%ignore UpdateCellByIndex(unsigned rowIndex, unsigned columnIndex, int byteLength, char *data);
|
||||
%ignore Cell::ptr;
|
||||
%ignore Cell::Cell(double numericValue, char *charValue, void *ptr, DataStructures::Table::ColumnType type);
|
||||
%ignore Cell::SetByType(double numericValue, char *charValue, void *ptr, DataStructures::Table::ColumnType type);
|
||||
%ignore Cell::SetPtr;
|
||||
%ignore Row::UpdateCell(unsigned columnIndex, int byteLength, const char *data);
|
||||
%ignore Cell::Get(char *output, int *outputLength);
|
||||
%ignore Cell::Set(const char *input, int inputLength);
|
||||
%ignore Cell::Get(char *output);
|
||||
%ignore Cell::c; //Not really useful externally
|
||||
%ignore ColumnIndex;// Swig will not ignore the definition I wish to, so I ignore both and make helper functions
|
||||
|
||||
//Table Lists
|
||||
%ignore DataStructures::List <ColumnDescriptor>::GetIndexOf;
|
||||
%ignore DataStructures::List <Row>::GetIndexOf;
|
||||
%ignore DataStructures::List <Cell>::GetIndexOf;
|
||||
%ignore DataStructures::List <FilterQuery>::GetIndexOf;
|
||||
%ignore DataStructures::List <SortQuery>::GetIndexOf;
|
||||
|
||||
//BPlusTree
|
||||
//The next two use C function pointers
|
||||
%ignore DataStructures::BPlusTree::ForEachData;
|
||||
%ignore DataStructures::BPlusTree::ForEachLeaf;
|
||||
%ignore DataStructures::Page::keys;
|
||||
%ignore DataStructures::Page::children;
|
||||
%ignore DataStructures::Page::data;
|
||||
|
||||
//FileList Lists
|
||||
%ignore DataStructures::List<SLNet::FileListNode>::GetIndexOf;
|
||||
%ignore SLNet::FileList::GetCallbacks(DataStructures::List<FileListProgress*> &callbacks);
|
||||
|
||||
// FileListTransfer
|
||||
%ignore SLNet::FileListTransfer::GetCallbacks(DataStructures::List<FileListProgress*> &callbacks);
|
||||
%ignore SendIRIToAddressCB(FileListTransfer::ThreadData threadData, bool *returnOutput, void* perThreadData);
|
||||
|
||||
//Bplus
|
||||
%ignore DataStructures::BPlusTree::ValidateTree;
|
||||
|
||||
//File
|
||||
%ignore SLNet::IncrementalReadInterface::GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context);
|
||||
|
||||
//FileList
|
||||
%ignore AddFile(const char *filename, const char *fullPathToFile, const char *data, const unsigned dataLength, const unsigned fileLength, FileListNodeContext context, bool isAReference=false, bool takeDataPointer=false);
|
||||
|
||||
//CommandParserInterface
|
||||
//Internal
|
||||
%ignore RegisteredCommand;
|
||||
%ignore RegisteredCommandComp( const char* const & key, const RegisteredCommand &data );
|
||||
%ignore GetRegisteredCommand(const char *command, RegisteredCommand *rc);
|
||||
%ignore ParseConsoleString(char *str, const char delineator, unsigned char delineatorToggle, unsigned *numParameters, char **parameterList, unsigned parameterListLength);
|
||||
%ignore SendCommandList(TransportInterface *transport, SystemAddress systemAddress);
|
||||
|
||||
//TransportInterface
|
||||
%ignore SLNet::TransportInterface::Send( SystemAddress systemAddress, const char *data, ... );
|
||||
|
||||
//Router2
|
||||
%ignore OnReceive(Packet *packet);
|
||||
|
||||
//MultiList
|
||||
%ignore DataStructures::Multilist::ForEach;
|
||||
|
||||
//ConnectionGraph2
|
||||
%ignore SLNet::ConnectionGraph2::SystemAddressAndGuid;
|
||||
%ignore SLNet::ConnectionGraph2::SystemAddressAndGuidComp;
|
||||
%ignore SLNet::ConnectionGraph2::RemoteSystem;
|
||||
%ignore SLNet::ConnectionGraph2::RemoteSystemComp;
|
||||
%ignore SLNet::ConnectionGraph2::GetConnectionList;
|
||||
%ignore SLNet::ConnectionGraph2::GetParticipantList;
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE
|
||||
//LogParameter
|
||||
%ignore SLNet::LogParameter::LogParameter(void *t);
|
||||
%ignore SLNet::LogParameter::LogParameter(void *t);
|
||||
%ignore SLNet::LogParameter::LogParameter(const unsigned char t[]);
|
||||
%ignore SLNet::LogParameter::LogParameter(const char t[]);
|
||||
%ignore SLNet::LogParameter::LogParameter(BlobDescriptor t);
|
||||
%ignore SLNet::LogParameter::LogParameter(RGBImageBlob t);
|
||||
|
||||
//SQLite3Row List and SQLLite3Table, not pointers so these functions not needed and will error
|
||||
%ignore DataStructures::Multilist<ML_STACK, SLNet::RakString,SLNet::RakString,DefaultIndexType>::GetPtr;
|
||||
%ignore DataStructures::Multilist<ML_STACK, SLNet::RakString,SLNet::RakString,DefaultIndexType>::ClearPointers;
|
||||
%ignore DataStructures::Multilist<ML_STACK, SLNet::RakString,SLNet::RakString,DefaultIndexType>::ClearPointer;
|
||||
|
||||
//common
|
||||
%ignore LogParameter;
|
||||
%ignore BlobDescriptor;
|
||||
%ignore RGBImageBlob;
|
||||
|
||||
//SQLiteClientLogger
|
||||
%ignore SLNet::SQLiteClientLoggerPlugin::CheckQuery;
|
||||
%ignore SLNet::SQLiteClientLoggerPlugin::ParameterListHelper;
|
||||
%ignore SLNet::SQLiteClientLoggerPlugin::SqlLog;
|
||||
%ignore SLNet::SQLiteClientLoggerPlugin::__sqlLogInternal;
|
||||
%ignore SLNet::SQLiteClientLoggerPlugin::logger;
|
||||
#endif
|
||||
|
||||
//Global
|
||||
%ignore REGISTER_STATIC_RPC;
|
||||
%ignore CLASS_MEMBER_ID;
|
||||
%ignore REGISTER_CLASS_MEMBER_RPC;
|
||||
%ignore UNREGISTER_STATIC_RPC;
|
||||
%ignore UNREGISTER_CLASS_MEMBER_RPC;
|
||||
|
||||
//Operators
|
||||
//These need te be handled manually or not at all
|
||||
%ignore operator const char*;
|
||||
%ignore operator wchar_t*;
|
||||
%ignore operator uint32_t;
|
||||
%ignore operator &; //Not overloadable in C#
|
||||
%ignore operator <<;//Doesn't work the same in C#, only usable with int
|
||||
%ignore operator >>;//Doesn't work the same in C#, only usable with int
|
||||
|
||||
//X= is automatically handled in C# if you overload = and X, you can't specify an overload
|
||||
%ignore operator +=;
|
||||
%ignore operator -=;
|
||||
%ignore operator /=;
|
||||
|
||||
//RakString
|
||||
%ignore SLNet::RakString::operator = (char *);
|
||||
%ignore SLNet::RakString::operator == (char *) const;
|
||||
%ignore SLNet::RakString::operator != (char *) const;
|
||||
|
||||
//Structs
|
||||
%ignore RPCParameters;
|
||||
|
||||
//Global
|
||||
%ignore StatisticsToString; //Custom C# wrapper written for it
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
%ignore CreatePatch; //Custom C# wrapper written for it
|
||||
%ignore SLNet::AutopatcherServer::StartThreads;
|
||||
%ignore SLNet::AutopatcherClient::OnThreadCompletion;
|
||||
%ignore SLNet::MemoryCompressor::Compress(char *input, const unsigned inputLength, bool finish);
|
||||
%ignore SLNet::MemoryDecompressor::MemoryDecompress(unsigned char *inputByteArray, const unsigned inputLength, bool ignoreStreamEnd);
|
||||
%ignore CompressorBase::GetOutput;
|
||||
#endif
|
||||
@ -0,0 +1,93 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//----------------------------Method modifiers---------------------
|
||||
//These modify the method types by default it uses just publix x, here you can specify ovverideds private functions
|
||||
//and such. Many times this is used to hide the helper functions from the user
|
||||
|
||||
//BitStream
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpStringReader "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpStringReaderCompressedDelta "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpStringReaderCompressed "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpStringReaderDelta "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpByteReader(unsigned char* inOutByteArray,unsigned int numberOfBytes) "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpCopyDataHelper(unsigned char* inOutByteArray) "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpPrintHexHelper(char * inString) "private"
|
||||
%csmethodmodifiers SLNet::BitStream::CSharpPrintBitsHelper(char * inString) "private"
|
||||
|
||||
//DataStructures::Table
|
||||
%csmethodmodifiers DataStructures::Table::GetListHeadHelper "private"
|
||||
%csmethodmodifiers DataStructures::Table::SortTableHelper "private"
|
||||
%csmethodmodifiers DataStructures::Table::GetCellValueByIndexHelper "private"
|
||||
%csmethodmodifiers DataStructures::Table::QueryTableHelper "private"
|
||||
%csmethodmodifiers DataStructures::Table::ColumnIndexHelper "private"
|
||||
%csmethodmodifiers Cell::GetHelper "private"
|
||||
%csmethodmodifiers Cell::ColumnIndexHelper "private"
|
||||
|
||||
//Rakpeer
|
||||
%define RAKPEERANDINTERFACESETPRIVATE(theMacroInputFunction)
|
||||
%csmethodmodifiers SLNet::RakPeer::theMacroInputFunction "private"
|
||||
%csmethodmodifiers SLNet::RakPeerInterface::theMacroInputFunction "private"
|
||||
%enddef
|
||||
|
||||
RAKPEERANDINTERFACESETPRIVATE(CSharpGetIncomingPasswordHelper( const char* passwordData, int *passwordDataLength ))
|
||||
RAKPEERANDINTERFACESETPRIVATE(CSharpGetOfflinePingResponseHelper( unsigned char *inOutByteArray, unsigned int *outLength ))
|
||||
RAKPEERANDINTERFACESETPRIVATE(GetBandwidth);
|
||||
|
||||
%csmethodmodifiers SLNet::NetworkIDManager::GET_BASE_OBJECT_FROM_ID "protected"
|
||||
|
||||
%csmethodmodifiers SLNet::NetworkIDObject::SetNetworkIDManager "protected"
|
||||
|
||||
%csmethodmodifiers DataStructures::ByteQueue::PeekContiguousBytesHelper "private"
|
||||
|
||||
%csmethodmodifiers SLNet::RakNetGUID::ToString() const "public override"
|
||||
|
||||
%csmethodmodifiers SLNet::StatisticsToStringHelper "private"
|
||||
|
||||
%csmethodmodifiers SLNet::PacketLogger::FormatLineHelper "private"
|
||||
|
||||
%csmethodmodifiers DataStructures::List <unsigned short>::GetHelper "private"
|
||||
%csmethodmodifiers DataStructures::List <unsigned short>::PopHelper "private"
|
||||
|
||||
//FileProgressStruct
|
||||
%csmethodmodifiers FileProgressStruct::SetFirstDataChunk "private"
|
||||
%csmethodmodifiers FileProgressStruct::SetIriDataChunk "private"
|
||||
%csmethodmodifiers OnFileStruct::SetFileData "private"
|
||||
|
||||
//ConnectionGraph2
|
||||
%csmethodmodifiers SLNet::ConnectionGraph2::GetConnectionListForRemoteSystemHelper "private"
|
||||
%csmethodmodifiers SLNet::ConnectionGraph2::GetParticipantListHelper "private"
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
//AutopatcherServer
|
||||
%csmethodmodifiers SLNet::AutopatcherServer::StartThreadsHelper "private"
|
||||
|
||||
%csmethodmodifiers SLNet::CreatePatchHelper "private"
|
||||
#endif
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
%csmethodmodifiers CompressorBase::GetOutputHelper "private";
|
||||
#endif
|
||||
|
||||
//Operators
|
||||
%csmethodmodifiers operator > "private"
|
||||
%csmethodmodifiers operator < "private"
|
||||
%csmethodmodifiers operator != "private"
|
||||
%csmethodmodifiers operator [] "private"
|
||||
%csmethodmodifiers operator >= "private"
|
||||
%csmethodmodifiers operator <= "private"
|
||||
%csmethodmodifiers operator / "private"
|
||||
%csmethodmodifiers operator * "private"
|
||||
%csmethodmodifiers operator -- "private"
|
||||
%csmethodmodifiers operator ++ "private"
|
||||
%csmethodmodifiers operator - "private"
|
||||
%csmethodmodifiers operator + "private"
|
||||
%csmethodmodifiers operator+(const SLNet::RakString &lhs, const SLNet::RakString &rhs) "public" //The global SLikeNet operator should be public
|
||||
@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//----------------Extra Swig PreProcessor------------
|
||||
//To keep everything clean general swig preprocessor commands are stuck here
|
||||
//Alot of items not in here may be preprocessor, but are in thier own section for some reason or another
|
||||
//Defines
|
||||
#ifdef SWIGWIN
|
||||
#define _MSC_VER 10000
|
||||
#define WIN32
|
||||
#define _WIN32
|
||||
#endif
|
||||
|
||||
//typedefs
|
||||
typedef int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef uint32_t DefaultIndexType;
|
||||
#ifdef SWIGWIN
|
||||
typedef unsigned int SOCKET;
|
||||
typedef unsigned int __UDPSOCKET__ ;
|
||||
typedef unsigned int __TCPSOCKET__;
|
||||
#endif
|
||||
typedef SLNet::RakString::SharedString SharedString;
|
||||
//Global Inserts
|
||||
#define SWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR 1;
|
||||
|
||||
//----------------------------Method modifiers---------------------
|
||||
%include "RakNetSwigMacros.i"
|
||||
@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//--------------------------Renames--------------------------------
|
||||
//These are renames, to make the interface a different name than the C++ interface
|
||||
//There are many reasons to do this sometimes the original function is useful but not perfect and a pure
|
||||
//C# helper is created. The original is renamed and hidden.
|
||||
//operators need renaming
|
||||
//Some items may conflict with C#, they would need renaming
|
||||
|
||||
%rename(GET_BASE_OBJECT_FROM_IDORIG) SLNet::NetworkIDManager::GET_BASE_OBJECT_FROM_ID;
|
||||
%rename(SetNetworkIDManagerOrig) SLNet::NetworkIDObject::SetNetworkIDManager;
|
||||
%rename(GetBandwidthOrig) SLNet::RakPeer::GetBandwidth;
|
||||
%rename(GetBandwidthOrig) SLNet::RakPeerInterface::GetBandwidth;
|
||||
%rename(Equals) operator ==;
|
||||
%rename(CopyData) operator =;
|
||||
%rename(OpLess) operator <;
|
||||
%rename(OpGreater) operator >;
|
||||
%rename(OpArray) operator [];
|
||||
%rename(OpLessEquals) operator <=;
|
||||
%rename(OpGreaterEquals) operator >=;
|
||||
%rename(OpNotEqual) operator !=;
|
||||
%rename(OpPlus) operator +;
|
||||
%rename(OpPlusPlus) operator ++;
|
||||
%rename(OpMinusMinus) operator --;
|
||||
%rename(OpMinus) operator -;
|
||||
%rename(OpDivide) operator /;
|
||||
%rename(OpMultiply) operator *;
|
||||
@ -0,0 +1,126 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschränkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
|
||||
//------------------------------Header includes for parsing by swig----------------------------
|
||||
//This is included in a different section than the C++ version of these includes so a macro was not made to include
|
||||
//it in both types
|
||||
//These files are parsed by Swig
|
||||
%include "defines.h"
|
||||
%include "Export.h"
|
||||
%include "NativeFeatureIncludes.h"
|
||||
//%include "smartptr.h"
|
||||
%include "MessageIdentifiers.h"
|
||||
%include "SimpleMutex.h"
|
||||
%include "NativeTypes.h"
|
||||
%include "SocketIncludes.h"
|
||||
%include "types.h"
|
||||
%include "string.h"
|
||||
%include "wstring.h"
|
||||
%include "BitStream.h"
|
||||
%include "DS_List.h"
|
||||
%include "DS_ByteQueue.h"
|
||||
%include "socket.h"
|
||||
%include "statistics.h"
|
||||
%include "NetworkIDObject.h"
|
||||
%include "NetworkIDManager.h"
|
||||
%include "time.h"
|
||||
%include "PacketPriority.h"
|
||||
//The below three classes have been removed from interface, if PluginInterface2 is fully exposed again
|
||||
//or another class needs them uncomment them and the related typemaps
|
||||
//%include "TCPInterface.h"
|
||||
//%include "PacketizedTCP.h"
|
||||
//%include "InternalPacket.h"
|
||||
%include "PluginInterface2.h"
|
||||
%include "peerinterface.h"
|
||||
%include "peer.h"
|
||||
%include "PacketLogger.h"
|
||||
%include "PacketFileLogger.h"
|
||||
%include "NatTypeDetectionClient.h"
|
||||
%include "NatPunchthroughClient.h"
|
||||
%include "Router2.h"
|
||||
%include "UDPProxyClient.h"
|
||||
%include "FullyConnectedMesh2.h"
|
||||
%include "ReadyEvent.h"
|
||||
//%include "TeamBalancer.h"
|
||||
%include "TeamManager.h"
|
||||
%include "NatPunchthroughServer.h"
|
||||
%include "UDPForwarder.h"
|
||||
%include "UDPProxyServer.h"
|
||||
%include "UDPProxyCoordinator.h"
|
||||
%include "NatTypeDetectionServer.h"
|
||||
%include "DS_Table.h"
|
||||
%include "DS_BPlusTree.h"
|
||||
%include "FileListTransferCBInterface.h"
|
||||
%include "IncrementalReadInterface.h"
|
||||
%include "FileListNodeContext.h"
|
||||
%include "FileList.h"
|
||||
%include "TransportInterface.h"
|
||||
%include "CommandParserInterface.h"
|
||||
%include "LogCommandParser.h"
|
||||
%include "MessageFilter.h"
|
||||
%include "DirectoryDeltaTransfer.h"
|
||||
%include "FileListTransfer.h"
|
||||
%include "ThreadsafePacketLogger.h"
|
||||
%include "PacketConsoleLogger.h"
|
||||
%include "PacketFileLogger.h"
|
||||
%include "DS_Multilist.h"
|
||||
%include "ConnectionGraph2.h"
|
||||
%include "GetTime.h"
|
||||
//%include "transport2.h"
|
||||
//%include "RoomsPlugin.h"\
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE
|
||||
%include "SQLite3PluginCommon.h"
|
||||
%include "SQLite3ClientPlugin.h"
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE_SERVER
|
||||
%include "SQLite3ServerPlugin.h"
|
||||
#endif
|
||||
#ifdef SWIGWIN
|
||||
%include "Logger\SQLiteLoggerCommon.h"
|
||||
%include "Logger\ClientOnly\SQLiteClientLoggerPlugin.h"
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE_SERVER
|
||||
%include "Logger\ServerOnly\SQLiteServerLoggerPlugin.h"
|
||||
#endif
|
||||
#else
|
||||
%include "Logger/SQLiteLoggerCommon.h"
|
||||
%include "Logger/ClientOnly/SQLiteClientLoggerPlugin.h"
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE_SERVER
|
||||
%include "Logger/ServerOnly/SQLiteServerLoggerPlugin.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
%include "AutopatcherPatchContext.h"
|
||||
%include "AutopatcherRepositoryInterface.h"
|
||||
#ifdef SWIGWIN
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER_MYSQL
|
||||
%include "MySQLInterface.h"
|
||||
%include "AutopatcherMySQLRepository\AutopatcherMySQLRepository.h"
|
||||
#endif
|
||||
%include "AutopatcherServer.h"
|
||||
%include "AutopatcherClient.h"
|
||||
%include "CreatePatch.h"
|
||||
%include "MemoryCompressor.h"
|
||||
%include "ApplyPatch.h"
|
||||
#else
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER_MYSQL
|
||||
%include "MySQLInterface.h"
|
||||
%include "AutopatcherMySQLRepository/AutopatcherMySQLRepository.h"
|
||||
#endif
|
||||
%include "AutopatcherServer.h"
|
||||
%include "AutopatcherClient.h"
|
||||
%include "CreatePatch.h"
|
||||
%include "MemoryCompressor.h"
|
||||
%include "ApplyPatch.h"
|
||||
#endif
|
||||
#endif
|
||||
@ -0,0 +1,360 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//---------------------------------Template Defines-------------------------
|
||||
//Swig needs to manually define templates you wish to use, this is done here.
|
||||
|
||||
%template(Serialize) SLNet::BitStream::Serialize <bool>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <unsigned char>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <short>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <unsigned short>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <long>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <long long>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <float>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <SLNet::RakString>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <RakNetGUID>;
|
||||
%template(Serialize) SLNet::BitStream::Serialize <uint24_t>;
|
||||
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <bool>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <unsigned char>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <short>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <unsigned short>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <long>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <long long>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <float>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <SLNet::RakString>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <RakNetGUID>;
|
||||
%template(SerializeDelta) SLNet::BitStream::SerializeDelta <uint24_t>;
|
||||
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <bool>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <unsigned char>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <short>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <unsigned short>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <long>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <long long>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <float>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <SLNet::RakString>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <RakNetGUID>;
|
||||
%template(SerializeCompressed) SLNet::BitStream::SerializeCompressed <uint24_t>;
|
||||
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <bool>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <unsigned char>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <short>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <unsigned short>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <long>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <long long>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <float>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <SLNet::RakString>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <RakNetGUID>;
|
||||
%template(SerializeCompressedDelta) SLNet::BitStream::SerializeCompressedDelta <uint24_t>;
|
||||
|
||||
%template(Write) SLNet::BitStream::Write <const char *>;
|
||||
%template(Write) SLNet::BitStream::Write <bool>;
|
||||
%template(Write) SLNet::BitStream::Write <unsigned char>;
|
||||
%template(Write) SLNet::BitStream::Write <char>;
|
||||
%template(Write) SLNet::BitStream::Write <short>;
|
||||
%template(Write) SLNet::BitStream::Write <unsigned short>;
|
||||
%template(Write) SLNet::BitStream::Write <long>;
|
||||
%template(Write) SLNet::BitStream::Write <long long>;
|
||||
%template(Write) SLNet::BitStream::Write <float>;
|
||||
%template(Write) SLNet::BitStream::Write <SLNet::RakString>;
|
||||
%template(Write) SLNet::BitStream::Write <RakNetGUID>;
|
||||
%template(Write) SLNet::BitStream::Write <uint24_t>;
|
||||
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <const char *>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <bool>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <unsigned char>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <char>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <short>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <unsigned short>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <long>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <long long>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <float>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <SLNet::RakString>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <RakNetGUID>;
|
||||
%template(WriteDelta) SLNet::BitStream::WriteDelta <uint24_t>;
|
||||
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <const char*>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <bool>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <unsigned char>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <char>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <short>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <unsigned short>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <long>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <long long>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <float>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <SLNet::RakString>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <RakNetGUID>;
|
||||
%template(WriteCompressed) SLNet::BitStream::WriteCompressed <uint24_t>;
|
||||
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <const char *>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <bool>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <unsigned char>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <char>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <short>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <unsigned short>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <long>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <long long>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <float>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <SLNet::RakString>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <RakNetGUID>;
|
||||
%template(WriteCompressedDelta) SLNet::BitStream::WriteCompressedDelta <uint24_t>;
|
||||
|
||||
%template(Read) SLNet::BitStream::Read <bool>;
|
||||
%template(Read) SLNet::BitStream::Read <unsigned char>;
|
||||
%template(Read) SLNet::BitStream::Read <short>;
|
||||
%template(Read) SLNet::BitStream::Read <unsigned short>;
|
||||
%template(Read) SLNet::BitStream::Read <long>;
|
||||
%template(Read) SLNet::BitStream::Read <long long>;
|
||||
%template(Read) SLNet::BitStream::Read <float>;
|
||||
%template(Read) SLNet::BitStream::Read <SLNet::RakString>;
|
||||
%template(Read) SLNet::BitStream::Read <RakNetGUID>;
|
||||
%template(Read) SLNet::BitStream::Read <uint24_t>;
|
||||
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <bool>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <unsigned char>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <short>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <unsigned short>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <long>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <long long>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <float>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <SLNet::RakString>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <RakNetGUID>;
|
||||
%template(ReadDelta) SLNet::BitStream::ReadDelta <uint24_t>;
|
||||
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <bool>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <unsigned char>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <short>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <unsigned short>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <long>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <long long>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <float>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <SLNet::RakString>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <RakNetGUID>;
|
||||
%template(ReadCompressed) SLNet::BitStream::ReadCompressed <uint24_t>;
|
||||
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <bool>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <unsigned char>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <short>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <unsigned short>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <long>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <long long>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <float>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <SLNet::RakString>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <RakNetGUID>;
|
||||
%template(ReadCompressedDelta) SLNet::BitStream::ReadCompressedDelta <uint24_t>;
|
||||
|
||||
%define ADD_LIST_TYPE(CTYPE,CSTYPE,RENAME_TYPE)
|
||||
%typemap(cscode) DataStructures::List<CTYPE>
|
||||
%{
|
||||
public CSTYPE this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Get((uint)index); // use indexto retrieve and return another value.
|
||||
}
|
||||
set
|
||||
{
|
||||
Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(RENAME_TYPE) DataStructures::List <CTYPE>;
|
||||
%enddef
|
||||
|
||||
ADD_LIST_TYPE(SLNet::RakNetGUID,RakNetGUID,RakNetListRakNetGUID)
|
||||
ADD_LIST_TYPE(SLNet::SystemAddress,SystemAddress,RakNetListSystemAddress)
|
||||
ADD_LIST_TYPE(SLNet::RakString,RakString,RakNetListRakString)
|
||||
ADD_LIST_TYPE(Cell,Cell,RakNetListCell)
|
||||
ADD_LIST_TYPE(ColumnDescriptor,ColumnDescriptor,RakNetListColumnDescriptor)
|
||||
ADD_LIST_TYPE(Row,Row,RakNetListTableRow);
|
||||
ADD_LIST_TYPE(SLNet::FileListNode,FileListNode,RakNetListFileListNode);
|
||||
ADD_LIST_TYPE(FilterQuery,FilterQuery,RakNetListFilterQuery);
|
||||
ADD_LIST_TYPE(SortQuery,SortQuery,RakNetListSortQuery);
|
||||
|
||||
// 1/1/2011 Commented out below line: Doesn't build into RakNet_wrap.cxx properly
|
||||
// %template(RakNetSmartPtrRakNetSocket) RakNetSmartPtr<RakNetSocket>;
|
||||
|
||||
//Can't use the macro because it won't include the space then nested templates won't work
|
||||
/*
|
||||
%typemap(cscode) DataStructures::List<RakNetSmartPtr<RakNetSocket> >
|
||||
%{
|
||||
public RakNetSmartPtrRakNetSocket this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Get((uint)index); // use indexto retrieve and return another value.
|
||||
}
|
||||
set
|
||||
{
|
||||
Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(RakNetListRakNetSmartPtrRakNetSocket) DataStructures::List <RakNetSmartPtr<RakNetSocket> >;
|
||||
*/
|
||||
|
||||
%define ADD_POINTER_LIST_TYPE(CTYPE,CSTYPE,RENAME_TYPE)
|
||||
%ignore DataStructures::List<CTYPE>::Get;
|
||||
%ignore DataStructures::List<CTYPE>::Pop;
|
||||
|
||||
%typemap(cscode) DataStructures::List<CTYPE>
|
||||
%{
|
||||
public CSTYPE this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Get((uint)index); // use indexto retrieve and return another value.
|
||||
}
|
||||
set
|
||||
{
|
||||
Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public CSTYPE Get(uint position)
|
||||
{
|
||||
return GetHelper(position);
|
||||
}
|
||||
|
||||
public CSTYPE Pop()
|
||||
{
|
||||
return PopHelper();
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
%extend DataStructures::List<CTYPE>
|
||||
{
|
||||
CTYPE GetHelper ( const unsigned int position ) const
|
||||
{
|
||||
return self->Get(position);
|
||||
}
|
||||
|
||||
|
||||
CTYPE PopHelper ()
|
||||
{
|
||||
return self->Pop();
|
||||
}
|
||||
}
|
||||
|
||||
%template(RENAME_TYPE) DataStructures::List <CTYPE>;
|
||||
%enddef
|
||||
|
||||
ADD_POINTER_LIST_TYPE(Cell *,Cell,RakNetListCellPointer)
|
||||
#ifdef SWIG_ADDITIONAL_AUTOPATCHER
|
||||
ADD_POINTER_LIST_TYPE(AutopatcherRepositoryInterface *,AutopatcherRepositoryInterface,RakNetListAutopatcherRepositoryInterfacePointer)
|
||||
#endif
|
||||
|
||||
%define ADD_PRIMITIVE_LIST_TYPE(CTYPE,CSTYPE,RENAME_TYPE,SWIG_TYPE,POINTER_NAME)
|
||||
%pointer_class(CTYPE, POINTER_NAME)
|
||||
|
||||
%csmethodmodifiers DataStructures::List <CTYPE>::Get "private"
|
||||
%csmethodmodifiers DataStructures::List <CTYPE>::Pop "private"
|
||||
|
||||
%rename(GetHelper) DataStructures::List <CTYPE>::Get;
|
||||
%rename(PopHelper) DataStructures::List <CTYPE>::Pop;
|
||||
|
||||
%typemap(cscode) DataStructures::List <CTYPE>
|
||||
%{
|
||||
public CSTYPE Get(uint position) {
|
||||
SWIG_TYPE ret = GetHelper(position);
|
||||
return POINTER_NAME.frompointer(ret).value();
|
||||
}
|
||||
|
||||
public CSTYPE Pop() {
|
||||
SWIG_TYPE ret = PopHelper();
|
||||
return POINTER_NAME.frompointer(ret).value();
|
||||
}
|
||||
public CSTYPE this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Get((uint)index); // use indexto retrieve and return another value.
|
||||
}
|
||||
set
|
||||
{
|
||||
Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(RENAME_TYPE) DataStructures::List <CTYPE>;
|
||||
%enddef
|
||||
|
||||
ADD_PRIMITIVE_LIST_TYPE(unsigned short,ushort,RakNetListUnsignedShort,SWIGTYPE_p_unsigned_short,UnsignedShortPointer)
|
||||
ADD_PRIMITIVE_LIST_TYPE(unsigned,uint,RakNetListUnsignedInt,SWIGTYPE_p_unsigned_int,UnsignedIntPointer)
|
||||
|
||||
%template(RakNetPageRow) DataStructures::Page<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>;
|
||||
|
||||
//needed here for scoping issues
|
||||
%ignore DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>::Delete;
|
||||
%ignore DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>::Get;
|
||||
|
||||
%csmethodmodifiers DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>::DeleteHelper "private";
|
||||
%csmethodmodifiers DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>::GetHelper "private";
|
||||
|
||||
%template(RakNetBPlusTreeRow) DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>;
|
||||
|
||||
%typemap(cscode) DataStructures::BPlusTree<unsigned, DataStructures::Table::Row*, _TABLE_BPLUS_TREE_ORDER>
|
||||
%{
|
||||
public bool Get(uint key, ref Row arg1)
|
||||
{
|
||||
bool outBool;
|
||||
|
||||
arg1=GetHelper(key,arg1,out outBool);
|
||||
|
||||
return outBool;
|
||||
}
|
||||
|
||||
public bool Delete(uint key)
|
||||
{
|
||||
return DeleteHelper(key);
|
||||
}
|
||||
|
||||
public bool Delete(uint key, ref Row arg1)
|
||||
{
|
||||
bool outBool;
|
||||
|
||||
arg1=DeleteHelper(key,arg1,out outBool);
|
||||
|
||||
return outBool;
|
||||
}
|
||||
%}
|
||||
|
||||
%define ADD_STANDARD_MULTILIST_TYPE(CTYPE,CSTYPE,RENAME_TYPE)
|
||||
%typemap(cscode) DataStructures::Multilist <ML_STACK,CTYPE,CTYPE,DefaultIndexType>
|
||||
%{
|
||||
public CSTYPE this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return OpArray((uint)index); // use indexto retrieve and return another value.
|
||||
}
|
||||
set
|
||||
{
|
||||
RemoveAtIndex((uint)index);
|
||||
InsertAtIndex(value,(uint)index);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(RENAME_TYPE) DataStructures::Multilist <ML_STACK,CTYPE,CTYPE,DefaultIndexType>;
|
||||
%enddef
|
||||
|
||||
#ifdef SWIG_ADDITIONAL_SQL_LITE
|
||||
ADD_STANDARD_MULTILIST_TYPE(SQLite3Row*,SQLite3Row,RakNetMultiListML_StackSQLite3RowP)
|
||||
ADD_STANDARD_MULTILIST_TYPE(SLNet::RakString,RakString,RakNetMultiListML_StackRakString)
|
||||
ADD_STANDARD_MULTILIST_TYPE(SLNet::SQLite3PluginResultInterface *,SQLite3PluginResultInterface,RakNetMultiListML_StackSQLite3PluginResultInterfaceP)
|
||||
#endif
|
||||
1427
DependentExtensions/Swig/SwigInterfaceFiles/RakNetCSharpTypeMaps.i
Normal file
1427
DependentExtensions/Swig/SwigInterfaceFiles/RakNetCSharpTypeMaps.i
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,200 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschr<68>nkt)
|
||||
//
|
||||
// This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
// license found in the license.txt file in the root directory of this source tree.
|
||||
|
||||
//----------------------------Additional Class/Struct Defines-----------------------
|
||||
//These is here because it is a nested class and swig doesn't handle nested/structs/classes, this presents the interface for this struct. If the struct changes in the code so must this
|
||||
|
||||
//These are DataStructures::Table
|
||||
|
||||
/// Stores the name and type of the column
|
||||
/// \internal
|
||||
struct ColumnDescriptor
|
||||
{
|
||||
ColumnDescriptor();
|
||||
~ColumnDescriptor();
|
||||
ColumnDescriptor(const char cn[_TABLE_MAX_COLUMN_NAME_LENGTH],DataStructures::Table::ColumnType ct);
|
||||
|
||||
char columnName[_TABLE_MAX_COLUMN_NAME_LENGTH];
|
||||
DataStructures::Table::ColumnType columnType;
|
||||
};
|
||||
|
||||
struct Cell
|
||||
{
|
||||
Cell();
|
||||
~Cell();
|
||||
Cell(double numericValue, char *charValue, void *ptr, DataStructures::Table::ColumnType type);
|
||||
void SetByType(double numericValue, char *charValue, void *ptr, DataStructures::Table::ColumnType type);
|
||||
void Clear(void);
|
||||
|
||||
/// Numeric
|
||||
void Set(int input);
|
||||
void Set(unsigned int input);
|
||||
void Set(double input);
|
||||
|
||||
/// String
|
||||
void Set(const char *input);
|
||||
|
||||
/// Binary
|
||||
void Set(const char *input, int inputLength);
|
||||
|
||||
/// Pointer
|
||||
void SetPtr(void* p);
|
||||
|
||||
/// Numeric
|
||||
void Get(int *output);
|
||||
void Get(double *output);
|
||||
|
||||
/// String
|
||||
void Get(char *output);
|
||||
|
||||
/// Binary
|
||||
void Get(char *output, int *outputLength);
|
||||
|
||||
SLNet::RakString ToString(DataStructures::Table::ColumnType columnType);
|
||||
|
||||
// assignment operator and copy constructor
|
||||
Cell& operator = ( const Cell& input );
|
||||
Cell( const Cell & input);
|
||||
|
||||
DataStructures::Table::ColumnType EstimateColumnType(void) const;
|
||||
|
||||
bool isEmpty;
|
||||
double i;
|
||||
char *c;
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
/// Stores the list of cells for this row, and a special flag used for internal sorting
|
||||
struct Row
|
||||
{
|
||||
// list of cells
|
||||
DataStructures::List<Cell*> cells;
|
||||
|
||||
/// Numeric
|
||||
void UpdateCell(unsigned columnIndex, double value);
|
||||
|
||||
/// String
|
||||
void UpdateCell(unsigned columnIndex, const char *str);
|
||||
|
||||
/// Binary
|
||||
void UpdateCell(unsigned columnIndex, int byteLength, const char *data);
|
||||
};
|
||||
|
||||
// Compare the cell value for a row at columnName to the cellValue using operation.
|
||||
struct FilterQuery
|
||||
{
|
||||
FilterQuery();
|
||||
~FilterQuery();
|
||||
FilterQuery(unsigned column, Cell *cell, DataStructures::Table::FilterQueryType op);
|
||||
|
||||
// If columnName is specified, columnIndex will be looked up using it.
|
||||
char columnName[_TABLE_MAX_COLUMN_NAME_LENGTH];
|
||||
unsigned columnIndex;
|
||||
Cell *cellValue;
|
||||
DataStructures::Table::FilterQueryType operation;
|
||||
};
|
||||
|
||||
|
||||
// Sort on increasing or decreasing order for a particular column
|
||||
struct SortQuery
|
||||
{
|
||||
/// The index of the table column we are sorting on
|
||||
unsigned columnIndex;
|
||||
|
||||
/// See SortQueryType
|
||||
DataStructures::Table::SortQueryType operation;
|
||||
};
|
||||
|
||||
|
||||
//FileListTransferCBInterFace
|
||||
struct OnFileStruct
|
||||
{
|
||||
/// \brief The index into the set of files, from 0 to numberOfFilesInThisSet
|
||||
unsigned fileIndex;
|
||||
|
||||
/// \brief The name of the file
|
||||
char fileName[512];
|
||||
|
||||
/// \brief The data pointed to by the file
|
||||
char *fileData;
|
||||
|
||||
/// \brief The actual length of this file.
|
||||
BitSize_t byteLengthOfThisFile;
|
||||
|
||||
/// \brief How many bytes of this file has been downloaded
|
||||
BitSize_t bytesDownloadedForThisFile;
|
||||
|
||||
/// \brief Files are transmitted in sets, where more than one set of files can be transmitted at the same time.
|
||||
/// \details This is the identifier for the set, which is returned by FileListTransfer::SetupReceive
|
||||
unsigned short setID;
|
||||
|
||||
/// \brief The number of files that are in this set.
|
||||
unsigned numberOfFilesInThisSet;
|
||||
|
||||
/// \brief The total length of the transmitted files for this set, after being uncompressed
|
||||
unsigned byteLengthOfThisSet;
|
||||
|
||||
/// \brief The total length, in bytes, downloaded for this set.
|
||||
unsigned bytesDownloadedForThisSet;
|
||||
|
||||
/// \brief User data passed to one of the functions in the FileList class.
|
||||
/// \details However, on error, this is instead changed to one of the enumerations in the PatchContext structure.
|
||||
FileListNodeContext context;
|
||||
|
||||
/// \brief Who sent this file
|
||||
SystemAddress senderSystemAddress;
|
||||
|
||||
/// \brief Who sent this file. Not valid when using TCP, only RakPeer (UDP)
|
||||
RakNetGUID senderGuid;
|
||||
};
|
||||
|
||||
struct FileProgressStruct
|
||||
{
|
||||
/// \param[out] onFileStruct General information about this file, such as the filename and the first \a partLength bytes. You do NOT need to save this data yourself. The complete file will arrive normally.
|
||||
OnFileStruct *onFileStruct;
|
||||
/// \param[out] partCount The zero based index into partTotal. The percentage complete done of this file is 100 * (partCount+1)/partTotal
|
||||
unsigned int partCount;
|
||||
/// \param[out] partTotal The total number of parts this file was split into. Each part will be roughly the MTU size, minus the UDP header and SLikeNet headers
|
||||
unsigned int partTotal;
|
||||
/// \param[out] dataChunkLength How many bytes long firstDataChunk and iriDataChunk are
|
||||
unsigned int dataChunkLength;
|
||||
/// \param[out] firstDataChunk The first \a partLength of the final file. If you store identifying information about the file in the first \a partLength bytes, you can read them while the download is taking place. If this hasn't arrived yet, firstDataChunk will be 0
|
||||
char *firstDataChunk;
|
||||
/// \param[out] iriDataChunk If the remote system is sending this file using IncrementalReadInterface, then this is the chunk we just downloaded. It will not exist in memory after this callback. You should either store this to disk, or in memory. If it is 0, then the file is smaller than one chunk, and will be held in memory automatically
|
||||
char *iriDataChunk;
|
||||
/// \param[out] iriWriteOffset Offset in bytes from the start of the file for the data pointed to by iriDataChunk
|
||||
unsigned int iriWriteOffset;
|
||||
/// \param[out] Who sent this file
|
||||
SystemAddress senderSystemAddress;
|
||||
/// \param[out] Who sent this file. Not valid when using TCP, only RakPeer (UDP)
|
||||
RakNetGUID senderGuid;
|
||||
/// \param[in] allocateIrIDataChunkAutomatically If true, then SLikeNet will hold iriDataChunk for you and return it in OnFile. Defaults to true
|
||||
bool allocateIrIDataChunkAutomatically;
|
||||
};
|
||||
|
||||
struct DownloadCompleteStruct
|
||||
{
|
||||
/// \brief Files are transmitted in sets, where more than one set of files can be transmitted at the same time.
|
||||
/// \details This is the identifier for the set, which is returned by FileListTransfer::SetupReceive
|
||||
unsigned short setID;
|
||||
|
||||
/// \brief The number of files that are in this set.
|
||||
unsigned numberOfFilesInThisSet;
|
||||
|
||||
/// \brief The total length of the transmitted files for this set, after being uncompressed
|
||||
unsigned byteLengthOfThisSet;
|
||||
|
||||
/// \brief Who sent this file
|
||||
SystemAddress senderSystemAddress;
|
||||
|
||||
/// \brief Who sent this file. Not valid when using TCP, only RakPeer (UDP)
|
||||
RakNetGUID senderGuid;
|
||||
};
|
||||
@ -0,0 +1,30 @@
|
||||
//
|
||||
// This file was taken from RakNet 4.082 without any modifications.
|
||||
// Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
//
|
||||
|
||||
//Macros that are not in a specific file are placed here, note that not all macros are here some are spread throughout the other files
|
||||
|
||||
//This you only need it once for all simple situations
|
||||
%define SIMPLE_OBJECT_OUTPUT_TYPEMAP(CTYPE, CSTYPE)
|
||||
%typemap(ctype) CTYPE *OUTPUT, CTYPE &OUTPUT "CTYPE *"
|
||||
%typemap(cstype) CTYPE *OUTPUT, CTYPE &OUTPUT "out CSTYPE"
|
||||
%typemap(csin,
|
||||
pre=" CSTYPE temp$csinput = new CSTYPE();",
|
||||
post=" $csinput = temp$csinput;",
|
||||
cshin="ref $csinput"
|
||||
) CTYPE *OUTPUT, CTYPE &OUTPUT "CSTYPE.getCPtr(temp$csinput)"
|
||||
|
||||
%typemap(csdirectorin) CTYPE *OUTPUT, CTYPE &OUTPUT "$iminput"
|
||||
%typemap(csdirectorout) CTYPE *OUTPUT, CTYPE &OUTPUT "$cscall"
|
||||
|
||||
%typemap(in) CTYPE *OUTPUT, CTYPE &OUTPUT
|
||||
%{ $1 = ($1_ltype)$input; %}
|
||||
|
||||
%typemap(directorout,warning="Need to provide CTYPE *OUTPUT directorout typemap") TYPE *OUTPUT, TYPE &OUTPUT {
|
||||
}
|
||||
|
||||
%typemap(directorin) CTYPE &OUTPUT
|
||||
%{ $input = &$1; %}
|
||||
|
||||
%enddef
|
||||
Reference in New Issue
Block a user