| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- /* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
- namespace RakNet {
- using System;
- using System.Runtime.InteropServices;
- public class FileListNode : IDisposable {
- private HandleRef swigCPtr;
- protected bool swigCMemOwn;
- internal FileListNode(IntPtr cPtr, bool cMemoryOwn) {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new HandleRef(this, cPtr);
- }
- internal static HandleRef getCPtr(FileListNode obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
- ~FileListNode() {
- Dispose();
- }
- public virtual void Dispose() {
- lock(this) {
- if (swigCPtr.Handle != IntPtr.Zero) {
- if (swigCMemOwn) {
- swigCMemOwn = false;
- RakNetPINVOKE.delete_FileListNode(swigCPtr);
- }
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
- GC.SuppressFinalize(this);
- }
- }
- private bool dataIsCached = false;
- private byte[] dataCache;
- public RakString filename {
- set {
- RakNetPINVOKE.FileListNode_filename_set(swigCPtr, RakString.getCPtr(value));
- }
- get {
- IntPtr cPtr = RakNetPINVOKE.FileListNode_filename_get(swigCPtr);
- RakString ret = (cPtr == IntPtr.Zero) ? null : new RakString(cPtr, false);
- return ret;
- }
- }
- public RakString fullPathToFile {
- set {
- RakNetPINVOKE.FileListNode_fullPathToFile_set(swigCPtr, RakString.getCPtr(value));
- }
- get {
- IntPtr cPtr = RakNetPINVOKE.FileListNode_fullPathToFile_get(swigCPtr);
- RakString ret = (cPtr == IntPtr.Zero) ? null : new RakString(cPtr, false);
- return ret;
- }
- }
- public byte[] data {
- set
- {
- dataCache=value;
- dataIsCached = true;
- SetData (value, value.Length);
- }
- get
- {
- byte[] returnArray;
- if (!dataIsCached)
- {
- IntPtr cPtr = RakNetPINVOKE.FileListNode_data_get (swigCPtr);
- int len = (int) dataLengthBytes;
- if (len<=0)
- {
- return null;
- }
- returnArray = new byte[len];
- byte[] marshalArray = new byte[len];
- Marshal.Copy(cPtr, marshalArray, 0, len);
- marshalArray.CopyTo(returnArray, 0);
- dataCache = returnArray;
- dataIsCached = true;
- }
- else
- {
- returnArray = dataCache;
- }
- return returnArray;
- }
-
- }
- public uint dataLengthBytes {
- set {
- RakNetPINVOKE.FileListNode_dataLengthBytes_set(swigCPtr, value);
- }
- get {
- uint ret = RakNetPINVOKE.FileListNode_dataLengthBytes_get(swigCPtr);
- return ret;
- }
- }
- public uint fileLengthBytes {
- set {
- RakNetPINVOKE.FileListNode_fileLengthBytes_set(swigCPtr, value);
- }
- get {
- uint ret = RakNetPINVOKE.FileListNode_fileLengthBytes_get(swigCPtr);
- return ret;
- }
- }
- public FileListNodeContext context {
- set {
- RakNetPINVOKE.FileListNode_context_set(swigCPtr, FileListNodeContext.getCPtr(value));
- }
- get {
- IntPtr cPtr = RakNetPINVOKE.FileListNode_context_get(swigCPtr);
- FileListNodeContext ret = (cPtr == IntPtr.Zero) ? null : new FileListNodeContext(cPtr, false);
- return ret;
- }
- }
- public bool isAReference {
- set {
- RakNetPINVOKE.FileListNode_isAReference_set(swigCPtr, value);
- }
- get {
- bool ret = RakNetPINVOKE.FileListNode_isAReference_get(swigCPtr);
- return ret;
- }
- }
- public FileListNode() : this(RakNetPINVOKE.new_FileListNode(), true) {
- }
- public void SetData(byte[] inByteArray, int numBytes) {
- RakNetPINVOKE.FileListNode_SetData(swigCPtr, inByteArray, numBytes);
- }
- }
- }
|