basic implementation, tabling for now
This commit is contained in:
31
Alpm/Junk.cs
31
Alpm/Junk.cs
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user