Top | ![]() |
![]() |
![]() |
![]() |
char * | xdg_app_ref_format_ref () |
const char * | xdg_app_ref_get_arch () |
const char * | xdg_app_ref_get_branch () |
const char * | xdg_app_ref_get_commit () |
XdgAppRefKind | xdg_app_ref_get_kind () |
const char * | xdg_app_ref_get_name () |
XdgAppRef * | xdg_app_ref_parse () |
Currently xdg-app manages two types of binary artifacts: applications, and runtimes. Applications contain a program that desktop users can run, while runtimes contain only libraries and data. An XdgAppRef object (or short: ref) can refer to either of these.
Both applications and runtimes are identified by a 4-tuple of strings: kind,
name, arch and branch, e.g. app/org.gnome.evince/x86_64/master. The functions
xdg_app_ref_parse()
and xdg_app_ref_format_ref()
can be used to convert
XdgAppRef objects into this string representation and back.
To uniquely identify a particular version of an application or runtime, you need a commit.
The subclasses XdgAppInstalledRef and XdgAppRemoteRef provide more information for artifacts that are locally installed or available from a remote repository.
char *
xdg_app_ref_format_ref (XdgAppRef *self
);
Convert an XdgAppRef object into a string representation that
can be parsed by xdg_app_ref_parse()
.
const char *
xdg_app_ref_get_arch (XdgAppRef *self
);
Gets the arch or the ref.
const char *
xdg_app_ref_get_branch (XdgAppRef *self
);
Gets the branch of the ref.
const char *
xdg_app_ref_get_commit (XdgAppRef *self
);
Gets the commit of the ref.
XdgAppRefKind
xdg_app_ref_get_kind (XdgAppRef *self
);
Gets the kind of artifact that this ref refers to.
const char *
xdg_app_ref_get_name (XdgAppRef *self
);
Gets the name of the ref.
XdgAppRef * xdg_app_ref_parse (const char *ref
,GError **error
);
Tries to parse a full ref name and return a XdgAppRef (without a commit set) or fail if the ref is invalid somehow.
“arch”
property “arch” gchar *
The architecture of the application or runtime.
Flags: Read / Write
Default value: NULL
“branch”
property “branch” gchar *
The branch of the application or runtime.
Flags: Read / Write
Default value: NULL
“kind”
property“kind” XdgAppRefKind
The kind of artifact.
Flags: Read / Write
Default value: XDG_APP_REF_KIND_APP