• Home
  • Raw
  • Download

Lines Matching refs:server

87 g_notification_server_notification_added (GNotificationServer *server,  in g_notification_server_notification_added()  argument
94 notifications = g_hash_table_lookup (server->applications, app_id); in g_notification_server_notification_added()
99 g_hash_table_insert (server->applications, g_strdup (app_id), notifications); in g_notification_server_notification_added()
104 g_signal_emit_by_name (server, "notification-received", app_id, notification_id, notification); in g_notification_server_notification_added()
108 g_notification_server_notification_removed (GNotificationServer *server, in g_notification_server_notification_removed() argument
114 notifications = g_hash_table_lookup (server->applications, app_id); in g_notification_server_notification_removed()
119 g_hash_table_remove (server->applications, app_id); in g_notification_server_notification_removed()
122 g_signal_emit_by_name (server, "notification-removed", app_id, notification_id); in g_notification_server_notification_removed()
135 GNotificationServer *server = user_data; in org_gtk_Notifications_method_call() local
144 g_notification_server_notification_added (server, app_id, notification_id, notification); in org_gtk_Notifications_method_call()
155 g_notification_server_notification_removed (server, app_id, notification_id); in org_gtk_Notifications_method_call()
167 GNotificationServer *server = G_NOTIFICATION_SERVER (object); in g_notification_server_dispose() local
169 g_notification_server_stop (server); in g_notification_server_dispose()
171 g_clear_pointer (&server->applications, g_hash_table_unref); in g_notification_server_dispose()
172 g_clear_object (&server->connection); in g_notification_server_dispose()
183 GNotificationServer *server = G_NOTIFICATION_SERVER (object); in g_notification_server_get_property() local
188 g_value_set_boolean (value, server->is_running); in g_notification_server_get_property()
225 GNotificationServer *server = user_data; in g_notification_server_bus_acquired() local
227 server->object_id = g_dbus_connection_register_object (connection, "/org/gtk/Notifications", in g_notification_server_bus_acquired()
229 &vtable, server, NULL, NULL); in g_notification_server_bus_acquired()
232 g_assert (server->object_id > 0); in g_notification_server_bus_acquired()
234 server->connection = g_object_ref (connection); in g_notification_server_bus_acquired()
242 GNotificationServer *server = user_data; in g_notification_server_name_acquired() local
244 server->is_running = TRUE; in g_notification_server_name_acquired()
245 g_object_notify (G_OBJECT (server), "is-running"); in g_notification_server_name_acquired()
253 GNotificationServer *server = user_data; in g_notification_server_name_lost() local
255 g_notification_server_stop (server); in g_notification_server_name_lost()
257 if (connection == NULL && server->connection) in g_notification_server_name_lost()
258 g_clear_object (&server->connection); in g_notification_server_name_lost()
262 g_notification_server_init (GNotificationServer *server) in g_notification_server_init() argument
264 server->applications = g_hash_table_new_full (g_str_hash, g_str_equal, in g_notification_server_init()
267 server->name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, in g_notification_server_init()
273 server, NULL); in g_notification_server_init()
283 g_notification_server_stop (GNotificationServer *server) in g_notification_server_stop() argument
285 g_return_if_fail (G_IS_NOTIFICATION_SERVER (server)); in g_notification_server_stop()
287 if (server->name_owner_id) in g_notification_server_stop()
289 g_bus_unown_name (server->name_owner_id); in g_notification_server_stop()
290 server->name_owner_id = 0; in g_notification_server_stop()
293 if (server->object_id && server->connection) in g_notification_server_stop()
295 g_dbus_connection_unregister_object (server->connection, server->object_id); in g_notification_server_stop()
296 server->object_id = 0; in g_notification_server_stop()
299 if (server->is_running) in g_notification_server_stop()
301 server->is_running = FALSE; in g_notification_server_stop()
302 g_object_notify (G_OBJECT (server), "is-running"); in g_notification_server_stop()
307 g_notification_server_get_is_running (GNotificationServer *server) in g_notification_server_get_is_running() argument
309 g_return_val_if_fail (G_IS_NOTIFICATION_SERVER (server), FALSE); in g_notification_server_get_is_running()
311 return server->is_running; in g_notification_server_get_is_running()
315 g_notification_server_list_applications (GNotificationServer *server) in g_notification_server_list_applications() argument
317 g_return_val_if_fail (G_IS_NOTIFICATION_SERVER (server), NULL); in g_notification_server_list_applications()
319 return (gchar **) g_hash_table_get_keys_as_array (server->applications, NULL); in g_notification_server_list_applications()
323 g_notification_server_list_notifications (GNotificationServer *server, in g_notification_server_list_notifications() argument
328 g_return_val_if_fail (G_IS_NOTIFICATION_SERVER (server), NULL); in g_notification_server_list_notifications()
331 notifications = g_hash_table_lookup (server->applications, app_id); in g_notification_server_list_notifications()