From e4283f6d48b98e764b988b43bbc86b9d52e6ec94 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:54:43 +0200 Subject: Adding upstream version 43.9. Signed-off-by: Daniel Baumann --- subprojects/extensions-tool/src/common.h | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 subprojects/extensions-tool/src/common.h (limited to 'subprojects/extensions-tool/src/common.h') diff --git a/subprojects/extensions-tool/src/common.h b/subprojects/extensions-tool/src/common.h new file mode 100644 index 0000000..2b04484 --- /dev/null +++ b/subprojects/extensions-tool/src/common.h @@ -0,0 +1,73 @@ +/* common.h + * + * Copyright 2018 Florian Müllner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#pragma once + +#include + +G_BEGIN_DECLS + +typedef enum { + TYPE_SYSTEM = 1, + TYPE_USER +} ExtensionType; + +typedef enum { + STATE_ENABLED = 1, + STATE_DISABLED, + STATE_ERROR, + STATE_OUT_OF_DATE, + STATE_DOWNLOADING, + STATE_INITIALIZED, + + STATE_UNINSTALLED = 99 +} ExtensionState; + +typedef enum { + DISPLAY_ONELINE, + DISPLAY_DETAILED +} DisplayFormat; + +GOptionGroup *get_option_group (void); + +void show_help (GOptionContext *context, + const char *message); + +void print_extension_info (GVariantDict *info, + DisplayFormat format); + +GDBusProxy *get_shell_proxy (GError **error); +GVariant *get_extension_property (GDBusProxy *proxy, + const char *uuid, + const char *property); + +GSettings *get_shell_settings (void); + +gboolean settings_list_add (GSettings *settings, + const char *key, + const char *value); +gboolean settings_list_remove (GSettings *settings, + const char *key, + const char *value); + +gboolean file_delete_recursively (GFile *file, + GError **error); + +G_END_DECLS -- cgit v1.2.3