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_TICKETS__H
11 #define PCMK__CRM_COMMON_TICKETS__H
12
13 #include <sys/types.h> // time_t
14 #include <glib.h> // gboolean, GHashTable
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 /*!
21 * \file
22 * \brief Scheduler API for tickets
23 * \ingroup core
24 */
25
26 // Ticket constraint object
27 // @COMPAT Make internal when we can break API backward compatibility
28 //!@{
29 //! \deprecated Do not use (public access will be removed in a future release)
30 typedef struct pe_ticket_s {
31 char *id; // XML ID of ticket constraint or state
32 gboolean granted; // Whether cluster has been granted the ticket
33 time_t last_granted; // When cluster was last granted the ticket
34 gboolean standby; // Whether ticket is temporarily suspended
35 GHashTable *state; // XML attributes from ticket state
36 } pcmk_ticket_t;
37 //!@}
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif // PCMK__CRM_COMMON_TICKETS__H