FullyConnectedMesh2.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.1
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace RakNet {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class FullyConnectedMesh2 : PluginInterface2 {
  12. private HandleRef swigCPtr;
  13. internal FullyConnectedMesh2(IntPtr cPtr, bool cMemoryOwn) : base(RakNetPINVOKE.FullyConnectedMesh2_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(FullyConnectedMesh2 obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~FullyConnectedMesh2() {
  20. Dispose();
  21. }
  22. public override void Dispose() {
  23. lock(this) {
  24. if (swigCPtr.Handle != IntPtr.Zero) {
  25. if (swigCMemOwn) {
  26. swigCMemOwn = false;
  27. RakNetPINVOKE.delete_FullyConnectedMesh2(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public static FullyConnectedMesh2 GetInstance() {
  36. IntPtr cPtr = RakNetPINVOKE.FullyConnectedMesh2_GetInstance();
  37. FullyConnectedMesh2 ret = (cPtr == IntPtr.Zero) ? null : new FullyConnectedMesh2(cPtr, false);
  38. return ret;
  39. }
  40. public static void DestroyInstance(FullyConnectedMesh2 i) {
  41. RakNetPINVOKE.FullyConnectedMesh2_DestroyInstance(FullyConnectedMesh2.getCPtr(i));
  42. }
  43. public FullyConnectedMesh2() : this(RakNetPINVOKE.new_FullyConnectedMesh2(), true) {
  44. }
  45. public void SetConnectOnNewRemoteConnection(bool attemptConnection, RakString pw) {
  46. RakNetPINVOKE.FullyConnectedMesh2_SetConnectOnNewRemoteConnection(swigCPtr, attemptConnection, RakString.getCPtr(pw));
  47. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  48. }
  49. public RakNetGUID GetConnectedHost() {
  50. RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.FullyConnectedMesh2_GetConnectedHost(swigCPtr), true);
  51. return ret;
  52. }
  53. public SystemAddress GetConnectedHostAddr() {
  54. SystemAddress ret = new SystemAddress(RakNetPINVOKE.FullyConnectedMesh2_GetConnectedHostAddr(swigCPtr), true);
  55. return ret;
  56. }
  57. public RakNetGUID GetHostSystem() {
  58. RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.FullyConnectedMesh2_GetHostSystem(swigCPtr), true);
  59. return ret;
  60. }
  61. public bool IsHostSystem() {
  62. bool ret = RakNetPINVOKE.FullyConnectedMesh2_IsHostSystem(swigCPtr);
  63. return ret;
  64. }
  65. public void GetHostOrder(RakNetListRakNetGUID hostList) {
  66. RakNetPINVOKE.FullyConnectedMesh2_GetHostOrder(swigCPtr, RakNetListRakNetGUID.getCPtr(hostList));
  67. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  68. }
  69. public bool IsConnectedHost() {
  70. bool ret = RakNetPINVOKE.FullyConnectedMesh2_IsConnectedHost(swigCPtr);
  71. return ret;
  72. }
  73. public void SetAutoparticipateConnections(bool b) {
  74. RakNetPINVOKE.FullyConnectedMesh2_SetAutoparticipateConnections(swigCPtr, b);
  75. }
  76. public void ResetHostCalculation() {
  77. RakNetPINVOKE.FullyConnectedMesh2_ResetHostCalculation(swigCPtr);
  78. }
  79. public void AddParticipant(RakNetGUID rakNetGuid) {
  80. RakNetPINVOKE.FullyConnectedMesh2_AddParticipant(swigCPtr, RakNetGUID.getCPtr(rakNetGuid));
  81. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  82. }
  83. public void GetParticipantList(RakNetListRakNetGUID participantList) {
  84. RakNetPINVOKE.FullyConnectedMesh2_GetParticipantList(swigCPtr, RakNetListRakNetGUID.getCPtr(participantList));
  85. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  86. }
  87. public void ConnectToRemoteNewIncomingConnections(Packet packet) {
  88. RakNetPINVOKE.FullyConnectedMesh2_ConnectToRemoteNewIncomingConnections(swigCPtr, Packet.getCPtr(packet));
  89. }
  90. public void Clear() {
  91. RakNetPINVOKE.FullyConnectedMesh2_Clear(swigCPtr);
  92. }
  93. public uint GetParticipantCount() {
  94. uint ret = RakNetPINVOKE.FullyConnectedMesh2_GetParticipantCount__SWIG_0(swigCPtr);
  95. return ret;
  96. }
  97. public void GetParticipantCount(SWIGTYPE_p_unsigned_int participantListSize) {
  98. RakNetPINVOKE.FullyConnectedMesh2_GetParticipantCount__SWIG_1(swigCPtr, SWIGTYPE_p_unsigned_int.getCPtr(participantListSize));
  99. }
  100. public uint GetTotalConnectionCount() {
  101. uint ret = RakNetPINVOKE.FullyConnectedMesh2_GetTotalConnectionCount(swigCPtr);
  102. return ret;
  103. }
  104. }
  105. }
粤ICP备19079148号