summaryrefslogtreecommitdiffstats
path: root/include/crm/cib.h
blob: fe04d91375218ce124b1e60abc52394d6222d445 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Copyright 2004-2024 the Pacemaker project contributors
 *
 * The version control history for this file may have further details.
 *
 * This source code is licensed under the GNU Lesser General Public License
 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
 */

#ifndef PCMK__CRM_CIB__H
#  define PCMK__CRM_CIB__H

#  include <glib.h>             // gboolean
#  include <crm/common/ipc.h>
#  include <crm/common/xml.h>
#  include <crm/cib/cib_types.h>
#  include <crm/cib/util.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * \file
 * \brief Cluster Configuration
 * \ingroup cib
 */

// Use compare_version() for doing comparisons
#  define CIB_FEATURE_SET "2.0"

/* Core functions */

// NOTE: sbd (as of at least 1.5.2) uses this
cib_t *cib_new(void);

cib_t *cib_native_new(void);
cib_t *cib_file_new(const char *filename);
cib_t *cib_remote_new(const char *server, const char *user, const char *passwd, int port,
                      gboolean encrypted);

cib_t *cib_new_no_shadow(void);
char *get_shadow_file(const char *name);
cib_t *cib_shadow_new(const char *name);

void cib_free_notify(cib_t *cib);
void cib_free_callbacks(cib_t *cib);

// NOTE: sbd (as of at least 1.5.2) uses this
void cib_delete(cib_t * cib);

void cib_dump_pending_callbacks(void);
int num_cib_op_callbacks(void);
void remove_cib_op_callback(int call_id, gboolean all_callbacks);

#  define CIB_LIBRARY "libcib.so.27"

#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
#include <crm/cib_compat.h>
#endif

#ifdef __cplusplus
}
#endif

#endif