forked from ClusterLabs/pacemaker
/
services_private.h
75 lines (55 loc) · 2.03 KB
/
services_private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Copyright (C) 2010 - 2011, Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SERVICES_PRIVATE__H
# define SERVICES_PRIVATE__H
# include <glib.h>
# include "crm/services.h"
#if SUPPORT_DBUS
# include <dbus/dbus.h>
#endif
#define MAX_ARGC 255
struct svc_action_private_s {
char *exec;
char *args[MAX_ARGC];
guint repeat_timer;
void (*callback) (svc_action_t * op);
int stderr_fd;
mainloop_io_t *stderr_gsource;
int stdout_fd;
mainloop_io_t *stdout_gsource;
#if SUPPORT_DBUS
DBusPendingCall* pending;
unsigned timerid;
#endif
};
GList *services_os_get_directory_list(const char *root, gboolean files, gboolean executable);
gboolean services_os_action_execute(svc_action_t * op, gboolean synchronous);
GList *resources_os_list_lsb_agents(void);
GList *resources_os_list_ocf_providers(void);
GList *resources_os_list_ocf_agents(const char *provider);
GList *resources_os_list_nagios_agents(void);
gboolean cancel_recurring_action(svc_action_t * op);
gboolean recurring_action_timer(gpointer data);
gboolean operation_finalize(svc_action_t * op);
void services_add_inflight_op(svc_action_t *op);
void handle_blocked_ops(void);
gboolean is_op_blocked(const char *rsc);
#if SUPPORT_DBUS
void services_set_op_pending(svc_action_t *op, DBusPendingCall *pending);
#endif
#endif /* SERVICES_PRIVATE__H */