forked from openSUSE/transactional-update
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibtukit.h
51 lines (45 loc) · 1.58 KB
/
libtukit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* SPDX-FileCopyrightText: Copyright SUSE LLC */
/*
This is the EXPERIMENTAL C API for tukit. For the moment it is only inteded
for internal use.
For documentation please see the corresponding classes in the C++ header
files.
*/
#ifndef T_U_TUKIT_H
#define T_U_TUKIT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stdio.h"
typedef enum {
None=0, Error, Info, Debug
} loglevel;
const char* tukit_get_errmsg();
void tukit_set_loglevel(loglevel lv);
typedef void* tukit_tx;
tukit_tx tukit_new_tx();
void tukit_free_tx(tukit_tx tx);
int tukit_tx_init(tukit_tx tx, char* base);
int tukit_tx_init_with_desc(tukit_tx tx, char* base, char* description);
int tukit_tx_discard_if_unchanged(tukit_tx tx, int discard);
int tukit_tx_resume(tukit_tx tx, char* id);
int tukit_tx_execute(tukit_tx tx, char* argv[], const char* output[]);
int tukit_tx_call_ext(tukit_tx tx, char* argv[], const char* output[]);
int tukit_tx_finalize(tukit_tx tx);
int tukit_tx_keep(tukit_tx tx);
int tukit_tx_send_signal(tukit_tx tx, int signal);
int tukit_tx_is_initialized(tukit_tx tx);
const char* tukit_tx_get_snapshot(tukit_tx tx);
const char* tukit_tx_get_root(tukit_tx tx);
typedef void* tukit_sm_list;
tukit_sm_list tukit_sm_get_list(size_t* len, const char* columns);
const char* tukit_sm_get_list_value(tukit_sm_list list, size_t row, char* columns);
void tukit_free_sm_list(tukit_sm_list list);
int tukit_sm_deletesnap(const char* id);
int tukit_sm_rollbackto(const char* id);
int tukit_reboot(const char* method);
#ifdef __cplusplus
}
#endif
#endif // T_U_TUKIT_H