[gjs] Make gjs_dbus_get_weak_ref public; don't distribute dbus-private.h.
- From: C. Scott Ananian <cananian src gnome org>
- To: svn-commits-list gnome org
- Subject: [gjs] Make gjs_dbus_get_weak_ref public; don't distribute dbus-private.h.
- Date: Fri, 5 Jun 2009 15:32:53 -0400 (EDT)
commit fe8811cf1c720622caf0bacd39d249892a0695bf
Author: C. Scott Ananian <cscott litl com>
Date: Fri Jun 5 14:09:56 2009 -0400
Make gjs_dbus_get_weak_ref public; don't distribute dbus-private.h.
Move _gjs_dbus_get_weak_ref into the public API (remove leading underscore)
and don't install the private dbus-private.h header.
---
Makefile-gjs-dbus.am | 4 ++--
gjs-dbus/dbus-private.h | 2 --
gjs-dbus/dbus-signals.c | 10 +++++-----
gjs-dbus/dbus.c | 18 +++++++++---------
gjs-dbus/dbus.h | 3 +++
5 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/Makefile-gjs-dbus.am b/Makefile-gjs-dbus.am
index 54ee4ef..27fe4be 100644
--- a/Makefile-gjs-dbus.am
+++ b/Makefile-gjs-dbus.am
@@ -4,10 +4,10 @@ lib_LTLIBRARIES += libgjs-dbus.la
gjs_dbusheaderdir=$(gjsincludedir)/gjs-dbus
gjs_dbusheader_HEADERS = \
gjs-dbus/dbus.h \
- gjs-dbus/dbus-proxy.h \
- gjs-dbus/dbus-private.h
+ gjs-dbus/dbus-proxy.h
libgjs_dbus_la_SOURCES = \
+ gjs-dbus/dbus-private.h \
gjs-dbus/dbus.c \
gjs-dbus/dbus-signals.c \
gjs-dbus/dbus-proxy.c
diff --git a/gjs-dbus/dbus-private.h b/gjs-dbus/dbus-private.h
index a9cb8d7..1e4fea7 100644
--- a/gjs-dbus/dbus-private.h
+++ b/gjs-dbus/dbus-private.h
@@ -65,8 +65,6 @@ void _gjs_dbus_set_matching_name_owner_changed (DBusConnection *con
const char *bus_name,
gboolean matched);
void _gjs_dbus_ensure_connect_idle (DBusBusType bus_type);
-DBusConnection* _gjs_dbus_get_weak_ref (DBusBusType which_bus);
-
G_END_DECLS
diff --git a/gjs-dbus/dbus-signals.c b/gjs-dbus/dbus-signals.c
index 9910463..77f25d3 100644
--- a/gjs-dbus/dbus-signals.c
+++ b/gjs-dbus/dbus-signals.c
@@ -721,7 +721,7 @@ gjs_dbus_watch_signal(DBusBusType bus_type,
* gets current state on connect, that will be after
* all their match rules are added.
*/
- weak = _gjs_dbus_get_weak_ref(bus_type);
+ weak = gjs_dbus_get_weak_ref(bus_type);
if (weak != NULL) {
signal_watcher_add(weak, _gjs_dbus_ensure_info(weak), watcher);
signal_watcher_unref(watcher);
@@ -795,7 +795,7 @@ unwatch_signal(DBusBusType bus_type,
/* Always remove only ONE watcher (the first one we find) */
- weak = _gjs_dbus_get_weak_ref(bus_type);
+ weak = gjs_dbus_get_weak_ref(bus_type);
/* First see if it's still pending */
for (list = pending_signal_watchers;
@@ -947,8 +947,8 @@ fork_test_signal_service(void)
pid_t child_pid;
/* it would break to fork after we already connected */
- g_assert(_gjs_dbus_get_weak_ref(DBUS_BUS_SESSION) == NULL);
- g_assert(_gjs_dbus_get_weak_ref(DBUS_BUS_SYSTEM) == NULL);
+ g_assert(gjs_dbus_get_weak_ref(DBUS_BUS_SESSION) == NULL);
+ g_assert(gjs_dbus_get_weak_ref(DBUS_BUS_SYSTEM) == NULL);
g_assert(test_service_pid == 0);
child_pid = fork();
@@ -1214,7 +1214,7 @@ bigtest_test_func_util_dbus_signals_client(void)
* next dbus-related test, which allows those tests
* to fork new child processes.
*/
- _gjs_dbus_dispose_info(_gjs_dbus_get_weak_ref(DBUS_BUS_SESSION));
+ _gjs_dbus_dispose_info(gjs_dbus_get_weak_ref(DBUS_BUS_SESSION));
dbus_shutdown();
gjs_debug(GJS_DEBUG_DBUS, "dbus shut down");
diff --git a/gjs-dbus/dbus.c b/gjs-dbus/dbus.c
index 0033019..d539939 100644
--- a/gjs-dbus/dbus.c
+++ b/gjs-dbus/dbus.c
@@ -185,7 +185,7 @@ _gjs_dbus_dispose_info(DBusConnection *connection)
}
DBusConnection*
-_gjs_dbus_get_weak_ref(DBusBusType which_bus)
+gjs_dbus_get_weak_ref(DBusBusType which_bus)
{
if (which_bus == DBUS_BUS_SESSION) {
return session_bus_weak_ref;
@@ -225,7 +225,7 @@ try_connecting(DBusBusType which_bus)
DBusConnection *connection;
GError *error;
- connection = _gjs_dbus_get_weak_ref(which_bus);
+ connection = gjs_dbus_get_weak_ref(which_bus);
if (connection != NULL)
return connection;
@@ -381,7 +381,7 @@ internal_add_connect_funcs(const GjsDBusConnectFuncs *funcs,
*/
DBusConnection *connection;
- connection = _gjs_dbus_get_weak_ref(f->funcs->which_bus);
+ connection = gjs_dbus_get_weak_ref(f->funcs->which_bus);
if (connection != NULL && !f->opened) {
f->opened = TRUE;
@@ -891,7 +891,7 @@ release_name_internal (DBusBusType bus_type,
GjsNameOwnershipMonitor *monitor;
DBusConnection *connection;
- connection = _gjs_dbus_get_weak_ref(bus_type);
+ connection = gjs_dbus_get_weak_ref(bus_type);
if (!connection)
return;
@@ -1329,7 +1329,7 @@ notify_watcher_name_appeared(gpointer data)
watcher = data;
watcher->notify_idle = 0;
- connection = _gjs_dbus_get_weak_ref(watcher->bus_type);
+ connection = gjs_dbus_get_weak_ref(watcher->bus_type);
if (!connection)
return FALSE;
@@ -1444,7 +1444,7 @@ gjs_dbus_watch_name(DBusBusType bus_type,
watcher = name_watcher_new(flags, funcs, data, bus_type);
- connection = _gjs_dbus_get_weak_ref(bus_type);
+ connection = gjs_dbus_get_weak_ref(bus_type);
if (connection) {
GjsDBusInfo *info;
@@ -1498,7 +1498,7 @@ gjs_dbus_unwatch_name(DBusBusType bus_type,
gjs_debug(GJS_DEBUG_DBUS, "Removing watch on name '%s'",
name);
- connection = _gjs_dbus_get_weak_ref(bus_type);
+ connection = gjs_dbus_get_weak_ref(bus_type);
if (connection == NULL) {
/* right now our state is entirely hosed if we disconnect
* (we don't move the watchers out of the connection data),
@@ -1557,7 +1557,7 @@ gjs_dbus_get_watched_name_owner(DBusBusType bus_type,
GjsNameWatch *watch;
GjsDBusInfo *info;
- connection = _gjs_dbus_get_weak_ref(bus_type);
+ connection = gjs_dbus_get_weak_ref(bus_type);
if (connection == NULL) {
return NULL;
}
@@ -2588,7 +2588,7 @@ bigtest_test_func_util_dbus_client(void)
* next dbus-related test, which allows those tests
* to fork new child processes.
*/
- _gjs_dbus_dispose_info(_gjs_dbus_get_weak_ref(DBUS_BUS_SESSION));
+ _gjs_dbus_dispose_info(gjs_dbus_get_weak_ref(DBUS_BUS_SESSION));
dbus_shutdown();
gjs_debug(GJS_DEBUG_DBUS, "dbus shut down");
diff --git a/gjs-dbus/dbus.h b/gjs-dbus/dbus.h
index b6415e9..2a605a8 100644
--- a/gjs-dbus/dbus.h
+++ b/gjs-dbus/dbus.h
@@ -63,6 +63,9 @@ void gjs_dbus_add_bus_weakref (DBusBusType bus_type,
void gjs_dbus_remove_bus_weakref (DBusBusType bus_type,
DBusConnection **connection_p);
+DBusConnection* gjs_dbus_get_weak_ref (DBusBusType which_bus);
+
+
void gjs_dbus_try_connecting_now (DBusBusType which_bus);
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]