pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
strings.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2024 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__CRM_COMMON_STRINGS__H
11#define PCMK__CRM_COMMON_STRINGS__H
12
13#include <glib.h> // gboolean, guint, G_GNUC_PRINTF
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
25// NOTE: sbd (as of at least 1.5.2) uses this
26long long crm_get_msec(const char *input);
27
28int pcmk_parse_interval_spec(const char *input, guint *result_ms);
29
30// NOTE: sbd (as of at least 1.5.2) uses this
31gboolean crm_is_true(const char *s);
32
33int crm_str_to_boolean(const char *s, int *ret);
34
35// NOTE: sbd (as of at least 1.5.2) uses this
36char *crm_strdup_printf(char const *format, ...) G_GNUC_PRINTF(1, 2);
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif // PCMK__CRM_COMMON_STRINGS__H
xmlNode * input
int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
Definition strings.c:452
long long crm_get_msec(const char *input)
Parse a time+units string and return milliseconds equivalent.
Definition strings.c:351
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
gboolean crm_is_true(const char *s)
Definition strings.c:490
int crm_str_to_boolean(const char *s, int *ret)
Definition strings.c:498