mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-28 10:29:42 -04:00
Applications using libflatpak currently have to duplicate the CLI's private cleanup logic to offer the equivalent of uninstall --delete-data. Add a standalone API that removes ~/.var/app data and resets permission store entries without requiring the app to be installed. Keep it separate from transactions so callers can retry partial failures or reset data for an installed app. Validate app IDs before constructing paths, propagate cancellation and permission table errors, and document partial failure behavior.
19 lines
520 B
C
19 lines
520 B
C
#if !defined(__FLATPAK_H_INSIDE__) && !defined(FLATPAK_COMPILATION)
|
|
#error "Only <flatpak.h> can be included directly."
|
|
#endif
|
|
|
|
#ifndef __FLATPAK_USER_DATA_UTILS_H__
|
|
#define __FLATPAK_USER_DATA_UTILS_H__
|
|
|
|
#include <gio/gio.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
FLATPAK_EXTERN gboolean flatpak_user_data_delete (const char *app_id,
|
|
GCancellable *cancellable,
|
|
GError **error);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __FLATPAK_USER_DATA_UTILS_H__ */
|