Skip to content

Commit

Permalink
figure out what needs to be done
Browse files Browse the repository at this point in the history
  • Loading branch information
swick committed Jan 18, 2024
1 parent 032127d commit 5f1218e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dynamic-launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ save_icon_and_get_desktop_entry (const char *desktop_file_id,
prefixed_exec = g_strjoinv (" ", prefixed_exec_strv);
g_key_file_set_value (key_file, G_KEY_FILE_DESKTOP_GROUP, "Exec", prefixed_exec);

// FIXME Should fallback to current impl here as well. Not great.
// Should also be moved to xdp-utils, really. Needs more looking.

tryexec_path = xdp_app_info_get_tryexec_path (xdp_app_info);
if (tryexec_path != NULL)
g_key_file_set_value (key_file, G_KEY_FILE_DESKTOP_GROUP, "TryExec", tryexec_path);
Expand Down
9 changes: 9 additions & 0 deletions src/xdp-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ const char *xdp_app_info_get_id (XdpAppInfo *app_info);
char * xdp_app_info_get_instance (XdpAppInfo *app_info);
gboolean xdp_app_info_is_host (XdpAppInfo *app_info);
XdpAppInfoKind xdp_app_info_get_kind (XdpAppInfo *app_info);
// FIXME Should fallback to current impls. Containers1 metadata could be used here.
char * xdp_app_info_remap_path (XdpAppInfo *app_info,
const char *path);
// FIXME PID/TID mapping: what we want is dbus->pidfd->pidns, but can't because pidfd is from proxy. Use flatpak/bwrap specific path for now.
gboolean xdp_app_info_map_pids (XdpAppInfo *app_info,
pid_t *pids,
guint n_pids,
Expand All @@ -92,22 +94,28 @@ gboolean xdp_app_info_map_tids (XdpAppInfo *app_info,
pid_t *tids,
guint n_tids,
GError **error);
// FIXME this is independent of app_info
gboolean xdp_app_info_pidfds_to_pids (XdpAppInfo *app_info,
const int *fds,
pid_t *pids,
gint count,
GError **error);
// FIXME depends on xdp_app_info_remap_path
char * xdp_app_info_get_path_for_fd (XdpAppInfo *app_info,
int fd,
int require_st_mode,
struct stat *st_buf,
gboolean *writable_out,
GError **error);
// FIXME good candidate for Containers1 metadata. Could fallback to current impls
gboolean xdp_app_info_has_network (XdpAppInfo *app_info);
// FIXME good candidate for Containers1 metadata. Could fallback to current impls
GAppInfo * xdp_app_info_load_app_info (XdpAppInfo *app_info);
// FIXME Should fallback to current impls. Needs more thinking.
char ** xdp_app_info_rewrite_commandline (XdpAppInfo *app_info,
const char *const *commandline,
gboolean quote_escape);
// FIXME TODO
char *xdp_app_info_get_tryexec_path (XdpAppInfo *app_info);

G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdpAppInfo, xdp_app_info_unref)
Expand Down Expand Up @@ -201,6 +209,7 @@ gboolean xdp_has_path_prefix (const char *str,
const char *prefix);

/* exposed for the benefit of tests */
// FIXME TODO
int _xdp_parse_cgroup_file (FILE *f,
gboolean *is_snap);
#ifdef HAVE_LIBSYSTEMD
Expand Down

0 comments on commit 5f1218e

Please sign in to comment.