pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
services_private.h
Go to the documentation of this file.
1/*
2 * Copyright 2010-2011 Red Hat, Inc.
3 * Later changes copyright 2012-2025 the Pacemaker project contributors
4 *
5 * The version control history for this file may have further details.
6 *
7 * This source code is licensed under the GNU Lesser General Public License
8 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
9 */
10
11#ifndef PCMK__SERVICES_SERVICES_PRIVATE__H
12#define PCMK__SERVICES_SERVICES_PRIVATE__H
13
14#include <unistd.h> // uid_t, gid_t
15
16#include <glib.h> // G_GNUC_INTERNAL, gboolean, guint, etc.
17#if HAVE_DBUS
18#include <dbus/dbus.h> // DBusPendingCall
19#endif
20
21#include <crm/common/mainloop.h> // mainloop_io_t
22#include <crm/services.h> // svc_action_t
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#define MAX_ARGC 255
30 char *exec;
32 char *args[MAX_ARGC];
33
34 uid_t uid;
35 gid_t gid;
36
38 void (*callback) (svc_action_t * op);
40
43
46
48#if HAVE_DBUS
49 DBusPendingCall* pending;
50 unsigned timerid;
51#endif
52
53#if SUPPORT_SYSTEMD
54 char *job_path; // D-Bus object path for enqueued start/stop job
55#endif // SUPPORT_SYSTEMD
56};
57
58G_GNUC_INTERNAL
59const char *services__action_kind(const svc_action_t *action);
60
61G_GNUC_INTERNAL
62GList *services_os_get_single_directory_list(const char *root, gboolean files,
63 gboolean executable);
64
65G_GNUC_INTERNAL
66GList *services_os_get_directory_list(const char *root, gboolean files, gboolean executable);
67
68G_GNUC_INTERNAL
70
71G_GNUC_INTERNAL
73
74G_GNUC_INTERNAL
75gboolean recurring_action_timer(gpointer data);
76
77G_GNUC_INTERNAL
79
80G_GNUC_INTERNAL
82
83G_GNUC_INTERNAL
85
86G_GNUC_INTERNAL
88
89G_GNUC_INTERNAL
90int services__configuration_error(const svc_action_t *op, bool is_fatal);
91
92G_GNUC_INTERNAL
93void services__handle_exec_error(svc_action_t * op, int error);
94
95G_GNUC_INTERNAL
97
98G_GNUC_INTERNAL
100
101G_GNUC_INTERNAL
102void services_untrack_op(const svc_action_t *op);
103
104G_GNUC_INTERNAL
105gboolean is_op_blocked(const char *rsc);
106
107#if HAVE_DBUS
108G_GNUC_INTERNAL
109void services_set_op_pending(svc_action_t *op, DBusPendingCall *pending);
110#endif
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif // PCMK__SERVICES_SERVICES_PRIVATE__H
char data[0]
Definition cpg.c:10
Wrappers for and extensions to glib mainloop.
struct mainloop_io_s mainloop_io_t
Definition mainloop.h:41
const char * action
Definition pcmk_fence.c:32
Services API.
G_GNUC_INTERNAL GList * services_os_get_single_directory_list(const char *root, gboolean files, gboolean executable)
G_GNUC_INTERNAL int services__generic_error(const svc_action_t *op)
G_GNUC_INTERNAL gboolean is_op_blocked(const char *rsc)
Definition services.c:889
G_GNUC_INTERNAL int services__finalize_async_op(svc_action_t *op)
G_GNUC_INTERNAL void services_untrack_op(const svc_action_t *op)
Definition services.c:835
G_GNUC_INTERNAL void services_add_inflight_op(svc_action_t *op)
Definition services.c:814
G_GNUC_INTERNAL int services__execute_file(svc_action_t *op)
G_GNUC_INTERNAL gboolean recurring_action_timer(gpointer data)
G_GNUC_INTERNAL void services__handle_exec_error(svc_action_t *op, int error)
G_GNUC_INTERNAL int services__authorization_error(const svc_action_t *op)
G_GNUC_INTERNAL const char * services__action_kind(const svc_action_t *action)
Definition services.c:1313
#define MAX_ARGC
G_GNUC_INTERNAL gboolean cancel_recurring_action(svc_action_t *op)
Definition services.c:624
G_GNUC_INTERNAL int services__not_installed_error(const svc_action_t *op)
G_GNUC_INTERNAL int services__configuration_error(const svc_action_t *op, bool is_fatal)
G_GNUC_INTERNAL GList * services_os_get_directory_list(const char *root, gboolean files, gboolean executable)
G_GNUC_INTERNAL void services__set_cancelled(svc_action_t *action)
Definition services.c:1295
char * args[MAX_ARGC]
void(* fork_callback)(svc_action_t *op)
mainloop_io_t * stdout_gsource
mainloop_io_t * stderr_gsource
void(* callback)(svc_action_t *op)
Object for executing external actions.
Definition services.h:99