Files
2025-11-24 14:19:51 +05:30

150 lines
5.7 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 FileList : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal FileList(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(FileList obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~FileList() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
SLikeNetPINVOKE.delete_FileList(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public static FileList GetInstance() {
IntPtr cPtr = SLikeNetPINVOKE.FileList_GetInstance();
FileList ret = (cPtr == IntPtr.Zero) ? null : new FileList(cPtr, false);
return ret;
}
public static void DestroyInstance(FileList i) {
SLikeNetPINVOKE.FileList_DestroyInstance(FileList.getCPtr(i));
}
public FileList() : this(SLikeNetPINVOKE.new_FileList(), true) {
}
public void AddFilesFromDirectory(string applicationDirectory, string subDirectory, bool writeHash, bool writeData, bool recursive, FileListNodeContext context) {
SLikeNetPINVOKE.FileList_AddFilesFromDirectory(swigCPtr, applicationDirectory, subDirectory, writeHash, writeData, recursive, FileListNodeContext.getCPtr(context));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public void Clear() {
SLikeNetPINVOKE.FileList_Clear(swigCPtr);
}
public void Serialize(BitStream outBitStream) {
SLikeNetPINVOKE.FileList_Serialize(swigCPtr, BitStream.getCPtr(outBitStream));
}
public bool Deserialize(BitStream inBitStream) {
bool ret = SLikeNetPINVOKE.FileList_Deserialize(swigCPtr, BitStream.getCPtr(inBitStream));
return ret;
}
public void ListMissingOrChangedFiles(string applicationDirectory, FileList missingOrChangedFiles, bool alwaysWriteHash, bool neverWriteHash) {
SLikeNetPINVOKE.FileList_ListMissingOrChangedFiles(swigCPtr, applicationDirectory, FileList.getCPtr(missingOrChangedFiles), alwaysWriteHash, neverWriteHash);
}
public void GetDeltaToCurrent(FileList input, FileList output, string dirSubset, string remoteSubdir) {
SLikeNetPINVOKE.FileList_GetDeltaToCurrent(swigCPtr, FileList.getCPtr(input), FileList.getCPtr(output), dirSubset, remoteSubdir);
}
public void PopulateDataFromDisk(string applicationDirectory, bool writeFileData, bool writeFileHash, bool removeUnknownFiles) {
SLikeNetPINVOKE.FileList_PopulateDataFromDisk(swigCPtr, applicationDirectory, writeFileData, writeFileHash, removeUnknownFiles);
}
public void FlagFilesAsReferences() {
SLikeNetPINVOKE.FileList_FlagFilesAsReferences(swigCPtr);
}
public void WriteDataToDisk(string applicationDirectory) {
SLikeNetPINVOKE.FileList_WriteDataToDisk(swigCPtr, applicationDirectory);
}
public void AddFile(string filepath, string filename, FileListNodeContext context) {
SLikeNetPINVOKE.FileList_AddFile__SWIG_0(swigCPtr, filepath, filename, FileListNodeContext.getCPtr(context));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public void DeleteFiles(string applicationDirectory) {
SLikeNetPINVOKE.FileList_DeleteFiles(swigCPtr, applicationDirectory);
}
public void AddCallback(FileListProgress cb) {
SLikeNetPINVOKE.FileList_AddCallback(swigCPtr, FileListProgress.getCPtr(cb));
}
public void RemoveCallback(FileListProgress cb) {
SLikeNetPINVOKE.FileList_RemoveCallback(swigCPtr, FileListProgress.getCPtr(cb));
}
public void ClearCallbacks() {
SLikeNetPINVOKE.FileList_ClearCallbacks(swigCPtr);
}
public RakNetListFileListNode fileList {
set {
SLikeNetPINVOKE.FileList_fileList_set(swigCPtr, RakNetListFileListNode.getCPtr(value));
}
get {
IntPtr cPtr = SLikeNetPINVOKE.FileList_fileList_get(swigCPtr);
RakNetListFileListNode ret = (cPtr == IntPtr.Zero) ? null : new RakNetListFileListNode(cPtr, false);
return ret;
}
}
public static bool FixEndingSlash(string str) {
bool ret = SLikeNetPINVOKE.FileList_FixEndingSlash__SWIG_0(str);
return ret;
}
public static bool FixEndingSlash(string str, uint strLength) {
bool ret = SLikeNetPINVOKE.FileList_FixEndingSlash__SWIG_1(str, strLength);
return ret;
}
public void AddFile(string filename, string fullPathToFile, byte[] inByteArray, uint dataLength, uint fileLength, FileListNodeContext context, bool isAReference) {
SLikeNetPINVOKE.FileList_AddFile__SWIG_1(swigCPtr, filename, fullPathToFile, inByteArray, dataLength, fileLength, FileListNodeContext.getCPtr(context), isAReference);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public void AddFile(string filename, string fullPathToFile, byte[] inByteArray, uint dataLength, uint fileLength, FileListNodeContext context) {
SLikeNetPINVOKE.FileList_AddFile__SWIG_2(swigCPtr, filename, fullPathToFile, inByteArray, dataLength, fileLength, FileListNodeContext.getCPtr(context));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
}
}