2016-08-12 20:03:23 +03:00
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright ( C ) 2016 Colin Walters < walters @ verbum . org >
*
* 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 licence 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 , write to the
* Free Software Foundation , Inc . , 59 Temple Place , Suite 330 ,
* Boston , MA 02111 - 1307 , USA .
*/
# pragma once
# include <ostree.h>
# include "libglnx.h"
2017-01-06 05:57:41 +03:00
typedef enum {
RPMOSTREE_BWRAP_IMMUTABLE = 0 ,
RPMOSTREE_BWRAP_MUTATE_ROFILES ,
RPMOSTREE_BWRAP_MUTATE_FREELY
} RpmOstreeBwrapMutability ;
typedef struct RpmOstreeBwrap RpmOstreeBwrap ;
RpmOstreeBwrap * rpmostree_bwrap_ref ( RpmOstreeBwrap * bwrap ) ;
void rpmostree_bwrap_unref ( RpmOstreeBwrap * bwrap ) ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC ( RpmOstreeBwrap , rpmostree_bwrap_unref )
/* TODO - move this utility elsewhere */
2016-08-12 20:03:23 +03:00
void rpmostree_ptrarray_append_strdup ( GPtrArray * argv_array , . . . ) G_GNUC_NULL_TERMINATED ;
2017-01-06 05:57:41 +03:00
RpmOstreeBwrap * rpmostree_bwrap_new ( int rootfs ,
RpmOstreeBwrapMutability mutable ,
GError * * error ,
. . . ) G_GNUC_NULL_TERMINATED ;
void rpmostree_bwrap_append_bwrap_argv ( RpmOstreeBwrap * bwrap , . . . ) G_GNUC_NULL_TERMINATED ;
void rpmostree_bwrap_append_child_argv ( RpmOstreeBwrap * bwrap , . . . ) G_GNUC_NULL_TERMINATED ;
void rpmostree_bwrap_set_child_setup ( RpmOstreeBwrap * bwrap ,
GSpawnChildSetupFunc func ,
gpointer data ) ;
2016-08-12 23:53:49 +03:00
2017-01-06 05:57:41 +03:00
gboolean rpmostree_bwrap_run ( RpmOstreeBwrap * bwrap , GError * * error ) ;
2016-10-14 17:20:42 +03:00
2016-08-12 23:53:49 +03:00
gboolean rpmostree_bwrap_selftest ( GError * * error ) ;