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

action.c File Reference

#include <glib.h>
#include <glib-object.h>
#include "include/alarm_event.h"
#include "action.h"
#include "event.h"
#include "rpc-systemui.h"
#include "rpc-statusbar.h"
#include "debug.h"

Include dependency graph for action.c:

Go to the source code of this file.

Defines

#define ALARMD_ACTION_GET_PRIVATE(obj)

Typedefs

typedef _AlarmdActionPrivate AlarmdActionPrivate

Enumerations

enum  properties {
  PROP_EVENT = 1,
  PROP_FLAGS
}
enum  saved_props {
  S_FLAGS,
  S_COUNT
}
enum  signals {
  SIGNAL_RUN,
  SIGNAL_ACKNOWLEDGE,
  SIGNAL_COUNT
}

Functions

static void _alarmd_action_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
 This file is part of alarmd.
static void _alarmd_action_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
static void _alarmd_action_finalize (GObject *object)
static void alarmd_action_init (AlarmdAction *action)
static void alarmd_action_class_init (AlarmdActionClass *klass)
static void _alarmd_action_real_run (AlarmdAction *action, gboolean delayed)
static void _alarmd_action_real_acknowledge (AlarmdAction *action, AlarmdActionAckType ack_type)
static gboolean _alarmd_action_real_need_power_up (AlarmdAction *action)
static GSList * _alarmd_action_get_saved_properties (void)
GType alarmd_action_get_type (void)
 AlarmdAction::run: : The action that is run.
AlarmdActionalarmd_action_new (void)
 alarmd_action_new:
void alarmd_action_run (AlarmdAction *action, gboolean delayed)
 alarmd_action_run: : A AlarmdAction that should be run.
void alarmd_action_acknowledge (AlarmdAction *action, guint ack_type)
gboolean alarmd_action_need_power_up (AlarmdAction *action)
 alarmd_action_need_power_up: : AlarmdAction that is being queried.

Variables

static const gchar *const saved_properties [S_COUNT]
static guint action_signals [SIGNAL_COUNT]


Define Documentation

#define ALARMD_ACTION_GET_PRIVATE obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
                              ALARMD_TYPE_ACTION, AlarmdActionPrivate));

Definition at line 71 of file action.c.

Referenced by _alarmd_action_finalize(), _alarmd_action_get_property(), _alarmd_action_real_need_power_up(), and _alarmd_action_set_property().


Typedef Documentation

typedef struct _AlarmdActionPrivate AlarmdActionPrivate
 

Definition at line 75 of file action.c.


Enumeration Type Documentation

enum properties
 

Enumeration values:
PROP_EVENT 
PROP_FLAGS 

Definition at line 49 of file action.c.

enum saved_props
 

Enumeration values:
S_FLAGS 
S_COUNT 

Definition at line 54 of file action.c.

enum signals
 

Enumeration values:
SIGNAL_RUN 
SIGNAL_ACKNOWLEDGE 
SIGNAL_COUNT 

Definition at line 63 of file action.c.


Function Documentation

static void _alarmd_action_finalize GObject *  object  )  [static]
 

Definition at line 190 of file action.c.

References ALARM_EVENT_SHOW_ICON, ALARMD_ACTION_GET_PRIVATE, ALARMD_TYPE_ACTION, ENTER_FUNC, _AlarmdActionPrivate::event, _AlarmdActionPrivate::flags, LEAVE_FUNC, and statusbar_hide_icon().

Referenced by alarmd_action_class_init().

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

Definition at line 170 of file action.c.

References ALARMD_ACTION_GET_PRIVATE, ENTER_FUNC, _AlarmdActionPrivate::event, _AlarmdActionPrivate::flags, LEAVE_FUNC, PROP_EVENT, and PROP_FLAGS.

Referenced by alarmd_action_class_init().

static GSList * _alarmd_action_get_saved_properties void   )  [static]
 

Definition at line 311 of file action.c.

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

Referenced by alarmd_action_class_init().

static void _alarmd_action_real_acknowledge AlarmdAction action,
AlarmdActionAckType  ack_type
[static]
 

Definition at line 300 of file action.c.

References ENTER_FUNC, LEAVE_FUNC, and update_mce_alarm_visibility().

Referenced by alarmd_action_class_init().

static gboolean _alarmd_action_real_need_power_up AlarmdAction action  )  [static]
 

Definition at line 291 of file action.c.

References ALARM_EVENT_BOOT, ALARMD_ACTION_GET_PRIVATE, DEBUG, ENTER_FUNC, _AlarmdActionPrivate::flags, and LEAVE_FUNC.

Referenced by alarmd_action_class_init().

static void _alarmd_action_real_run AlarmdAction action,
gboolean  delayed
[static]
 

Definition at line 266 of file action.c.

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

Referenced by alarmd_action_class_init().

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

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 133 of file action.c.

References ALARM_EVENT_SHOW_ICON, ALARMD_ACTION_GET_PRIVATE, ENTER_FUNC, _AlarmdActionPrivate::event, _AlarmdActionPrivate::flags, LEAVE_FUNC, PROP_EVENT, PROP_FLAGS, statusbar_hide_icon(), and statusbar_show_icon().

Referenced by alarmd_action_class_init().

void alarmd_action_acknowledge AlarmdAction action,
guint  ack_type
 

Definition at line 274 of file action.c.

References action_signals, ALARMD_OBJECT, ENTER_FUNC, LEAVE_FUNC, and SIGNAL_ACKNOWLEDGE.

Referenced by _alarmd_action_dbus_do_action(), _alarmd_action_dialog_powerup(), _alarmd_action_dialog_real_do_action(), _alarmd_action_dialog_real_run(), _alarmd_action_dialog_run(), _alarmd_action_dialog_snooze_powerup(), _alarmd_action_exec_finished(), and _alarmd_action_real_run().

static void alarmd_action_class_init AlarmdActionClass klass  )  [static]
 

AlarmdAction::run

This signal is emitted when the action should be run.

Definition at line 206 of file action.c.

References _alarmd_action_finalize(), _alarmd_action_get_property(), _alarmd_action_get_saved_properties(), _alarmd_action_real_acknowledge(), _alarmd_action_real_need_power_up(), _alarmd_action_real_run(), _alarmd_action_set_property(), action_signals, ALARMD_OBJECT_CLASS, ALARMD_TYPE_EVENT, ENTER_FUNC, _AlarmdObjectClass::get_saved_properties, LEAVE_FUNC, PROP_EVENT, PROP_FLAGS, SIGNAL_ACKNOWLEDGE, and SIGNAL_RUN.

Referenced by alarmd_action_get_type().

GType alarmd_action_get_type void   ) 
 

AlarmdAction::run: : The action that is run.

: Specifies if the execution of is delayed.

When an AlarmdAction should be run, this signal should be emitted.

Definition at line 82 of file action.c.

References alarmd_action_class_init(), alarmd_action_init(), and ALARMD_TYPE_OBJECT.

static void alarmd_action_init AlarmdAction action  )  [static]
 

Definition at line 126 of file action.c.

References ENTER_FUNC, and LEAVE_FUNC.

Referenced by alarmd_action_get_type().

gboolean alarmd_action_need_power_up AlarmdAction action  ) 
 

alarmd_action_need_power_up: : AlarmdAction that is being queried.

Queries the given AlarmdAction, if it needs power up functionality.

Returns: TRUE if the AlarmdAction needs power up, FALSE otherwise.

Definition at line 281 of file action.c.

References ALARMD_ACTION_GET_CLASS, ENTER_FUNC, LEAVE_FUNC, and _AlarmdActionClass::need_power_up.

Referenced by _alarmd_event_real_need_power_up().

AlarmdAction* alarmd_action_new void   ) 
 

alarmd_action_new:

Creates new alarmd action. Returns: Newly created AlarmdAction.

Definition at line 110 of file action.c.

References ALARMD_TYPE_ACTION, ENTER_FUNC, and LEAVE_FUNC.

void alarmd_action_run AlarmdAction action,
gboolean  delayed
 

alarmd_action_run: : A AlarmdAction that should be run.

: Whether the AlarmdAction is run on time or after it.

Emits "run" signal on the given AlarmdAction. The interpretion of the flag depends on the action type.

Definition at line 119 of file action.c.

References action_signals, ENTER_FUNC, LEAVE_FUNC, and SIGNAL_RUN.

Referenced by _alarmd_event_real_fire().


Variable Documentation

guint action_signals[SIGNAL_COUNT] [static]
 

Definition at line 69 of file action.c.

Referenced by alarmd_action_acknowledge(), alarmd_action_class_init(), and alarmd_action_run().

const gchar* const saved_properties[S_COUNT] [static]
 

Initial value:

 {
        "flags",
}

Definition at line 59 of file action.c.

Referenced by _alarmd_action_dbus_get_saved_properties(), _alarmd_action_dialog_get_saved_properties(), _alarmd_action_exec_get_saved_properties(), _alarmd_action_get_saved_properties(), _alarmd_event_get_saved_properties(), _alarmd_event_recurring_get_saved_properties(), and _alarmd_queue_get_saved_properties().


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