diff --git a/lib/services/pcmk-dbus.h b/lib/services/pcmk-dbus.h index 31bcf0eca7..e0713494bd 100644 --- a/lib/services/pcmk-dbus.h +++ b/lib/services/pcmk-dbus.h @@ -1,31 +1,33 @@ /* * Copyright (C) 2014-2016 Andrew Beekhof * * This source code is licensed under GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK_DBUS__H # define PCMK_DBUS__H +# include + # ifndef DBUS_TIMEOUT_USE_DEFAULT # define DBUS_TIMEOUT_USE_DEFAULT -1 # endif DBusConnection *pcmk_dbus_connect(void); void pcmk_dbus_connection_setup_with_select(DBusConnection *c); void pcmk_dbus_disconnect(DBusConnection *connection); DBusPendingCall *pcmk_dbus_send(DBusMessage *msg, DBusConnection *connection, void(*done)(DBusPendingCall *pending, void *user_data), void *user_data, int timeout); DBusMessage *pcmk_dbus_send_recv(DBusMessage *msg, DBusConnection *connection, DBusError *error, int timeout); bool pcmk_dbus_type_check(DBusMessage *msg, DBusMessageIter *field, int expected, const char *function, int line); char *pcmk_dbus_get_property( DBusConnection *connection, const char *target, const char *obj, const gchar * iface, const char *name, void (*callback)(const char *name, const char *value, void *userdata), void *userdata, DBusPendingCall **pending, int timeout); bool pcmk_dbus_find_error(DBusPendingCall *pending, DBusMessage *reply, DBusError *error); #endif /* PCMK_DBUS__H */ diff --git a/lib/services/services_private.h b/lib/services/services_private.h index 0e12d1856b..60b1b14ebc 100644 --- a/lib/services/services_private.h +++ b/lib/services/services_private.h @@ -1,72 +1,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 +# include "crm/services.h" + #if SUPPORT_DBUS # include #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 */ diff --git a/lib/services/systemd.h b/lib/services/systemd.h index 17e654ec11..98150dd39e 100644 --- a/lib/services/systemd.h +++ b/lib/services/systemd.h @@ -1,28 +1,31 @@ /* * 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 * * Copyright (C) 2012 Andrew Beekhof */ #ifndef SYSTEMD__H # define SYSTEMD__H +# include +# include "crm/services.h" + G_GNUC_INTERNAL GList *systemd_unit_listall(void); -G_GNUC_INTERNAL int systemd_unit_exec(svc_action_t * op); +G_GNUC_INTERNAL gboolean systemd_unit_exec(svc_action_t * op); G_GNUC_INTERNAL gboolean systemd_unit_exists(const gchar * name); G_GNUC_INTERNAL gboolean systemd_unit_running(const gchar * name); G_GNUC_INTERNAL void systemd_cleanup(void); #endif /* SYSTEMD__H */ diff --git a/lib/services/upstart.h b/lib/services/upstart.h index 523d2087e7..8d41c11f44 100644 --- a/lib/services/upstart.h +++ b/lib/services/upstart.h @@ -1,31 +1,31 @@ /* * 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 * * Copyright (C) 2010 Senko Rasic * Copyright (c) 2010 Ante Karamatic */ #ifndef UPSTART__H # define UPSTART__H # include # include "crm/services.h" G_GNUC_INTERNAL GList *upstart_job_listall(void); -G_GNUC_INTERNAL int upstart_job_exec(svc_action_t * op, gboolean synchronous); +G_GNUC_INTERNAL gboolean upstart_job_exec(svc_action_t * op, gboolean synchronous); G_GNUC_INTERNAL gboolean upstart_job_exists(const gchar * name); G_GNUC_INTERNAL gboolean upstart_job_running(const gchar * name); G_GNUC_INTERNAL void upstart_cleanup(void); #endif /* UPSTART__H */