Changeset 6831c6a for src/alarm


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

Location:
src/alarm
Files:
4 added
2 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);
  • src/alarm/alarm.pro

    r8c4d4f7 r6831c6a  
    22TARGET = qalarm
    33DESTDIR = ../bin
    4 CONFIG += static
     4CONFIG += static qdbus
     5QT += sql dbus
    56
    67# module dependencies
     
    89DEPENDPATH += .
    910
    10 HEADERS += alarm.h
     11HEADERS += alarm.h \
     12                   alarmdbus.h \
     13                   alarmdbusadaptorp.h
    1114
    12 SOURCES += alarm.cpp
     15SOURCES += alarm.cpp \
     16                   alarmdbus.cpp \
     17                   alarmdbusadaptor.cpp
    1318
     19INCLUDEPATH += ../gui \
     20    ../mvc \
     21    ../orm \
     22    ../sql
     23   
     24
     25
Note: See TracChangeset for help on using the changeset viewer.