Main Page | Data Structures | File List | Data Fields | Globals

actiondialog.c File Reference

#include "include/alarm_event.h"
#include "rpc-systemui.h"
#include "rpc-dbus.h"
#include "rpc-ic.h"
#include "rpc-mce.h"
#include "actiondialog.h"
#include "event.h"
#include "debug.h"

Include dependency graph for actiondialog.c:

Go to the source code of this file.

Defines

#define STATUSBAR_SERVICE   "com.nokia.statusbar"
 This file is part of alarmd.
#define ALARMD_ACTION_DIALOG_GET_PRIVATE(obj)

Typedefs

typedef _AlarmdActionDialogPrivate AlarmdActionDialogPrivate

Enumerations

enum  properties {
  PROP_TITLE = 1,
  PROP_MESSAGE,
  PROP_SOUND,
  PROP_ICON
}
enum  saved_props {
  S_TITLE,
  S_MESSAGE,
  S_SOUND,
  S_ICON,
  S_COUNT
}
enum  Pending {
  PEND_SERVICE = 1 << 0,
  PEND_CONN = 1 << 1
}

Functions

static void alarmd_action_dialog_init (AlarmdActionDialog *action_dialog)
static void alarmd_action_dialog_class_init (AlarmdActionDialogClass *klass)
static void _alarmd_action_dialog_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
static void _alarmd_action_dialog_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
static void _alarmd_action_dialog_run (AlarmdAction *action, gboolean delayed)
static void _alarmd_action_dialog_real_run (gpointer action, gboolean snoozed)
static void _alarmd_action_dialog_delayed_run (gpointer action)
static void _alarmd_action_dialog_finalize (GObject *object)
static GSList * _alarmd_action_dialog_get_saved_properties (void)
static void _alarmd_action_dialog_real_do_action (AlarmdActionDialog *dialog)
static void _alarmd_action_dialog_snooze_powerup (gpointer user_data, gboolean power_up)
static void _alarmd_action_dialog_powerup (gpointer user_data, gboolean power_up)
static void _alarmd_action_dialog_connected (gpointer act)
GType alarmd_action_dialog_get_type (void)
 SECTION:actiondialog : Base class for actions that show a dialog on events.
void alarmd_action_dialog_do_action (AlarmdActionDialog *dialog)
 alarmd_action_dialog_do_action: : The action that should be done.

Variables

static const gchar *const saved_properties [S_COUNT]


Define Documentation

#define ALARMD_ACTION_DIALOG_GET_PRIVATE obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
                              ALARMD_TYPE_ACTION_DIALOG, AlarmdActionDialogPrivate));

Definition at line 89 of file actiondialog.c.

Referenced by _alarmd_action_dialog_connected(), _alarmd_action_dialog_delayed_run(), _alarmd_action_dialog_finalize(), _alarmd_action_dialog_get_property(), _alarmd_action_dialog_real_run(), _alarmd_action_dialog_run(), _alarmd_action_dialog_set_property(), and alarmd_action_dialog_init().

#define STATUSBAR_SERVICE   "com.nokia.statusbar"
 

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 31 of file actiondialog.c.

Referenced by _alarmd_action_dialog_finalize(), _alarmd_action_dialog_real_run(), _display_icon(), _statusbar_started(), statusbar_hide_icon(), and statusbar_show_icon().


Typedef Documentation

typedef struct _AlarmdActionDialogPrivate AlarmdActionDialogPrivate
 

Definition at line 80 of file actiondialog.c.


Enumeration Type Documentation

enum Pending
 

Enumeration values:
PEND_SERVICE 
PEND_CONN 

Definition at line 75 of file actiondialog.c.

enum properties
 

Enumeration values:
PROP_TITLE 
PROP_MESSAGE 
PROP_SOUND 
PROP_ICON 

Definition at line 53 of file actiondialog.c.

enum saved_props
 

Enumeration values:
S_TITLE 
S_MESSAGE 
S_SOUND 
S_ICON 
S_COUNT 

Definition at line 60 of file actiondialog.c.


Function Documentation

static void _alarmd_action_dialog_connected gpointer  act  )  [static]
 

Definition at line 330 of file actiondialog.c.

References _alarmd_action_dialog_real_run(), ALARM_EVENT_NO_DIALOG, ALARM_EVENT_NO_SNOOZE, ALARMD_ACTION_DIALOG_GET_PRIVATE, alarmd_event_get_time(), ENTER_FUNC, _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, PEND_CONN, _AlarmdActionDialogPrivate::pending, _AlarmdActionDialogPrivate::sound, systemui_alarm_dialog_queue_append(), _AlarmdActionDialogPrivate::title, and update_mce_alarm_visibility().

Referenced by _alarmd_action_dialog_finalize(), and _alarmd_action_dialog_run().

static void _alarmd_action_dialog_delayed_run gpointer  action  )  [static]
 

Definition at line 285 of file actiondialog.c.

References ALARMD_ACTION_DIALOG, alarmd_action_dialog_do_action(), ALARMD_ACTION_DIALOG_GET_PRIVATE, ENTER_FUNC, LEAVE_FUNC, PEND_SERVICE, and _AlarmdActionDialogPrivate::pending.

Referenced by _alarmd_action_dialog_finalize(), and _alarmd_action_dialog_real_run().

static void _alarmd_action_dialog_finalize GObject *  object  )  [static]
 

Definition at line 258 of file actiondialog.c.

References _alarmd_action_dialog_connected(), _alarmd_action_dialog_delayed_run(), ALARMD_ACTION_DIALOG_GET_PRIVATE, ALARMD_TYPE_ACTION_DIALOG, dbus_unwatch_name(), ENTER_FUNC, ic_unwait_connection(), _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, PEND_CONN, PEND_SERVICE, _AlarmdActionDialogPrivate::pending, _AlarmdActionDialogPrivate::sound, STATUSBAR_SERVICE, and _AlarmdActionDialogPrivate::title.

Referenced by alarmd_action_dialog_class_init().

static void _alarmd_action_dialog_get_property GObject *  object,
guint  param_id,
GValue *  value,
GParamSpec *  pspec
[static]
 

Definition at line 231 of file actiondialog.c.

References ALARMD_ACTION_DIALOG_GET_PRIVATE, ENTER_FUNC, _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, PROP_ICON, PROP_MESSAGE, PROP_SOUND, PROP_TITLE, _AlarmdActionDialogPrivate::sound, and _AlarmdActionDialogPrivate::title.

Referenced by alarmd_action_dialog_class_init().

static GSList * _alarmd_action_dialog_get_saved_properties void   )  [static]
 

Definition at line 387 of file actiondialog.c.

References ALARMD_OBJECT_CLASS, ALARMD_TYPE_ACTION_DIALOG, ENTER_FUNC, LEAVE_FUNC, S_COUNT, and saved_properties.

Referenced by alarmd_action_dialog_class_init().

static void _alarmd_action_dialog_powerup gpointer  user_data,
gboolean  power_up
[static]
 

Definition at line 407 of file actiondialog.c.

References ACK_NORMAL, ALARMD_ACTION, alarmd_action_acknowledge(), ENTER_FUNC, get_dbus_connection(), LEAVE_FUNC, mce_request_powerup(), system_bus, and update_mce_alarm_visibility().

Referenced by _alarmd_action_dialog_real_run().

static void _alarmd_action_dialog_real_do_action AlarmdActionDialog dialog  )  [static]
 

Definition at line 400 of file actiondialog.c.

References ACK_NORMAL, ALARMD_ACTION, alarmd_action_acknowledge(), ENTER_FUNC, and LEAVE_FUNC.

Referenced by alarmd_action_dialog_class_init().

static void _alarmd_action_dialog_real_run gpointer  action,
gboolean  snoozed
[static]
 

Definition at line 294 of file actiondialog.c.

References _alarmd_action_dialog_delayed_run(), _alarmd_action_dialog_powerup(), _alarmd_action_dialog_snooze_powerup(), ACK_SNOOZE, ALARM_EVENT_ACTDEAD, ALARM_EVENT_NO_DIALOG, ALARMD_ACTION, alarmd_action_acknowledge(), ALARMD_ACTION_DIALOG, alarmd_action_dialog_do_action(), ALARMD_ACTION_DIALOG_GET_PRIVATE, dbus_watch_name(), ENTER_FUNC, get_dbus_connection(), LEAVE_FUNC, mce_request_powerup(), PEND_SERVICE, _AlarmdActionDialogPrivate::pending, STATUSBAR_SERVICE, system_bus, systemui_is_acting_dead(), and systemui_powerup_dialog_queue_append().

Referenced by _alarmd_action_dialog_connected(), and _alarmd_action_dialog_run().

static void _alarmd_action_dialog_run AlarmdAction action,
gboolean  delayed
[static]
 

Definition at line 357 of file actiondialog.c.

References _alarmd_action_dialog_connected(), _alarmd_action_dialog_real_run(), ACK_NORMAL, ALARM_EVENT_CONNECTED, ALARM_EVENT_NO_DIALOG, ALARM_EVENT_NO_SNOOZE, ALARM_EVENT_RUN_DELAYED, alarmd_action_acknowledge(), ALARMD_ACTION_DIALOG_GET_PRIVATE, alarmd_event_get_time(), ENTER_FUNC, ic_get_connected(), ic_wait_connection(), _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, PEND_CONN, _AlarmdActionDialogPrivate::pending, _AlarmdActionDialogPrivate::sound, systemui_alarm_dialog_queue_append(), _AlarmdActionDialogPrivate::title, and update_mce_alarm_visibility().

Referenced by alarmd_action_dialog_class_init().

static void _alarmd_action_dialog_set_property GObject *  object,
guint  param_id,
const GValue *  value,
GParamSpec *  pspec
[static]
 

Definition at line 189 of file actiondialog.c.

References ALARMD_ACTION_DIALOG_GET_PRIVATE, ALARMD_OBJECT, alarmd_object_changed(), ENTER_FUNC, _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, PROP_ICON, PROP_MESSAGE, PROP_SOUND, PROP_TITLE, _AlarmdActionDialogPrivate::sound, and _AlarmdActionDialogPrivate::title.

Referenced by alarmd_action_dialog_class_init().

static void _alarmd_action_dialog_snooze_powerup gpointer  user_data,
gboolean  power_up
[static]
 

Definition at line 424 of file actiondialog.c.

References ACK_SNOOZE, ALARMD_ACTION, alarmd_action_acknowledge(), ENTER_FUNC, get_dbus_connection(), LEAVE_FUNC, mce_request_powerup(), system_bus, and update_mce_alarm_visibility().

Referenced by _alarmd_action_dialog_real_run().

static void alarmd_action_dialog_class_init AlarmdActionDialogClass klass  )  [static]
 

Definition at line 128 of file actiondialog.c.

References _alarmd_action_dialog_finalize(), _alarmd_action_dialog_get_property(), _alarmd_action_dialog_get_saved_properties(), _alarmd_action_dialog_real_do_action(), _alarmd_action_dialog_run(), _alarmd_action_dialog_set_property(), ALARMD_ACTION_CLASS, ALARMD_OBJECT_CLASS, ENTER_FUNC, _AlarmdObjectClass::get_saved_properties, LEAVE_FUNC, PROP_ICON, PROP_MESSAGE, PROP_SOUND, PROP_TITLE, and _AlarmdActionClass::run.

Referenced by alarmd_action_dialog_get_type().

void alarmd_action_dialog_do_action AlarmdActionDialog dialog  ) 
 

alarmd_action_dialog_do_action: : The action that should be done.

Does the action of the AlarmdActionDialog.

Definition at line 121 of file actiondialog.c.

References ALARMD_ACTION_DIALOG_GET_CLASS, ENTER_FUNC, and LEAVE_FUNC.

Referenced by _alarmd_action_dialog_delayed_run(), and _alarmd_action_dialog_real_run().

GType alarmd_action_dialog_get_type void   ) 
 

SECTION:actiondialog : Base class for actions that show a dialog on events.

: #AlarmdActionDBus, AlarmdActionExec.

AlarmdActionDialog is an action type that, upon firing, may show a dialog if flagged so in AlarmdActionDialog:flags. After the dialog has been acknowledged, this action type does nothing, use AlarmdActionExec or AlarmdActionDbus to do something afterwards. The charasteristics of the dialog are determined by the properties AlarmdActionDialog:title, AlarmdActionDialog:icon, AlarmdActionDialog:message, AlarmdActionDialog:sound and AlarmdActionDialog:flags.

Definition at line 93 of file actiondialog.c.

References alarmd_action_dialog_class_init(), alarmd_action_dialog_init(), and ALARMD_TYPE_ACTION.

static void alarmd_action_dialog_init AlarmdActionDialog action_dialog  )  [static]
 

Definition at line 176 of file actiondialog.c.

References ALARMD_ACTION_DIALOG_GET_PRIVATE, ENTER_FUNC, _AlarmdActionDialogPrivate::icon, LEAVE_FUNC, _AlarmdActionDialogPrivate::message, _AlarmdActionDialogPrivate::pending, _AlarmdActionDialogPrivate::sound, and _AlarmdActionDialogPrivate::title.

Referenced by alarmd_action_dialog_get_type().


Variable Documentation

const gchar* const saved_properties[S_COUNT] [static]
 

Initial value:

 {
        "title",
        "message",
        "sound",
        "icon",
}

Definition at line 68 of file actiondialog.c.


Generated on Thu Dec 21 18:23:30 2006 for Alarmd by  doxygen 1.4.2