[raknet] Use char* instead of unsigned char* for RPC IDs

This commit is contained in:
RD42 2024-01-19 23:27:06 +08:00
parent e8e01ebc66
commit 62520c40e7
9 changed files with 29 additions and 29 deletions

View File

@ -118,17 +118,17 @@ void RakClient::vftable_54()
// TODO: RakClient::vftable_54() (saco 10034A70) (server L: 8069340) (bot W: 4032B0 L: 806CD3E) // TODO: RakClient::vftable_54() (saco 10034A70) (server L: 8069340) (bot W: 4032B0 L: 806CD3E)
} }
void RakClient::RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ) void RakClient::RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )
{ {
RakPeer::RegisterAsRemoteProcedureCall( uniqueID, functionPointer ); RakPeer::RegisterAsRemoteProcedureCall( uniqueID, functionPointer );
} }
void RakClient::RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ) void RakClient::RegisterClassMemberRPC( char* uniqueID, void *functionPointer )
{ {
RakPeer::RegisterClassMemberRPC( uniqueID, functionPointer ); RakPeer::RegisterClassMemberRPC( uniqueID, functionPointer );
} }
void RakClient::UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ) void RakClient::UnregisterAsRemoteProcedureCall( char* uniqueID )
{ {
RakPeer::UnregisterAsRemoteProcedureCall( uniqueID ); RakPeer::UnregisterAsRemoteProcedureCall( uniqueID );
} }

View File

@ -40,19 +40,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions /// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions
/// \param[in] functionPointer(...): The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer(...): The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ); void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) );
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC /// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC
/// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa ObjectMemberRPC.cpp /// \sa ObjectMemberRPC.cpp
void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ); void RegisterClassMemberRPC( char* uniqueID, void *functionPointer );
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline /// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall
void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ); void UnregisterAsRemoteProcedureCall( char* uniqueID );
void vftable_64(); void vftable_64();
void vftable_68(); void vftable_68();

View File

@ -35,19 +35,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions /// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions
/// \param[in] functionPointer(...): The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer(...): The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
virtual void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0; virtual void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0;
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC /// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC
/// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa ObjectMemberRPC.cpp /// \sa ObjectMemberRPC.cpp
virtual void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer )=0; virtual void RegisterClassMemberRPC( char* uniqueID, void *functionPointer )=0;
///\ingroup RAKNET_RPC ///\ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline /// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall
virtual void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID )=0; virtual void UnregisterAsRemoteProcedureCall( char* uniqueID )=0;
virtual void vftable_64()=0; virtual void vftable_64()=0;
virtual void vftable_68()=0; virtual void vftable_68()=0;

View File

@ -148,20 +148,20 @@ void RakPeer::vftable_40()
// This can be called whether the client is active or not, and registered functions stay registered unless unregistered with // This can be called whether the client is active or not, and registered functions stay registered unless unregistered with
// UnregisterAsRemoteProcedureCall // UnregisterAsRemoteProcedureCall
// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void RakPeer::RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ) void RakPeer::RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )
{ {
if ( uniqueID == 0 || uniqueID[ 0 ] == 0 || functionPointer == 0 ) if ( uniqueID == 0 || uniqueID[ 0 ] == 0 || functionPointer == 0 )
return; return;
rpcMap.AddIdentifierWithFunction(*uniqueID, (void*)functionPointer, false); rpcMap.AddIdentifierWithFunction((unsigned char)*uniqueID, (void*)functionPointer, false);
} }
void RakPeer::RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ) void RakPeer::RegisterClassMemberRPC( char* uniqueID, void *functionPointer )
{ {
if ( uniqueID == 0 || uniqueID[ 0 ] == 0 || functionPointer == 0 ) if ( uniqueID == 0 || uniqueID[ 0 ] == 0 || functionPointer == 0 )
return; return;
rpcMap.AddIdentifierWithFunction(*uniqueID, functionPointer, true); rpcMap.AddIdentifierWithFunction((unsigned char)*uniqueID, functionPointer, true);
} }
// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -173,7 +173,7 @@ void RakPeer::RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPoi
// uniqueID: A null terminated string to identify this procedure. Must match the parameter // uniqueID: A null terminated string to identify this procedure. Must match the parameter
// passed to RegisterAsRemoteProcedureCall // passed to RegisterAsRemoteProcedureCall
// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
void RakPeer::UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ) void RakPeer::UnregisterAsRemoteProcedureCall( char* uniqueID )
{ {
// nothing // nothing
} }

View File

@ -57,19 +57,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID A null-terminated unique string to identify this procedure. See RegisterClassMemberRPC() for class member functions. /// \param[in] uniqueID A null-terminated unique string to identify this procedure. See RegisterClassMemberRPC() for class member functions.
/// \param[in] functionPointer(...) The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer(...) The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ); void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) );
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID A null terminated string to identify this procedure. Recommended you use the macro REGISTER_CLASS_MEMBER_RPC to create the string. Use RegisterAsRemoteProcedureCall() for static functions. /// \param[in] uniqueID A null terminated string to identify this procedure. Recommended you use the macro REGISTER_CLASS_MEMBER_RPC to create the string. Use RegisterAsRemoteProcedureCall() for static functions.
/// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa The sample ObjectMemberRPC.cpp /// \sa The sample ObjectMemberRPC.cpp
void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ); void RegisterClassMemberRPC( char* uniqueID, void *functionPointer );
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registered with RegisterAsRemoteProcedureCall. Only call offline. /// Unregisters a C function as available for calling as a remote procedure call that was formerly registered with RegisterAsRemoteProcedureCall. Only call offline.
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions.
void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ); void UnregisterAsRemoteProcedureCall( char* uniqueID );
void vftable_50(); void vftable_50();
void vftable_54(); void vftable_54();

View File

@ -54,19 +54,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID A null-terminated unique string to identify this procedure. See RegisterClassMemberRPC() for class member functions. /// \param[in] uniqueID A null-terminated unique string to identify this procedure. See RegisterClassMemberRPC() for class member functions.
/// \param[in] functionPointer(...) The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer(...) The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
virtual void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0; virtual void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0;
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID A null terminated string to identify this procedure. Recommended you use the macro REGISTER_CLASS_MEMBER_RPC to create the string. Use RegisterAsRemoteProcedureCall() for static functions. /// \param[in] uniqueID A null terminated string to identify this procedure. Recommended you use the macro REGISTER_CLASS_MEMBER_RPC to create the string. Use RegisterAsRemoteProcedureCall() for static functions.
/// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa The sample ObjectMemberRPC.cpp /// \sa The sample ObjectMemberRPC.cpp
virtual void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer )=0; virtual void RegisterClassMemberRPC( char* uniqueID, void *functionPointer )=0;
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registered with RegisterAsRemoteProcedureCall. Only call offline. /// Unregisters a C function as available for calling as a remote procedure call that was formerly registered with RegisterAsRemoteProcedureCall. Only call offline.
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions.
virtual void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID )=0; virtual void UnregisterAsRemoteProcedureCall( char* uniqueID )=0;
virtual void vftable_50()=0; virtual void vftable_50()=0;
virtual void vftable_54()=0; virtual void vftable_54()=0;

View File

@ -147,17 +147,17 @@ void RakServer::vftable_70()
// TODO: RakServer::vftable_70() (server W: 45A450 L: 807C060) // TODO: RakServer::vftable_70() (server W: 45A450 L: 807C060)
} }
void RakServer::RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ) void RakServer::RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )
{ {
RakPeer::RegisterAsRemoteProcedureCall( uniqueID, functionPointer ); RakPeer::RegisterAsRemoteProcedureCall( uniqueID, functionPointer );
} }
void RakServer::RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ) void RakServer::RegisterClassMemberRPC( char* uniqueID, void *functionPointer )
{ {
RakPeer::RegisterClassMemberRPC( uniqueID, functionPointer ); RakPeer::RegisterClassMemberRPC( uniqueID, functionPointer );
} }
void RakServer::UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ) void RakServer::UnregisterAsRemoteProcedureCall( char* uniqueID )
{ {
RakPeer::UnregisterAsRemoteProcedureCall( uniqueID ); RakPeer::UnregisterAsRemoteProcedureCall( uniqueID );
} }

View File

@ -59,19 +59,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions /// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions
/// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) ); void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) );
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC /// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC
/// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa ObjectMemberRPC.cpp /// \sa ObjectMemberRPC.cpp
void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer ); void RegisterClassMemberRPC( char* uniqueID, void *functionPointer );
///\ingroup RAKNET_RPC ///\ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline /// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall
void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID ); void UnregisterAsRemoteProcedureCall( char* uniqueID );
void vftable_80(); void vftable_80();
void vftable_84(); void vftable_84();

View File

@ -56,19 +56,19 @@ public:
/// Register a C or static member function as available for calling as a remote procedure call /// Register a C or static member function as available for calling as a remote procedure call
/// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions /// \param[in] uniqueID: A null-terminated unique string to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions
/// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered /// \param[in] functionPointer The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered
virtual void RegisterAsRemoteProcedureCall( unsigned char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0; virtual void RegisterAsRemoteProcedureCall( char* uniqueID, void ( *functionPointer ) ( RPCParameters *rpcParms ) )=0;
/// \ingroup RAKNET_RPC /// \ingroup RAKNET_RPC
/// Register a C++ member function as available for calling as a remote procedure call. /// Register a C++ member function as available for calling as a remote procedure call.
/// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC /// \param[in] uniqueID: A null terminated string to identify this procedure.Recommended you use the macro REGISTER_CLASS_MEMBER_RPC
/// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall /// \param[in] functionPointer: The name of the function to be used as a function pointer. This can be called whether active or not, and registered functions stay registered unless unregistered with UnregisterAsRemoteProcedureCall
/// \sa ObjectMemberRPC.cpp /// \sa ObjectMemberRPC.cpp
virtual void RegisterClassMemberRPC( unsigned char* uniqueID, void *functionPointer )=0; virtual void RegisterClassMemberRPC( char* uniqueID, void *functionPointer )=0;
///\ingroup RAKNET_RPC ///\ingroup RAKNET_RPC
/// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline /// Unregisters a C function as available for calling as a remote procedure call that was formerly registeredwith RegisterAsRemoteProcedureCallOnly call offline
/// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall /// \param[in] uniqueID A string of only letters to identify this procedure. Recommended you use the macro CLASS_MEMBER_ID for class member functions. Must match the parameterpassed to RegisterAsRemoteProcedureCall
virtual void UnregisterAsRemoteProcedureCall( unsigned char* uniqueID )=0; virtual void UnregisterAsRemoteProcedureCall( char* uniqueID )=0;
virtual void vftable_80()=0; virtual void vftable_80()=0;
virtual void vftable_84()=0; virtual void vftable_84()=0;