diff --git a/lib/services/pcmk-dbus.h b/lib/services/pcmk-dbus.h index c575ddad5f..31bcf0eca7 100644 --- a/lib/services/pcmk-dbus.h +++ b/lib/services/pcmk-dbus.h @@ -1,31 +1,31 @@ /* * 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 -#ifndef DBUS_TIMEOUT_USE_DEFAULT -# define DBUS_TIMEOUT_USE_DEFAULT -1 -#endif +# 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 */ +#endif /* PCMK_DBUS__H */ diff --git a/lib/services/services_private.h b/lib/services/services_private.h index 43aedc6577..0e12d1856b 100644 --- a/lib/services/services_private.h +++ b/lib/services/services_private.h @@ -1,72 +1,72 @@ /* * 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 __MH_SERVICES_PRIVATE_H__ -# define __MH_SERVICES_PRIVATE_H__ +#ifndef SERVICES_PRIVATE__H +# define SERVICES_PRIVATE__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 /* __MH_SERVICES_PRIVATE_H__ */ +#endif /* SERVICES_PRIVATE__H */ diff --git a/lib/services/systemd.h b/lib/services/systemd.h index acd832e9b8..17e654ec11 100644 --- a/lib/services/systemd.h +++ b/lib/services/systemd.h @@ -1,23 +1,28 @@ /* * 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 + 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_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 a8372266c7..523d2087e7 100644 --- a/lib/services/upstart.h +++ b/lib/services/upstart.h @@ -1,32 +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 * - * File: upstart-dbus.c * Copyright (C) 2010 Senko Rasic * Copyright (c) 2010 Ante Karamatic */ -#ifndef _UPSTART_DBUS_H_ -# define _UPSTART_DBUS_H_ +#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_exists(const gchar * name); G_GNUC_INTERNAL gboolean upstart_job_running(const gchar * name); G_GNUC_INTERNAL void upstart_cleanup(void); -#endif /* _UPSTART_DBUS_H_ */ +#endif /* UPSTART__H */