Blame src/libostree/ostree-bootloader.h

rpm-build 0fba15
/*
rpm-build 0fba15
 * Copyright (C) 2013 Colin Walters <walters@verbum.org>
rpm-build 0fba15
 *
rpm-build 0fba15
 * This program is free software: you can redistribute it and/or modify
rpm-build 0fba15
 * it under the terms of the GNU Lesser General Public License as published
rpm-build 0fba15
 * by the Free Software Foundation; either version 2 of the licence or (at
rpm-build 0fba15
 * your option) any later version.
rpm-build 0fba15
 *
rpm-build 0fba15
 * This library is distributed in the hope that it will be useful,
rpm-build 0fba15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0fba15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 0fba15
 * Lesser General Public License for more details.
rpm-build 0fba15
 *
rpm-build 0fba15
 * You should have received a copy of the GNU Lesser General
rpm-build 0fba15
 * Public License along with this library; if not, write to the
rpm-build 0fba15
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
rpm-build 0fba15
 * Boston, MA 02111-1307, USA.
rpm-build 0fba15
 */
rpm-build 0fba15
rpm-build 0fba15
#pragma once
rpm-build 0fba15
rpm-build 0fba15
#include <gio/gio.h>
rpm-build 0fba15
#include "otutil.h"
rpm-build 0fba15
rpm-build 0fba15
G_BEGIN_DECLS
rpm-build 0fba15
rpm-build 0fba15
#define OSTREE_TYPE_BOOTLOADER (_ostree_bootloader_get_type ())
rpm-build 0fba15
#define OSTREE_BOOTLOADER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), OSTREE_TYPE_BOOTLOADER, OstreeBootloader))
rpm-build 0fba15
#define OSTREE_IS_BOOTLOADER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), OSTREE_TYPE_BOOTLOADER))
rpm-build 0fba15
#define OSTREE_BOOTLOADER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), OSTREE_TYPE_BOOTLOADER, OstreeBootloaderInterface))
rpm-build 0fba15
rpm-build 0fba15
typedef struct _OstreeBootloader OstreeBootloader;
rpm-build 0fba15
typedef struct _OstreeBootloaderInterface                            OstreeBootloaderInterface;
rpm-build 0fba15
rpm-build 0fba15
struct _OstreeBootloaderInterface
rpm-build 0fba15
{
rpm-build 0fba15
  GTypeInterface g_iface;
rpm-build 0fba15
rpm-build 0fba15
  /* virtual functions */
rpm-build 0fba15
  gboolean             (* query)                  (OstreeBootloader *bootloader,
rpm-build 0fba15
                                                   gboolean         *out_is_active,
rpm-build 0fba15
                                                   GCancellable     *cancellable,
rpm-build 0fba15
                                                   GError          **error);
rpm-build 0fba15
  const char *         (* get_name)               (OstreeBootloader  *self);
rpm-build 0fba15
  gboolean             (* write_config)           (OstreeBootloader  *self,
rpm-build 0fba15
                                                   int            bootversion,
rpm-build 0fba15
                                                   GPtrArray     *new_deployments,
rpm-build 0fba15
                                                   GCancellable  *cancellable,
rpm-build 0fba15
                                                   GError       **error);
rpm-build 0fba15
  gboolean             (* post_bls_sync)          (OstreeBootloader  *self,
rpm-build 0fba15
                                                   GCancellable  *cancellable,
rpm-build 0fba15
                                                   GError       **error);
rpm-build 0fba15
  gboolean             (* is_atomic)              (OstreeBootloader  *self);
rpm-build 0fba15
};
rpm-build 0fba15
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeBootloader, g_object_unref)
rpm-build 0fba15
rpm-build 0fba15
GType _ostree_bootloader_get_type (void) G_GNUC_CONST;
rpm-build 0fba15
rpm-build 0fba15
gboolean _ostree_bootloader_query (OstreeBootloader *bootloader,
rpm-build 0fba15
                                   gboolean         *out_is_active,
rpm-build 0fba15
                                   GCancellable     *cancellable,
rpm-build 0fba15
                                   GError          **error);
rpm-build 0fba15
rpm-build 0fba15
const char *_ostree_bootloader_get_name (OstreeBootloader  *self);
rpm-build 0fba15
rpm-build 0fba15
gboolean _ostree_bootloader_write_config (OstreeBootloader  *self,
rpm-build 0fba15
                                          int            bootversion,
rpm-build 0fba15
                                          GPtrArray     *new_deployments,
rpm-build 0fba15
                                          GCancellable  *cancellable,
rpm-build 0fba15
                                          GError       **error);
rpm-build 0fba15
rpm-build 0fba15
gboolean _ostree_bootloader_post_bls_sync (OstreeBootloader  *self,
rpm-build 0fba15
                                           GCancellable  *cancellable,
rpm-build 0fba15
                                           GError       **error);
rpm-build 0fba15
rpm-build 0fba15
gboolean _ostree_bootloader_is_atomic (OstreeBootloader  *self);
rpm-build 0fba15
rpm-build 0fba15
G_END_DECLS