Changeset 6645e1f for src


Ignore:
Timestamp:
01/29/10 15:33:41 (12 years ago)
Author:
uzakmat <uzakmat@…>
Branches:
master, qt5
Children:
47bfffb
Parents:
a023fd2
Message:

initial binding of alarm to a DBus call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/alarm/alarm.cpp

    ra023fd2 r6645e1f  
    2121    /* Use absolute time triggering */
    2222    eve->alarm_time = time(0) + 5; //aDateTime.toTime_t();
     23    eve->flags = ALARM_EVENT_BOOT;
    2324
    2425    QString command = QDir::currentPath() + "/" + *qApp->argv() +
     
    2829    act = alarm_event_add_actions(eve, 1);
    2930    alarm_action_set_label(act, "FOSDEM'10");
     31
     32    // setup this action to be a "DBus command"
     33    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
     34    act->flags |= ALARM_ACTION_TYPE_DBUS;
     35   
     36    // DBus params for this action
     37    alarm_action_set_dbus_interface(act, "org.maemo.testApp");
     38    alarm_action_set_dbus_service(act, "org.maemo.testApp");
     39    alarm_action_set_dbus_path(act, "/org/maemo/testApp");
     40    alarm_action_set_dbus_name(act, "triggerAlarm");
     41   
     42    // DBus arguments for the action
     43    alarm_action_set_dbus_args(act, aEventId);
     44
     45    //    act->flags |= ALARM_ACTION_TYPE_EXEC;
     46    //     alarm_action_set_exec_command(act, command.toLocal8Bit().data());
    3047    //    alarm_event_set_icon(eve, "fosdem");
    3148    //    alarm_event_set_title(eve, "FOSDEM'10");
    32     act->flags |= ALARM_ACTION_TYPE_EXEC;
    33     act->flags |= ALARM_ACTION_WHEN_RESPONDED;
    3449    // adds assigned cookie at the end of command string
    3550    //    act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE;
    36     alarm_action_set_exec_command(act, command.toLocal8Bit().data());
    3751
    3852    /* Add stop button action */
     53    /* TODO: send a DBus message to remove that alarm from database */
    3954    act = alarm_event_add_actions(eve, 1);
    4055    alarm_action_set_label(act, "Stop");
Note: See TracChangeset for help on using the changeset viewer.