app-filter: Add serialize and deserialize methods
Add methods to serialise and deserialise the app filter, and use them to replace the code in `MctManager` which was previously doing this. This exposes the variant format for the app filter in the API (although the format is described as ‘opaque’) so that user code can log it or store it separately. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
a617365bba
commit
cba851fc27
4 changed files with 287 additions and 188 deletions
|
@ -96,6 +96,11 @@ MctAppFilterOarsValue mct_app_filter_get_oars_value (MctAppFilter *filter,
|
|||
gboolean mct_app_filter_is_user_installation_allowed (MctAppFilter *filter);
|
||||
gboolean mct_app_filter_is_system_installation_allowed (MctAppFilter *filter);
|
||||
|
||||
GVariant *mct_app_filter_serialize (MctAppFilter *filter);
|
||||
MctAppFilter *mct_app_filter_deserialize (GVariant *variant,
|
||||
uid_t user_id,
|
||||
GError **error);
|
||||
|
||||
/**
|
||||
* MctAppFilterBuilder:
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue