basic implementation, tabling for now

This commit is contained in:
2020-05-01 06:44:48 -04:00
committed by John K. Luebs
parent 1a394ddb31
commit 60d093dbad
11 changed files with 210 additions and 140 deletions

View File

@@ -2,8 +2,8 @@ using System;
using System.Runtime.InteropServices;
namespace Foodsoft.Alpm
{
{
/*
* Hooks
*/
@@ -158,33 +158,6 @@ namespace Foodsoft.Alpm
public readonly uint mode;
}
public enum caps
{
ALPM_CAPABILITY_NLS = (1 << 0),
ALPM_CAPABILITY_DOWNLOADER = (1 << 1),
ALPM_CAPABILITY_SIGNATURES = (1 << 2)
}
/** Package filelist container */
public struct _alpm_filelist_t
{
public UIntPtr count;
private IntPtr files;
/* FIXME: This is broken as shit */
public alpm_file_t[] Unmarshal()
{
var iCount = (int) this.count;
var byteCount = Marshal.SizeOf<alpm_file_t>() * iCount;
var byteBuffer = new byte[byteCount];
Marshal.Copy(files, byteBuffer, 0, byteBuffer.Length);
var result = new alpm_file_t[iCount];
Buffer.BlockCopy(byteBuffer, 0, result, 0, byteBuffer.Length);
return result;
}
}
/** Local package or package file backup entry */
public struct _alpm_backup_t
{