pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
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
16 extern "C" {
17 #endif
18 
25 // NOTE: sbd (as of at least 1.5.2) uses this
26 long long crm_get_msec(const char *input);
27 
28 int pcmk_parse_interval_spec(const char *input, guint *result_ms);
29 
30 // NOTE: sbd (as of at least 1.5.2) uses this
31 gboolean crm_is_true(const char *s);
32 
33 int crm_str_to_boolean(const char *s, int *ret);
34 
35 // NOTE: sbd (as of at least 1.5.2) uses this
36 char *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
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
xmlNode * input
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
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1