#include <dbus/dbus.h>
#include <glib/gthread.h>
#include <glib/gslist.h>
#include <glib/gstrfuncs.h>
#include <systemui/dbus-names.h>
#include <systemui/alarm_dialog-dbus-names.h>
#include <systemui/actingdead-dbus-names.h>
#include <string.h>
#include "debug.h"
#include "include/alarm_dbus.h"
#include "rpc-dbus.h"
#include "rpc-systemui.h"
#include "rpc-mce.h"
Include dependency graph for rpc-systemui.c:
Go to the source code of this file.
Defines | |
#define | ALARMD_ACTION_DBUS_METHOD "action_dbus_return" |
This file is part of alarmd. | |
Typedefs | |
typedef _SystemuiAlarmdDialog | SystemuiAlarmdDialog |
Enumerations | |
enum | response { RESPONSE_ACCEPT = -3 } |
enum | flag { FLAG_CAN_SNOOZE = 1 << 0, FLAG_POWERUP = 1 << 1 } |
Functions | |
static void | _dialog_free (SystemuiAlarmdDialog *dialog) |
static gboolean | _resend_message (gpointer user_data) |
static DBusConnection * | _dbus_connect (void) |
static void | _dbus_disconnect (DBusConnection *conn) |
static void | _queue_changed (void) |
static void | _close_dialog (void) |
static gint | _queue_compare (gconstpointer v1, gconstpointer v2) |
static gboolean | _dialog_do_cb (gpointer data) |
static DBusHandlerResult | _dialog_ackd (DBusConnection *connection, DBusMessage *message, void *user_data) |
static void | _systemui_dialog_queue_append (time_t alarm_time, const gchar *title, const gchar *message, const gchar *sound, const gchar *icon, enum flag flags, SystemuiAlarmdDialogCallback cb, gpointer user_data) |
void | systemui_powerup_dialog_queue_append (SystemuiAlarmdDialogCallback cb, gpointer user_data) |
systemui_powerup_dialog_queue_append: : Callback called when the dialog is acknowledged. | |
void | systemui_alarm_dialog_queue_append (time_t alarm_time, const gchar *title, const gchar *message, const gchar *sound, const gchar *icon, gboolean can_snooze, SystemuiAlarmdDialogCallback cb, gpointer user_data) |
systemui_alarm_dialog_queue_append: : Title of the dialog to be appended to the queue. | |
void | systemui_powerup_dialog_queue_remove (SystemuiAlarmdDialogCallback cb, gpointer user_data) |
systemui_powerup_dialog_queue_remove: : As passed to systemui_powerup_dialog_queue_append. | |
void | systemui_alarm_dialog_queue_remove (time_t alarm_time, const gchar *title, const gchar *message, const gchar *sound, const gchar *icon, SystemuiAlarmdDialogCallback cb, gpointer user_data) |
systemui_alarm_dialog_queue_remove: : As passed to systemui_alarm_dialog_queue_append. | |
void | update_mce_alarm_visibility (void) |
update_mce_alarm_visibility: | |
void | systemui_ack_all_dialogs (void) |
systemui_ack_all_dialogs: | |
gboolean | systemui_is_acting_dead (void) |
systemui_is_acting_dead: | |
Variables | |
static GStaticMutex | queue_mutex = G_STATIC_MUTEX_INIT |
static GSList * | dialog_queue = NULL |
static DBusConnection * | system_bus = NULL |
static gboolean | mce_dialog_visible = FALSE |
|
This file is part of alarmd. Contact Person: David Weinehall <david.weinehall@nokia.com> Copyright (C) 2006 Nokia Corporation alarmd and libalarm are free software; you can redistribute them and/or modify them under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. alarmd and libalarm are distributed in the hope that they 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 software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Definition at line 37 of file rpc-systemui.c. Referenced by _dialog_ackd(), _queue_changed(), and _resend_message(). |
|
Definition at line 49 of file rpc-systemui.c. |
|
Definition at line 44 of file rpc-systemui.c. |
|
Definition at line 40 of file rpc-systemui.c. |
|
Definition at line 274 of file rpc-systemui.c. References _dbus_disconnect(), dbus_do_call(), ENTER_FUNC, LEAVE_FUNC, queue_mutex, and system_bus. Referenced by systemui_ack_all_dialogs(), and systemui_alarm_dialog_queue_remove(). |
|
Definition at line 294 of file rpc-systemui.c. References _dialog_ackd(), ALARMD_SERVICE, ENTER_FUNC, get_dbus_connection(), and LEAVE_FUNC. Referenced by _queue_changed(). |
|
Definition at line 314 of file rpc-systemui.c. References _dialog_ackd(), ENTER_FUNC, and LEAVE_FUNC. Referenced by _close_dialog(), _dialog_ackd(), and _queue_changed(). |
|
Definition at line 334 of file rpc-systemui.c. References _dbus_disconnect(), _dialog_do_cb(), _dialog_free(), _queue_changed(), ALARMD_ACTION_DBUS_METHOD, ALARMD_INTERFACE, DEBUG, dialog_queue, ENTER_FUNC, LEAVE_FUNC, queue_mutex, _SystemuiAlarmdDialog::status, system_bus, and _SystemuiAlarmdDialog::timer_id. Referenced by _dbus_connect(), and _dbus_disconnect(). |
|
Definition at line 324 of file rpc-systemui.c. References _SystemuiAlarmdDialog::cb, _SystemuiAlarmdDialog::status, and _SystemuiAlarmdDialog::user_data. Referenced by _dialog_ackd(). |
|
Definition at line 173 of file rpc-systemui.c. References ENTER_FUNC, and LEAVE_FUNC. Referenced by _dialog_ackd(), and systemui_alarm_dialog_queue_remove(). |
|
|
Definition at line 137 of file rpc-systemui.c. References _SystemuiAlarmdDialog::alarm_time, _SystemuiAlarmdDialog::cb, ENTER_FUNC, _SystemuiAlarmdDialog::icon, LEAVE_FUNC, _SystemuiAlarmdDialog::message, _SystemuiAlarmdDialog::sound, _SystemuiAlarmdDialog::title, and _SystemuiAlarmdDialog::user_data. Referenced by systemui_alarm_dialog_queue_remove(). |
|
|
|
systemui_ack_all_dialogs: Clears the queue acknowledging all alarms and tells systemui to close the currently showing one. Definition at line 419 of file rpc-systemui.c. References _close_dialog(), _SystemuiAlarmdDialog::cb, dialog_queue, ENTER_FUNC, LEAVE_FUNC, queue_mutex, _SystemuiAlarmdDialog::timer_id, and _SystemuiAlarmdDialog::user_data. Referenced by _osso_hw_cb(). |
|
systemui_alarm_dialog_queue_append: : Title of the dialog to be appended to the queue. : Message of the dialog to be appended to the queue. : Sound for the dialog to be appended to the queue. : Icon for the dialog to be appended to the queue. : TRUE if the dialog should have snooze button enabled. : Callback called when the dialog is acknowledged. : user date to pass to the callback. Adds a request for a dialog to the queue. After the dialog has been acknowledged, the request is removed from the queue, no need to remove it manually. Definition at line 87 of file rpc-systemui.c. References _systemui_dialog_queue_append(), and FLAG_CAN_SNOOZE. Referenced by _alarmd_action_dialog_connected(), and _alarmd_action_dialog_run(). |
|
systemui_alarm_dialog_queue_remove: : As passed to systemui_alarm_dialog_queue_append. : As passed to systemui_alarm_dialog_queue_append. : As passed to systemui_alarm_dialog_queue_append. : As passed to systemui_alarm_dialog_queue_append. : As passed to systemui_alarm_dialog_queue_append. : As passed to systemui_alarm_dialog_queue_append. Removes an alarm dialog request from the dialog queue. Definition at line 97 of file rpc-systemui.c. References _close_dialog(), _dialog_free(), _queue_changed(), _queue_compare(), _SystemuiAlarmdDialog::alarm_time, dialog_queue, ENTER_FUNC, LEAVE_FUNC, queue_mutex, system_bus, and _SystemuiAlarmdDialog::timer_id. Referenced by systemui_powerup_dialog_queue_remove(). |
|
systemui_is_acting_dead: Queries system UI whether the acting dead mode is enabled or not. Returns: TRUE if device is in acting dead, false otherwise. Definition at line 495 of file rpc-systemui.c. References dbus_do_call(), ENTER_FUNC, get_dbus_connection(), LEAVE_FUNC, and system_bus. Referenced by _alarmd_action_dialog_real_run(). |
|
systemui_powerup_dialog_queue_append: : Callback called when the dialog is acknowledged. : user date to pass to the callback. Appends a powerup dialog request to the dialog queue. After the dialog has been acknowledged, the request is removed from the queue, no need to remove it manually. Definition at line 82 of file rpc-systemui.c. References _systemui_dialog_queue_append(), and FLAG_POWERUP. Referenced by _alarmd_action_dialog_real_run(). |
|
systemui_powerup_dialog_queue_remove: : As passed to systemui_powerup_dialog_queue_append. : As passed to systemui_powerup_dialog_queue_append. Removes a powerup dialog request from the dialog queue. Definition at line 92 of file rpc-systemui.c. References systemui_alarm_dialog_queue_remove(). |
|
update_mce_alarm_visibility: Sends message to mce telling the alarm dialog visibility status. Definition at line 402 of file rpc-systemui.c. References conn, dialog_queue, get_dbus_connection(), mce_dialog_visible, mce_set_alarm_visibility(), and queue_mutex. Referenced by _alarmd_action_dialog_connected(), _alarmd_action_dialog_powerup(), _alarmd_action_dialog_run(), _alarmd_action_dialog_snooze_powerup(), and _alarmd_action_real_acknowledge(). |
|
Definition at line 65 of file rpc-systemui.c. Referenced by _dialog_ackd(), _queue_changed(), _systemui_dialog_queue_append(), systemui_ack_all_dialogs(), systemui_alarm_dialog_queue_remove(), and update_mce_alarm_visibility(). |
|
Definition at line 67 of file rpc-systemui.c. Referenced by update_mce_alarm_visibility(). |
|
Definition at line 64 of file rpc-systemui.c. Referenced by _close_dialog(), _dialog_ackd(), _queue_changed(), _resend_message(), _systemui_dialog_queue_append(), systemui_ack_all_dialogs(), systemui_alarm_dialog_queue_remove(), and update_mce_alarm_visibility(). |
|
Definition at line 66 of file rpc-systemui.c. |