pacemaker  2.1.2-ada5c3b36
Scalable High-Availability cluster resource manager
services_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2011 Red Hat, Inc.
3  * Later changes copyright 2012-2021 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 SERVICES_PRIVATE__H
12 # define SERVICES_PRIVATE__H
13 
14 # include <glib.h>
15 # include "crm/services.h"
16 
17 #if SUPPORT_DBUS
18 # include <dbus/dbus.h>
19 #endif
20 
21 #define MAX_ARGC 255
23  char *exec;
24  char *exit_reason;
25  char *args[MAX_ARGC];
26 
27  uid_t uid;
28  gid_t gid;
29 
30  guint repeat_timer;
31  void (*callback) (svc_action_t * op);
32  void (*fork_callback) (svc_action_t * op);
33 
34  int stderr_fd;
36 
37  int stdout_fd;
39 
40  int stdin_fd;
41 #if SUPPORT_DBUS
42  DBusPendingCall* pending;
43  unsigned timerid;
44 #endif
45 };
46 
47 G_GNUC_INTERNAL
48 GList *services_os_get_single_directory_list(const char *root, gboolean files,
49  gboolean executable);
50 
51 G_GNUC_INTERNAL
52 GList *services_os_get_directory_list(const char *root, gboolean files, gboolean executable);
53 
54 G_GNUC_INTERNAL
56 
57 G_GNUC_INTERNAL
59 
60 G_GNUC_INTERNAL
61 gboolean recurring_action_timer(gpointer data);
62 
63 G_GNUC_INTERNAL
65 
66 G_GNUC_INTERNAL
68 
69 G_GNUC_INTERNAL
71 
72 G_GNUC_INTERNAL
74 
75 G_GNUC_INTERNAL
76 int services__configuration_error(svc_action_t *op, bool is_fatal);
77 
78 G_GNUC_INTERNAL
79 void services__handle_exec_error(svc_action_t * op, int error);
80 
81 G_GNUC_INTERNAL
83 
84 G_GNUC_INTERNAL
86 
87 G_GNUC_INTERNAL
89 
90 G_GNUC_INTERNAL
91 gboolean is_op_blocked(const char *rsc);
92 
93 #if SUPPORT_DBUS
94 G_GNUC_INTERNAL
95 void services_set_op_pending(svc_action_t *op, DBusPendingCall *pending);
96 #endif
97 
98 #endif /* SERVICES_PRIVATE__H */
Services API.
void(* callback)(svc_action_t *op)
char data[0]
Definition: cpg.c:55
G_GNUC_INTERNAL GList * services_os_get_single_directory_list(const char *root, gboolean files, gboolean executable)
G_GNUC_INTERNAL int services__configuration_error(svc_action_t *op, bool is_fatal)
mainloop_io_t * stderr_gsource
G_GNUC_INTERNAL GList * services_os_get_directory_list(const char *root, gboolean files, gboolean executable)
struct mainloop_io_s mainloop_io_t
Definition: mainloop.h:32
G_GNUC_INTERNAL int services__generic_error(svc_action_t *op)
const char * action
Definition: pcmk_fence.c:30
G_GNUC_INTERNAL gboolean cancel_recurring_action(svc_action_t *op)
Definition: services.c:633
G_GNUC_INTERNAL void services__handle_exec_error(svc_action_t *op, int error)
G_GNUC_INTERNAL int services__authorization_error(svc_action_t *op)
G_GNUC_INTERNAL int services__finalize_async_op(svc_action_t *op)
Object for executing external actions.
Definition: services.h:120
G_GNUC_INTERNAL gboolean recurring_action_timer(gpointer data)
G_GNUC_INTERNAL void services__set_cancelled(svc_action_t *action)
Definition: services.c:1290
#define MAX_ARGC
G_GNUC_INTERNAL int services__not_installed_error(svc_action_t *op)
char * args[MAX_ARGC]
G_GNUC_INTERNAL int services__execute_file(svc_action_t *op)
G_GNUC_INTERNAL gboolean is_op_blocked(const char *rsc)
Definition: services.c:903
mainloop_io_t * stdout_gsource
G_GNUC_INTERNAL void services_add_inflight_op(svc_action_t *op)
Definition: services.c:830
G_GNUC_INTERNAL void services_untrack_op(svc_action_t *op)
Definition: services.c:851
void(* fork_callback)(svc_action_t *op)