2016-10-18 14:15:44 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2016 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.1 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>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FLATPAK_TRANSACTION_H__
|
|
|
|
#define __FLATPAK_TRANSACTION_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include "libglnx/libglnx.h"
|
|
|
|
|
|
|
|
#include "flatpak-dir.h"
|
|
|
|
|
|
|
|
typedef struct FlatpakTransaction FlatpakTransaction;
|
|
|
|
|
|
|
|
FlatpakTransaction *flatpak_transaction_new (FlatpakDir *dir,
|
2016-12-13 10:35:06 +00:00
|
|
|
gboolean no_interaction,
|
2016-10-18 14:15:44 +00:00
|
|
|
gboolean no_pull,
|
|
|
|
gboolean no_deploy,
|
|
|
|
gboolean add_deps,
|
|
|
|
gboolean add_related);
|
|
|
|
void flatpak_transaction_free (FlatpakTransaction *self);
|
|
|
|
gboolean flatpak_transaction_run (FlatpakTransaction *self,
|
|
|
|
gboolean stop_on_first_errror,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GError **error);
|
|
|
|
gboolean flatpak_transaction_add_install (FlatpakTransaction *self,
|
|
|
|
const char *remote,
|
|
|
|
const char *ref,
|
|
|
|
const char **subpaths,
|
|
|
|
GError **error);
|
2016-12-12 11:26:37 +00:00
|
|
|
gboolean flatpak_transaction_add_install_oci (FlatpakTransaction *self,
|
|
|
|
const char *uri,
|
|
|
|
const char *tag,
|
|
|
|
GError **error);
|
2016-12-20 15:24:13 +00:00
|
|
|
gboolean flatpak_transaction_add_install_bundle (FlatpakTransaction *self,
|
|
|
|
GFile *file,
|
|
|
|
GBytes *gpg_data,
|
|
|
|
GError **error);
|
2016-10-18 14:15:44 +00:00
|
|
|
gboolean flatpak_transaction_add_update (FlatpakTransaction *self,
|
|
|
|
const char *ref,
|
|
|
|
const char **subpaths,
|
2016-10-19 16:12:50 +00:00
|
|
|
const char *commit,
|
2016-10-18 14:15:44 +00:00
|
|
|
GError **error);
|
|
|
|
|
|
|
|
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FlatpakTransaction, flatpak_transaction_free)
|
|
|
|
|
|
|
|
#endif /* __FLATPAK_TRANSACTION_H__ */
|