UDPProxyClientResultHandler.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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 UDPProxyClientResultHandler : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal UDPProxyClientResultHandler(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(UDPProxyClientResultHandler obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~UDPProxyClientResultHandler() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. RakNetPINVOKE.delete_UDPProxyClientResultHandler(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public UDPProxyClientResultHandler() : this(RakNetPINVOKE.new_UDPProxyClientResultHandler(), true) {
  37. SwigDirectorConnect();
  38. }
  39. public virtual void OnForwardingSuccess(string proxyIPAddress, ushort proxyPort, SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  40. RakNetPINVOKE.UDPProxyClientResultHandler_OnForwardingSuccess(swigCPtr, proxyIPAddress, proxyPort, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  41. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  42. }
  43. public virtual void OnForwardingNotification(string proxyIPAddress, ushort proxyPort, SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  44. RakNetPINVOKE.UDPProxyClientResultHandler_OnForwardingNotification(swigCPtr, proxyIPAddress, proxyPort, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  45. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  46. }
  47. public virtual void OnNoServersOnline(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  48. RakNetPINVOKE.UDPProxyClientResultHandler_OnNoServersOnline(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  49. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  50. }
  51. public virtual void OnRecipientNotConnected(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  52. RakNetPINVOKE.UDPProxyClientResultHandler_OnRecipientNotConnected(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  53. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  54. }
  55. public virtual void OnAllServersBusy(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  56. RakNetPINVOKE.UDPProxyClientResultHandler_OnAllServersBusy(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  57. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  58. }
  59. public virtual void OnForwardingInProgress(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) {
  60. RakNetPINVOKE.UDPProxyClientResultHandler_OnForwardingInProgress(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin));
  61. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  62. }
  63. private void SwigDirectorConnect() {
  64. if (SwigDerivedClassHasMethod("OnForwardingSuccess", swigMethodTypes0))
  65. swigDelegate0 = new SwigDelegateUDPProxyClientResultHandler_0(SwigDirectorOnForwardingSuccess);
  66. if (SwigDerivedClassHasMethod("OnForwardingNotification", swigMethodTypes1))
  67. swigDelegate1 = new SwigDelegateUDPProxyClientResultHandler_1(SwigDirectorOnForwardingNotification);
  68. if (SwigDerivedClassHasMethod("OnNoServersOnline", swigMethodTypes2))
  69. swigDelegate2 = new SwigDelegateUDPProxyClientResultHandler_2(SwigDirectorOnNoServersOnline);
  70. if (SwigDerivedClassHasMethod("OnRecipientNotConnected", swigMethodTypes3))
  71. swigDelegate3 = new SwigDelegateUDPProxyClientResultHandler_3(SwigDirectorOnRecipientNotConnected);
  72. if (SwigDerivedClassHasMethod("OnAllServersBusy", swigMethodTypes4))
  73. swigDelegate4 = new SwigDelegateUDPProxyClientResultHandler_4(SwigDirectorOnAllServersBusy);
  74. if (SwigDerivedClassHasMethod("OnForwardingInProgress", swigMethodTypes5))
  75. swigDelegate5 = new SwigDelegateUDPProxyClientResultHandler_5(SwigDirectorOnForwardingInProgress);
  76. RakNetPINVOKE.UDPProxyClientResultHandler_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5);
  77. }
  78. private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
  79. System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
  80. bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(UDPProxyClientResultHandler));
  81. return hasDerivedMethod;
  82. }
  83. private void SwigDirectorOnForwardingSuccess(string proxyIPAddress, ushort proxyPort, IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  84. OnForwardingSuccess(proxyIPAddress, proxyPort, new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  85. }
  86. private void SwigDirectorOnForwardingNotification(string proxyIPAddress, ushort proxyPort, IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  87. OnForwardingNotification(proxyIPAddress, proxyPort, new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  88. }
  89. private void SwigDirectorOnNoServersOnline(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  90. OnNoServersOnline(new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  91. }
  92. private void SwigDirectorOnRecipientNotConnected(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  93. OnRecipientNotConnected(new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  94. }
  95. private void SwigDirectorOnAllServersBusy(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  96. OnAllServersBusy(new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  97. }
  98. private void SwigDirectorOnForwardingInProgress(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin) {
  99. OnForwardingInProgress(new SystemAddress(proxyCoordinator, false), new SystemAddress(sourceAddress, false), new SystemAddress(targetAddress, false), new RakNetGUID(targetGuid, false), (proxyClientPlugin == IntPtr.Zero) ? null : new UDPProxyClient(proxyClientPlugin, false));
  100. }
  101. public delegate void SwigDelegateUDPProxyClientResultHandler_0(string proxyIPAddress, ushort proxyPort, IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  102. public delegate void SwigDelegateUDPProxyClientResultHandler_1(string proxyIPAddress, ushort proxyPort, IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  103. public delegate void SwigDelegateUDPProxyClientResultHandler_2(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  104. public delegate void SwigDelegateUDPProxyClientResultHandler_3(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  105. public delegate void SwigDelegateUDPProxyClientResultHandler_4(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  106. public delegate void SwigDelegateUDPProxyClientResultHandler_5(IntPtr proxyCoordinator, IntPtr sourceAddress, IntPtr targetAddress, IntPtr targetGuid, IntPtr proxyClientPlugin);
  107. private SwigDelegateUDPProxyClientResultHandler_0 swigDelegate0;
  108. private SwigDelegateUDPProxyClientResultHandler_1 swigDelegate1;
  109. private SwigDelegateUDPProxyClientResultHandler_2 swigDelegate2;
  110. private SwigDelegateUDPProxyClientResultHandler_3 swigDelegate3;
  111. private SwigDelegateUDPProxyClientResultHandler_4 swigDelegate4;
  112. private SwigDelegateUDPProxyClientResultHandler_5 swigDelegate5;
  113. private static Type[] swigMethodTypes0 = new Type[] { typeof(string), typeof(ushort), typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  114. private static Type[] swigMethodTypes1 = new Type[] { typeof(string), typeof(ushort), typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  115. private static Type[] swigMethodTypes2 = new Type[] { typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  116. private static Type[] swigMethodTypes3 = new Type[] { typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  117. private static Type[] swigMethodTypes4 = new Type[] { typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  118. private static Type[] swigMethodTypes5 = new Type[] { typeof(SystemAddress), typeof(SystemAddress), typeof(SystemAddress), typeof(RakNetGUID), typeof(UDPProxyClient) };
  119. }
  120. }
粤ICP备19079148号