static void vino_prompt_handle_response (NotifyNotification *notification, char *response, gpointer user_data) { VinoPrompt *prompt = user_data; rfbClientPtr rfb_client; int prompt_response = VINO_RESPONSE_INVALID; dprintf (PROMPT, "Got a response for client %p: %s\n", prompt->priv->current_client, response); if (g_strcmp0 (response, "accept") == 0) prompt_response = VINO_RESPONSE_ACCEPT; else prompt_response = VINO_RESPONSE_REJECT; rfb_client = prompt->priv->current_client; prompt->priv->current_client = NULL; clear_notification (prompt); if (rfb_client != NULL) { emit_response_signal (prompt, rfb_client, prompt_response); } vino_prompt_process_pending_clients (prompt); }
void CNotificationManager::step() { if (LumenClock.get_uptime() < time_end || notification_sticky) { (*current_notification)->step(); } else { clear_notification(); } }
static void vino_prompt_finalize (GObject *object) { VinoPrompt *prompt = VINO_PROMPT (object); g_slist_free (prompt->priv->pending_clients); prompt->priv->pending_clients = NULL; clear_notification (prompt); g_free (prompt->priv); prompt->priv = NULL; if (G_OBJECT_CLASS (vino_prompt_parent_class)->finalize) G_OBJECT_CLASS (vino_prompt_parent_class)->finalize (object); }
void vino_prompt_remove_client (VinoPrompt *prompt, rfbClientPtr rfb_client) { g_return_if_fail (VINO_IS_PROMPT (prompt)); g_return_if_fail (rfb_client != NULL); if (prompt->priv->current_client == rfb_client) { clear_notification (prompt); } else { prompt->priv->pending_clients = g_slist_remove (prompt->priv->pending_clients, rfb_client); } }