2015-08-24 22:44:40 +03:00
/*
* Copyright ( C ) 2015 Red Hat , Inc .
*
* 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 2 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 , write to the Free Software
* Foundation , Inc . , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
*/
# pragma once
# include <ostree.h>
# include "rpmostreed-types.h"
gchar * rpmostreed_generate_object_path ( const gchar * base ,
const gchar * part ,
. . . ) ;
gchar * rpmostreed_generate_object_path_from_va ( const gchar * base ,
const gchar * part ,
va_list va ) ;
gboolean rpmostreed_refspec_parse_partial ( const gchar * new_provided_refspec ,
2015-02-11 21:06:43 +03:00
const gchar * base_refspec ,
2015-08-24 22:44:40 +03:00
gchar * * out_refspec ,
GError * * error ) ;
2015-10-07 09:22:36 +03:00
void
rpmostreed_reboot ( GCancellable * cancellable , GError * * error ) ;
2015-10-09 23:47:39 +03:00
/* XXX These pull-ancestry and lookup-version functions should eventually
* be integrated into libostree , but it ' s still a bit premature to do
* so now . Version integration in ostree needs more design work . */
typedef gboolean ( * RpmostreedCommitVisitor ) ( OstreeRepo * repo ,
const char * checksum ,
GVariant * commit ,
gpointer user_data ,
gboolean * out_stop ,
GError * * error ) ;
gboolean rpmostreed_repo_pull_ancestry ( OstreeRepo * repo ,
const char * refspec ,
RpmostreedCommitVisitor visitor ,
gpointer visitor_data ,
OstreeAsyncProgress * progress ,
GCancellable * cancellable ,
GError * * error ) ;
gboolean rpmostreed_repo_lookup_version ( OstreeRepo * repo ,
const char * refspec ,
const char * version ,
OstreeAsyncProgress * progress ,
GCancellable * cancellable ,
char * * out_checksum ,
GError * * error ) ;
2015-10-22 19:22:56 +03:00
2016-10-18 00:18:11 +03:00
gboolean rpmostreed_repo_lookup_checksum ( OstreeRepo * repo ,
const char * refspec ,
const char * checksum ,
OstreeAsyncProgress * progress ,
GCancellable * cancellable ,
GError * * error ) ;
2015-10-22 19:22:56 +03:00
gboolean rpmostreed_repo_lookup_cached_version ( OstreeRepo * repo ,
const char * refspec ,
const char * version ,
GCancellable * cancellable ,
char * * out_checksum ,
GError * * error ) ;
2015-11-05 05:14:14 +03:00
gboolean rpmostreed_parse_revision ( const char * revision ,
char * * out_checksum ,
char * * out_version ,
GError * * error ) ;