Changeset a7d8638 for src/alarm


Ignore:
Timestamp:
02/01/10 16:43:00 (12 years ago)
Author:
hanzes <hanzes@…>
Branches:
master, qt5
Children:
ba48d2f
Parents:
d7986a6
Message:

Alarm dbus connection added

Location:
src/alarm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/alarm/alarm.cpp

    rd7986a6 ra7d8638  
    55#include <QApplication>
    66#include <QDir>
    7 #include <QDebug>
     7#include <QFileInfo>
    88
    99#include <dbus-1.0/dbus/dbus-protocol.h>
     
    3030    alarm_action_set_label(act, "FOSDEM'10");
    3131
    32     // setup this action to be a "DBus command"
     32    QFileInfo fi(*qApp->argv());
     33    QString name(fi.fileName());
     34
     35    QString command = QDir::currentPath() + "/" + name + QString(" %1").arg(QString::number(aEventId));
     36    //QString command =  *qApp->argv() + QString(" %1").arg(QString::number(aEventId));
     37    alarm_action_set_exec_command(act, command.toLocal8Bit().data());
     38    act->flags |= ALARM_ACTION_TYPE_EXEC;
    3339    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
    34     act->flags |= ALARM_ACTION_TYPE_DBUS;
     40    act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; // adds assigned cookie at the end of command string
    3541
    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 
    42     // DBus arguments for the action
    43     alarm_action_set_dbus_args(act,  DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID);
     42//    // setup this action to be a "DBus command"
     43//    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
     44//    act->flags |= ALARM_ACTION_TYPE_DBUS;
     45//
     46//    // DBus params for this action
     47//    alarm_action_set_dbus_interface(act, "org.fosdem.schedule.AlarmInterface");
     48//    alarm_action_set_dbus_service(act, "org.fosdem.schedule");
     49//    alarm_action_set_dbus_path(act, "/Fosdem");
     50//    alarm_action_set_dbus_name(act, "Alarm");
     51//
     52//    // DBus arguments for the action
     53//    alarm_action_set_dbus_args(act,  DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID);
    4454
    4555    //    act->flags |= ALARM_ACTION_TYPE_EXEC;
  • src/alarm/alarm.pro

    rd7986a6 ra7d8638  
    1010
    1111HEADERS += alarm.h \
    12                    alarmdbus.h \
    13                    alarmdbusadaptorp.h
    1412
    1513SOURCES += alarm.cpp \
    16                    alarmdbus.cpp \
    17                    alarmdbusadaptor.cpp
    1814
    1915INCLUDEPATH += ../gui \
Note: See TracChangeset for help on using the changeset viewer.