From 94ef8dff0d5da861389f12dee592c42936c4dba9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 1 Nov 2012 19:43:02 -0400 Subject: [PATCH] gdbusactiongroup: Add prototype for g_dbus_action_group_sync() Even private functions that are actually called across compilation units should have prototypes. For g_dbus_action_group_sync(), create one in gdbusactiongroup-private.h https://bugzilla.gnome.org/show_bug.cgi?id=687385 --- gio/Makefile.am | 1 + gio/gactiongroupexporter.c | 2 +- gio/gapplicationimpl-dbus.c | 8 +------- gio/gdbusactiongroup-private.h | 37 ++++++++++++++++++++++++++++++++++ gio/gdbusactiongroup.c | 2 +- 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 gio/gdbusactiongroup-private.h diff --git a/gio/Makefile.am b/gio/Makefile.am index cbafbf668..4a445a37d 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -174,6 +174,7 @@ application_sources = \ gsimpleactiongroup.c \ gremoteactiongroup.c \ gactiongroupexporter.c \ + gdbusactiongroup-private.h \ gdbusactiongroup.c \ gaction.c \ gsimpleaction.c \ diff --git a/gio/gactiongroupexporter.c b/gio/gactiongroupexporter.c index cc33d361a..c90634402 100644 --- a/gio/gactiongroupexporter.c +++ b/gio/gactiongroupexporter.c @@ -45,7 +45,7 @@ * g_dbus_action_group_get() to obtain a #GDBusActionGroup. */ -G_GNUC_INTERNAL GVariant * +static GVariant * g_action_group_describe_action (GActionGroup *action_group, const gchar *name) { diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c index 1248d0f1d..96aab59f2 100644 --- a/gio/gapplicationimpl-dbus.c +++ b/gio/gapplicationimpl-dbus.c @@ -24,7 +24,7 @@ #include "gactiongroup.h" #include "gactiongroupexporter.h" #include "gremoteactiongroup.h" -#include "gdbusactiongroup.h" +#include "gdbusactiongroup-private.h" #include "gapplication.h" #include "gfile.h" #include "gdbusconnection.h" @@ -37,12 +37,6 @@ #include "gapplicationcommandline.h" #include "gdbusmethodinvocation.h" -G_GNUC_INTERNAL gboolean -g_dbus_action_group_sync (GDBusActionGroup *group, - GCancellable *cancellable, - GError **error); - - /* DBus Interface definition {{{1 */ /* For documentation of these interfaces, see diff --git a/gio/gdbusactiongroup-private.h b/gio/gdbusactiongroup-private.h new file mode 100644 index 000000000..8c42b4d7b --- /dev/null +++ b/gio/gdbusactiongroup-private.h @@ -0,0 +1,37 @@ +/* + * Copyright © 2010 Codethink Limited + * Copyright © 2011 Canonical Limited + * + * 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 of the licence or (at + * your option) any later version. + * + * This library 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 + * Lesser 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. + * + * Authors: Ryan Lortie + */ + +#ifndef __G_DBUS_ACTION_GROUP_PRIVATE_H__ +#define __G_DBUS_ACTION_GROUP_PRIVATE_H__ + +#include "gdbusactiongroup.h" + +G_BEGIN_DECLS + +gboolean +g_dbus_action_group_sync (GDBusActionGroup *group, + GCancellable *cancellable, + GError **error); + +G_END_DECLS + +#endif diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c index e17b6c7f9..b73b73658 100644 --- a/gio/gdbusactiongroup.c +++ b/gio/gdbusactiongroup.c @@ -22,7 +22,7 @@ #include "config.h" -#include "gdbusactiongroup.h" +#include "gdbusactiongroup-private.h" #include "gremoteactiongroup.h" #include "gdbusconnection.h" -- 2.34.1