mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Add g_dbus_object_manager_server_is_exported()
Returns whether a GDBusObjectSkeleton is exported on a GDBusObjectManagerServer. https://bugzilla.gnome.org/show_bug.cgi?id=678539
This commit is contained in:
parent
aae1633d0f
commit
49e5075707
@ -3652,6 +3652,7 @@ g_dbus_object_manager_server_get_connection
|
|||||||
g_dbus_object_manager_server_set_connection
|
g_dbus_object_manager_server_set_connection
|
||||||
g_dbus_object_manager_server_export
|
g_dbus_object_manager_server_export
|
||||||
g_dbus_object_manager_server_export_uniquely
|
g_dbus_object_manager_server_export_uniquely
|
||||||
|
g_dbus_object_manager_server_is_exported
|
||||||
g_dbus_object_manager_server_unexport
|
g_dbus_object_manager_server_unexport
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
G_DBUS_OBJECT_MANAGER_SERVER
|
G_DBUS_OBJECT_MANAGER_SERVER
|
||||||
|
@ -598,6 +598,40 @@ g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_dbus_object_manager_server_is_exported:
|
||||||
|
* @manager: A #GDBusObjectManagerServer.
|
||||||
|
* @object: An object.
|
||||||
|
*
|
||||||
|
* Returns whether @object is currently exported on @manager.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if @object is exported
|
||||||
|
*
|
||||||
|
* Since: 2.34
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager,
|
||||||
|
GDBusObjectSkeleton *object)
|
||||||
|
{
|
||||||
|
RegistrationData *data = NULL;
|
||||||
|
const gchar *object_path;
|
||||||
|
gboolean object_is_exported;
|
||||||
|
|
||||||
|
g_return_val_if_fail (G_IS_DBUS_OBJECT_MANAGER_SERVER (manager), FALSE);
|
||||||
|
g_return_val_if_fail (G_IS_DBUS_OBJECT (object), FALSE);
|
||||||
|
|
||||||
|
g_mutex_lock (&manager->priv->lock);
|
||||||
|
|
||||||
|
object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (object));
|
||||||
|
if (object_path != NULL)
|
||||||
|
data = g_hash_table_lookup (manager->priv->map_object_path_to_data, object_path);
|
||||||
|
object_is_exported = (data != NULL);
|
||||||
|
|
||||||
|
g_mutex_unlock (&manager->priv->lock);
|
||||||
|
|
||||||
|
return object_is_exported;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -77,6 +77,8 @@ void g_dbus_object_manager_server_export (GDBu
|
|||||||
GDBusObjectSkeleton *object);
|
GDBusObjectSkeleton *object);
|
||||||
void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager,
|
void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager,
|
||||||
GDBusObjectSkeleton *object);
|
GDBusObjectSkeleton *object);
|
||||||
|
gboolean g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager,
|
||||||
|
GDBusObjectSkeleton *object);
|
||||||
gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
|
gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
|
||||||
const gchar *object_path);
|
const gchar *object_path);
|
||||||
|
|
||||||
|
@ -1644,6 +1644,7 @@ g_dbus_object_manager_client_new_for_bus_sync
|
|||||||
g_dbus_object_manager_client_new_sync
|
g_dbus_object_manager_client_new_sync
|
||||||
g_dbus_object_manager_server_export
|
g_dbus_object_manager_server_export
|
||||||
g_dbus_object_manager_server_export_uniquely
|
g_dbus_object_manager_server_export_uniquely
|
||||||
|
g_dbus_object_manager_server_is_exported
|
||||||
g_dbus_object_manager_server_get_connection
|
g_dbus_object_manager_server_get_connection
|
||||||
g_dbus_object_manager_server_set_connection
|
g_dbus_object_manager_server_set_connection
|
||||||
g_dbus_object_manager_server_get_type
|
g_dbus_object_manager_server_get_type
|
||||||
|
Loading…
Reference in New Issue
Block a user