Update libalpm vapi to version 14

This commit is contained in:
sudoBash418 2024-04-26 16:01:40 -06:00
parent 7324482ef5
commit 8bbacb702b
Signed by untrusted user: sudoBash418
GPG Key ID: 428A24BC32A7C9AF
1 changed files with 29 additions and 7 deletions

View File

@ -388,6 +388,10 @@ namespace Alpm {
public class DB { public class DB {
public static int unregister(owned DB db); public static int unregister(owned DB db);
public unowned Handle handle {
[CCode (cname = "alpm_db_get_handle")] get;
}
public unowned string name { public unowned string name {
[CCode (cname = "alpm_db_get_name")] get; [CCode (cname = "alpm_db_get_name")] get;
} }
@ -426,6 +430,8 @@ namespace Alpm {
public int add_server(string url); public int add_server(string url);
public int remove_server(string url); public int remove_server(string url);
// TODO: cache servers
public unowned Package? get_pkg(string name); public unowned Package? get_pkg(string name);
public unowned Group? get_group(string name); public unowned Group? get_group(string name);
public int search(Alpm.List<unowned string> needles, out Alpm.List<unowned Package> ret); public int search(Alpm.List<unowned string> needles, out Alpm.List<unowned Package> ret);
@ -440,6 +446,9 @@ namespace Alpm {
[Compact] [Compact]
public class Package { public class Package {
/* properties */ /* properties */
public unowned Handle handle {
[CCode (cname = "alpm_pkg_get_handle")] get;
}
public unowned string filename { public unowned string filename {
[CCode (cname = "alpm_pkg_get_filename")] get; [CCode (cname = "alpm_pkg_get_filename")] get;
} }
@ -542,6 +551,9 @@ namespace Alpm {
public int validation { public int validation {
[CCode (cname = "alpm_pkg_get_validation")] get; [CCode (cname = "alpm_pkg_get_validation")] get;
} }
public unowned Alpm.List<unowned XData> xdata {
[CCode (cname = "alpm_pkg_get_xdata")] get;
}
// TODO: changelog functions // TODO: changelog functions
/** Package install reasons. */ /** Package install reasons. */
@ -550,7 +562,9 @@ namespace Alpm {
/** Explicitly requested by the user. */ /** Explicitly requested by the user. */
EXPLICIT = 0, EXPLICIT = 0,
/** Installed as a dependency for another package. */ /** Installed as a dependency for another package. */
DEPEND = 1 DEPEND = 1,
/** Failed parsing of local database */
UNKNOWN = 2
} }
/** Location a package object was loaded from. */ /** Location a package object was loaded from. */
@ -585,6 +599,12 @@ namespace Alpm {
REMOVE REMOVE
} }
[CCode (cname = "alpm_pkg_xdata_t")]
public class XData {
public string name;
public string value;
}
public int checkmd5sum(); public int checkmd5sum();
public int has_scriptlet(); public int has_scriptlet();
@ -645,10 +665,8 @@ namespace Alpm {
[CCode (cname = "alpm_conflict_t", free_function = "alpm_conflict_free")] [CCode (cname = "alpm_conflict_t", free_function = "alpm_conflict_free")]
[Compact] [Compact]
public class Conflict { public class Conflict {
public ulong package1_hash; public unowned Package package1;
public ulong package2_hash; public unowned Package package2;
public string package1;
public string package2;
public unowned Depend reason; public unowned Depend reason;
} }
@ -1209,8 +1227,10 @@ namespace Alpm {
public Type type; public Type type;
/** Answer: whether or not to import key. */ /** Answer: whether or not to import key. */
public int import; public int import;
/** The key to import. */ /** UID of the key to import */
public Signature.PGPKey key; public string uid;
/** Fingerprint of the key to import */
public string fingerprint;
} }
/** This is an union passed to the callback, that allows the frontend to know /** This is an union passed to the callback, that allows the frontend to know
@ -1392,6 +1412,8 @@ namespace Alpm {
RECURSE = (1 << 5), RECURSE = (1 << 5),
/** Modify database but do not commit changes to the filesystem. */ /** Modify database but do not commit changes to the filesystem. */
DBONLY = (1 << 6), DBONLY = (1 << 6),
/** Do not run hooks during a transaction. */
NOHOOKS = (1 << 7),
/** Use ALPM_PKG_REASON_DEPEND when installing packages. */ /** Use ALPM_PKG_REASON_DEPEND when installing packages. */
ALLDEPS = (1 << 8), ALLDEPS = (1 << 8),
/** Only download packages and do not actually install. */ /** Only download packages and do not actually install. */