Ignore:
Timestamp:
02/01/10 14:05:49 (12 years ago)
Author:
hanzes <hanzes@…>
Branches:
master, qt5
Children:
927eac4
Parents:
8c4d4f7
Message:

Alarm dbus connection added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/alarm/alarm.cpp

    r8c4d4f7 r6831c6a  
    55#include <QApplication>
    66#include <QDir>
     7#include <QDebug>
     8
     9#include <dbus-1.0/dbus/dbus-protocol.h>
    710
    811int Alarm::addAlarm(int aEventId, const QDateTime &aDateTime)
     
    1720
    1821    /* for Deleting purposes */
    19     alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data()); 
     22    alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data());
    2023
    2124    /* Use absolute time triggering */
    2225    eve->alarm_time = time(0) + 5; //aDateTime.toTime_t();
    2326    eve->flags = ALARM_EVENT_BOOT;
    24 
    25     QString command = QDir::currentPath() + "/" + *qApp->argv() +
    26       QString(" %1").arg(QString::number(aEventId));
    2727
    2828    /* Add exec command action */
     
    3333    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
    3434    act->flags |= ALARM_ACTION_TYPE_DBUS;
    35    
    36     // DBus params for this action 
    37     alarm_action_set_dbus_interface(act, "org.freedesktop.Notifications");
    38     alarm_action_set_dbus_service(act, "org.freedesktop.Notifications");
    39     alarm_action_set_dbus_path(act, "/org/freedesktop/Notifications");
    40     alarm_action_set_dbus_name(act, "SystemNoteDialog");
    41    
     35
     36    // DBus params for this action
     37    alarm_action_set_dbus_interface(act, "org.fosdem.schedule.AlarmInterface");
     38    alarm_action_set_dbus_service(act, "org.fosdem.schedule");
     39    alarm_action_set_dbus_path(act, "/Fosdem");
     40    alarm_action_set_dbus_name(act, "Alarm");
     41
    4242    // DBus arguments for the action
    43     alarm_action_set_dbus_args(act, aEventId);
     43    alarm_action_set_dbus_args(act,  DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID);
    4444
    4545    //    act->flags |= ALARM_ACTION_TYPE_EXEC;
     
    4747    //    alarm_event_set_icon(eve, "fosdem");
    4848    //    alarm_event_set_title(eve, "FOSDEM'10");
    49     // adds assigned cookie at the end of command string 
    50     //    act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; 
     49    // adds assigned cookie at the end of command string
     50    //    act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE;
    5151
    5252    /* Add stop button action */
     
    5656    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
    5757    act->flags |= ALARM_ACTION_TYPE_NOP;
    58  
     58
    5959    /* Add snooze button action */
    6060    act = alarm_event_add_actions(eve, 1);
Note: See TracChangeset for help on using the changeset viewer.