AlarmdAction

AlarmdAction — Base class for any actions done on events.

Synopsis




enum        AlarmdActionAckType;
            AlarmdAction;
AlarmdAction* alarmd_action_new             (void);
void        alarmd_action_run               (AlarmdAction *action,
                                             gboolean delayed);
void        alarmd_action_acknowledge       (AlarmdAction *action,
                                             AlarmdActionAckType ack_type);
gboolean    alarmd_action_need_power_up     (AlarmdAction *action);

Object Hierarchy


  GObject
   +----AlarmdObject
         +----AlarmdAction
               +----AlarmdActionDialog

Properties


  "event"                AlarmdEvent           : Read / Write
  "flags"                gint                  : Read / Write

Signals


"acknowledge"
            void        user_function      (AlarmdAction *action,
                                            guint         ack_type,
                                            gpointer      user_data)      : Run last / No recursion / Action / No hooks
"run"       void        user_function      (AlarmdAction *action,
                                            gboolean      delayed,
                                            gpointer      user_data)      : Run last / No recursion / Action / No hooks

Description

AlarmdAction is a base class for objects that define the action run when event is due. It itself does nothing, and should not be used as-is.

Details

enum AlarmdActionAckType

typedef enum {
	ACK_NORMAL,
	ACK_SNOOZE
} AlarmdActionAckType;

Defines the ways a action can be acknowledged.

ACK_NORMAL The action was normally acknowledged.
ACK_SNOOZE The action was snoozed.

AlarmdAction

typedef struct _AlarmdAction AlarmdAction;


alarmd_action_new ()

AlarmdAction* alarmd_action_new             (void);

Creates new alarmd action.

Returns : Newly created AlarmdAction.

alarmd_action_run ()

void        alarmd_action_run               (AlarmdAction *action,
                                             gboolean delayed);

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

action : A AlarmdAction that should be run.
delayed : Whether the AlarmdAction is run on time or after it.

alarmd_action_acknowledge ()

void        alarmd_action_acknowledge       (AlarmdAction *action,
                                             AlarmdActionAckType ack_type);

Emits "acknowledge" -signal on the given AlarmdAction.

action : AlarmdAction that is acknowledged.
ack_type : ACK_NORMAL if the action was normally acknowledged or ACK_SNOOZE if it was snoozed.

alarmd_action_need_power_up ()

gboolean    alarmd_action_need_power_up     (AlarmdAction *action);

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

action : AlarmdAction that is being queried.
Returns : TRUE if the AlarmdAction needs power up, FALSE otherwise.

Property Details

The "event" property

  "event"                AlarmdEvent           : Read / Write

Event of the action.


The "flags" property

  "flags"                gint                  : Read / Write

Flags of the action.

Default value: 0

Signal Details

The "acknowledge" signal

void        user_function                  (AlarmdAction *action,
                                            guint         ack_type,
                                            gpointer      user_data)      : Run last / No recursion / Action / No hooks

When an AlarmdAction is acknowledged, it should emit the acknowledge signal.

action : The action that is acknowledged.
ack_type : How was the action acknowledged, as defined by AlarmdActionAckType.
user_data : user data set when the signal handler was connected.

The "run" signal

void        user_function                  (AlarmdAction *action,
                                            gboolean      delayed,
                                            gpointer      user_data)      : Run last / No recursion / Action / No hooks

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

action : The action that is run.
delayed : Specifies if the execution of action is delayed.
user_data : user data set when the signal handler was connected.

See Also

AlarmdActionDialog, AlarmdActionExec, AlarmdActionDbus.