153 lines
3.9 KiB
C#
153 lines
3.9 KiB
C#
/* ----------------------------------------------------------------------------
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
* Version 2.0.12
|
|
*
|
|
* Do not make changes to this file unless you know what you are doing--modify
|
|
* the SWIG interface file instead.
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
namespace SLNet {
|
|
|
|
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;
|
|
SLikeNetPINVOKE.delete_FileListNode(swigCPtr);
|
|
}
|
|
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
|
}
|
|
GC.SuppressFinalize(this);
|
|
}
|
|
}
|
|
|
|
private bool dataIsCached = false;
|
|
private byte[] dataCache;
|
|
|
|
public RakString filename {
|
|
set {
|
|
SLikeNetPINVOKE.FileListNode_filename_set(swigCPtr, RakString.getCPtr(value));
|
|
}
|
|
get {
|
|
IntPtr cPtr = SLikeNetPINVOKE.FileListNode_filename_get(swigCPtr);
|
|
RakString ret = (cPtr == IntPtr.Zero) ? null : new RakString(cPtr, false);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
public RakString fullPathToFile {
|
|
set {
|
|
SLikeNetPINVOKE.FileListNode_fullPathToFile_set(swigCPtr, RakString.getCPtr(value));
|
|
}
|
|
get {
|
|
IntPtr cPtr = SLikeNetPINVOKE.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 = SLikeNetPINVOKE.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 {
|
|
SLikeNetPINVOKE.FileListNode_dataLengthBytes_set(swigCPtr, value);
|
|
}
|
|
get {
|
|
uint ret = SLikeNetPINVOKE.FileListNode_dataLengthBytes_get(swigCPtr);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
public uint fileLengthBytes {
|
|
set {
|
|
SLikeNetPINVOKE.FileListNode_fileLengthBytes_set(swigCPtr, value);
|
|
}
|
|
get {
|
|
uint ret = SLikeNetPINVOKE.FileListNode_fileLengthBytes_get(swigCPtr);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
public FileListNodeContext context {
|
|
set {
|
|
SLikeNetPINVOKE.FileListNode_context_set(swigCPtr, FileListNodeContext.getCPtr(value));
|
|
}
|
|
get {
|
|
IntPtr cPtr = SLikeNetPINVOKE.FileListNode_context_get(swigCPtr);
|
|
FileListNodeContext ret = (cPtr == IntPtr.Zero) ? null : new FileListNodeContext(cPtr, false);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
public bool isAReference {
|
|
set {
|
|
SLikeNetPINVOKE.FileListNode_isAReference_set(swigCPtr, value);
|
|
}
|
|
get {
|
|
bool ret = SLikeNetPINVOKE.FileListNode_isAReference_get(swigCPtr);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
public FileListNode() : this(SLikeNetPINVOKE.new_FileListNode(), true) {
|
|
}
|
|
|
|
public void SetData(byte[] inByteArray, int numBytes) {
|
|
SLikeNetPINVOKE.FileListNode_SetData(swigCPtr, inByteArray, numBytes);
|
|
}
|
|
|
|
}
|
|
|
|
}
|