FLP_Printf.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 FLP_Printf : FileListProgress {
  12. private HandleRef swigCPtr;
  13. internal FLP_Printf(IntPtr cPtr, bool cMemoryOwn) : base(RakNetPINVOKE.FLP_Printf_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(FLP_Printf obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~FLP_Printf() {
  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_FLP_Printf(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public new static FLP_Printf GetInstance() {
  36. IntPtr cPtr = RakNetPINVOKE.FLP_Printf_GetInstance();
  37. FLP_Printf ret = (cPtr == IntPtr.Zero) ? null : new FLP_Printf(cPtr, false);
  38. return ret;
  39. }
  40. public static void DestroyInstance(FLP_Printf i) {
  41. RakNetPINVOKE.FLP_Printf_DestroyInstance(FLP_Printf.getCPtr(i));
  42. }
  43. public FLP_Printf() : this(RakNetPINVOKE.new_FLP_Printf(), true) {
  44. }
  45. public override void OnAddFilesFromDirectoryStarted(FileList fileList, string dir) {
  46. RakNetPINVOKE.FLP_Printf_OnAddFilesFromDirectoryStarted(swigCPtr, FileList.getCPtr(fileList), dir);
  47. }
  48. public override void OnDirectory(FileList fileList, string dir, uint directoriesRemaining) {
  49. RakNetPINVOKE.FLP_Printf_OnDirectory(swigCPtr, FileList.getCPtr(fileList), dir, directoriesRemaining);
  50. }
  51. public override void OnFilePushesComplete(SystemAddress systemAddress, ushort setID) {
  52. RakNetPINVOKE.FLP_Printf_OnFilePushesComplete(swigCPtr, SystemAddress.getCPtr(systemAddress), setID);
  53. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  54. }
  55. public override void OnSendAborted(SystemAddress systemAddress) {
  56. RakNetPINVOKE.FLP_Printf_OnSendAborted(swigCPtr, SystemAddress.getCPtr(systemAddress));
  57. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  58. }
  59. }
  60. }
粤ICP备19079148号