checkpoint
This commit is contained in:
73
Alpm/Package.cs
Normal file
73
Alpm/Package.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Foodsoft.Alpm
|
||||
{
|
||||
public abstract class Package : IPackageData
|
||||
{
|
||||
internal SafePackageHandle Handle { get; }
|
||||
|
||||
internal Package(SafePackageHandle handle)
|
||||
{
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
public string Filename => alpm.alpm_pkg_get_filename(Handle);
|
||||
public string Base => alpm.alpm_pkg_get_base(Handle);
|
||||
public string Name => alpm.alpm_pkg_get_name(Handle);
|
||||
public string Version => alpm.alpm_pkg_get_version(Handle);
|
||||
public PackageOrigin Origin => alpm.alpm_pkg_get_origin(Handle);
|
||||
public string Description => alpm.alpm_pkg_get_desc(Handle);
|
||||
public string Url => alpm.alpm_pkg_get_url(Handle);
|
||||
|
||||
public DateTimeOffset BuildDate => DateTimeOffset.FromUnixTimeSeconds(alpm.alpm_pkg_get_builddate(Handle));
|
||||
public DateTimeOffset InstallDate => DateTimeOffset.FromUnixTimeSeconds(alpm.alpm_pkg_get_installdate(Handle));
|
||||
public string Packager => alpm.alpm_pkg_get_packager(Handle);
|
||||
public string MD5Sum => alpm.alpm_pkg_get_md5sum(Handle);
|
||||
public string SHA256Sum => alpm.alpm_pkg_get_sha256sum(Handle);
|
||||
public string Arch => alpm.alpm_pkg_get_arch(Handle);
|
||||
public long Size => alpm.alpm_pkg_get_size(Handle);
|
||||
public long InstalledSize => alpm.alpm_pkg_get_isize(Handle);
|
||||
public InstallReason InstallReason => alpm.alpm_pkg_get_reason(Handle);
|
||||
|
||||
public IEnumerable<string> Licenses { get; }
|
||||
public IReadOnlyCollection<string> Groups { get; }
|
||||
public IReadOnlyCollection<Depend> Depends { get; }
|
||||
public IReadOnlyCollection<Depend> OptDepends { get; }
|
||||
public IReadOnlyCollection<Depend> CheckDepends { get; }
|
||||
public IReadOnlyCollection<Depend> MakeDepends { get; }
|
||||
public IReadOnlyCollection<Depend> Conflicts { get; }
|
||||
public IReadOnlyCollection<Depend> Provides { get; }
|
||||
public IReadOnlyCollection<Depend> Replaces { get; }
|
||||
public IReadOnlyList<File> FileList { get; }
|
||||
public IReadOnlyList<Backup> Backup { get; }
|
||||
public string Base64Signature { get; }
|
||||
public ValidationType Validation { get; }
|
||||
public bool HasScriptlet { get; }
|
||||
public long DownloadSize { get; }
|
||||
public bool CheckMD5Sum()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual Database? DB => null;
|
||||
|
||||
public IEnumerator<Package> ComputeRequiredBy()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerator<Package> ComputeOptionalFor()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Handle.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user