2015-03-23 11:17:58 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2014 Red Hat, Inc
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Alexander Larsson <alexl@redhat.com>
|
|
|
|
*/
|
|
|
|
|
2014-12-17 13:05:44 +00:00
|
|
|
#ifndef __XDG_APP_BUILTINS_H__
|
|
|
|
#define __XDG_APP_BUILTINS_H__
|
|
|
|
|
|
|
|
#include <ostree.h>
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
2014-12-18 09:14:46 +00:00
|
|
|
#include "xdg-app-dir.h"
|
|
|
|
|
2014-12-17 13:05:44 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef enum {
|
2014-12-18 09:14:46 +00:00
|
|
|
XDG_APP_BUILTIN_FLAG_NO_DIR = 1 << 0,
|
2014-12-17 13:05:44 +00:00
|
|
|
XDG_APP_BUILTIN_FLAG_NO_REPO = 1 << 1,
|
|
|
|
} XdgAppBuiltinFlags;
|
|
|
|
|
|
|
|
gboolean xdg_app_option_context_parse (GOptionContext *context,
|
|
|
|
const GOptionEntry *main_entries,
|
|
|
|
int *argc,
|
|
|
|
char ***argv,
|
|
|
|
XdgAppBuiltinFlags flags,
|
2014-12-18 09:14:46 +00:00
|
|
|
XdgAppDir **out_dir,
|
2014-12-17 13:05:44 +00:00
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
|
2015-09-25 15:36:38 +00:00
|
|
|
gboolean usage_error (GOptionContext *context,
|
|
|
|
const char *message,
|
|
|
|
GError **error);
|
2015-01-14 23:49:34 +00:00
|
|
|
|
2014-12-17 13:05:44 +00:00
|
|
|
#define BUILTINPROTO(name) gboolean xdg_app_builtin_ ## name (int argc, char **argv, GCancellable *cancellable, GError **error)
|
|
|
|
|
2015-01-20 01:16:00 +00:00
|
|
|
BUILTINPROTO(add_remote);
|
2015-09-17 09:37:29 +00:00
|
|
|
BUILTINPROTO(modify_remote);
|
2015-01-20 01:16:00 +00:00
|
|
|
BUILTINPROTO(delete_remote);
|
2015-09-17 13:55:10 +00:00
|
|
|
BUILTINPROTO(ls_remote);
|
2015-01-20 01:16:00 +00:00
|
|
|
BUILTINPROTO(list_remotes);
|
2016-01-13 14:34:08 +00:00
|
|
|
BUILTINPROTO(install);
|
|
|
|
BUILTINPROTO(update);
|
2015-03-10 15:33:56 +00:00
|
|
|
BUILTINPROTO(make_current_app);
|
2016-01-13 14:34:08 +00:00
|
|
|
BUILTINPROTO(uninstall);
|
2015-10-16 13:49:03 +00:00
|
|
|
BUILTINPROTO(install_bundle);
|
2016-01-13 16:02:15 +00:00
|
|
|
BUILTINPROTO(list);
|
2016-02-02 16:51:10 +00:00
|
|
|
BUILTINPROTO(info);
|
2014-12-18 16:51:37 +00:00
|
|
|
BUILTINPROTO(run);
|
2015-09-24 17:23:24 +00:00
|
|
|
BUILTINPROTO(enter);
|
2015-01-08 15:54:45 +00:00
|
|
|
BUILTINPROTO(build_init);
|
2015-01-08 16:50:54 +00:00
|
|
|
BUILTINPROTO(build);
|
2015-01-15 18:50:00 +00:00
|
|
|
BUILTINPROTO(build_finish);
|
2016-04-13 08:08:59 +00:00
|
|
|
BUILTINPROTO(build_sign);
|
2015-01-16 18:59:34 +00:00
|
|
|
BUILTINPROTO(build_export);
|
2015-10-16 13:48:20 +00:00
|
|
|
BUILTINPROTO(build_bundle);
|
2016-04-19 11:48:49 +00:00
|
|
|
BUILTINPROTO(build_import);
|
2016-01-13 15:09:30 +00:00
|
|
|
BUILTINPROTO(build_update_repo);
|
2015-09-03 18:43:05 +00:00
|
|
|
BUILTINPROTO(export_file);
|
2015-09-11 14:07:31 +00:00
|
|
|
BUILTINPROTO(override);
|
2014-12-17 13:05:44 +00:00
|
|
|
|
2016-01-13 14:34:08 +00:00
|
|
|
/* Deprecated */
|
|
|
|
BUILTINPROTO(install_runtime);
|
|
|
|
BUILTINPROTO(install_app);
|
|
|
|
BUILTINPROTO(update_runtime);
|
|
|
|
BUILTINPROTO(update_app);
|
|
|
|
BUILTINPROTO(uninstall_runtime);
|
|
|
|
BUILTINPROTO(uninstall_app);
|
2016-01-13 16:02:15 +00:00
|
|
|
BUILTINPROTO(list_apps);
|
|
|
|
BUILTINPROTO(list_runtimes);
|
2016-01-13 14:34:08 +00:00
|
|
|
|
2014-12-17 13:05:44 +00:00
|
|
|
#undef BUILTINPROTO
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __XDG_APP_BUILTINS_H__ */
|