#include <QDebug>
-//#include "dbus-1.0/dbus/dbus-protocol.h"
-
int Alarm::addAlarm(int conferenceId, int eventId, QString eventTitle, const QDateTime &alarmDateTime) {
cookie_t alarmCookie = 0;
alarm_event_t *alarmEvent = 0;
alarmAction->flags |= ALARM_ACTION_WHEN_RESPONDED;
alarmAction->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; // adds assigned cookie at the end of command string
-// // setup this action to be a "DBus command"
-// act->flags |= ALARM_ACTION_WHEN_RESPONDED;
-// act->flags |= ALARM_ACTION_TYPE_DBUS;
-//
-// // DBus params for this action
-// alarm_action_set_dbus_interface(act, "at.priv.toastfreeware.confclerk.AlarmInterface");
-// alarm_action_set_dbus_service(act, "at.priv.toastfreeware.confclerk");
-// alarm_action_set_dbus_path(act, "/ConfClerk");
-// alarm_action_set_dbus_name(act, "Alarm");
-//
-// // DBus arguments for the action
-// alarm_action_set_dbus_args(act, DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID);
-
- // act->flags |= ALARM_ACTION_TYPE_EXEC;
- // alarm_action_set_exec_command(act, command.toLocal8Bit().data());
- // alarm_event_set_icon(eve, "fosdem");
- // alarm_event_set_title(eve, "ConfClerk");
- // adds assigned cookie at the end of command string
- // act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE;
-
/* Add stop button action */
- /* TODO: send a DBus message to remove that alarm from database */
alarmAction = alarm_event_add_actions(alarmEvent, 1);
alarm_action_set_label(alarmAction, "Stop");
alarmAction->flags |= ALARM_ACTION_WHEN_RESPONDED;
TEMPLATE = lib
TARGET = qalarm
DESTDIR = ../bin
-CONFIG += static qdbus
-QT += sql dbus
+CONFIG += static
+QT += sql
QMAKE_CLEAN += ../bin/libqalarm.a
# module dependencies
../mvc \
../orm \
../sql
-
-
-
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "alarmdbus.h"
-#include "eventdialog.h"
-
-
-
-
-CAlarmDBus::CAlarmDBus(QWidget * aParent)
- : QObject(),
- mParent(aParent)
-{
- // constructor
- //setAutoRelaySignals(true);
-}
-
-CAlarmDBus::~CAlarmDBus()
-{
- // destructor
-}
-
-void CAlarmDBus::Alarm(int aEventId)
-{
- EventDialog dialog(aEventId,mParent);
- dialog.exec();
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef ALARM_DBUS_H
-#define ALARM_DBUS_H
-
-#include <QObject>
-#include <QtDBus/QtDBus>
-
-class CAlarmDBus: public QObject
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "at.priv.toastfreeware.confclerk")
-
-public:
- CAlarmDBus(QWidget * aParent);
- virtual ~CAlarmDBus();
-
-public: // PROPERTIES
-public Q_SLOTS: // METHODS
- void Alarm(int aEventId);
-private:
- QWidget * mParent;
-};
-
-
-#endif // ALARM_DBUS_H
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "alarmdbusadaptorp.h"
-#include <QtCore/QMetaObject>
-#include <QtCore/QByteArray>
-#include <QtCore/QList>
-#include <QtCore/QMap>
-#include <QtCore/QString>
-#include <QtCore/QStringList>
-#include <QtCore/QVariant>
-
-
-AlarmDBusAdaptor::AlarmDBusAdaptor(QObject *parent)
- : QDBusAbstractAdaptor(parent)
-{
- // constructor
- setAutoRelaySignals(true);
-}
-
-AlarmDBusAdaptor::~AlarmDBusAdaptor()
-{
- // destructor
-}
-
-void AlarmDBusAdaptor::Alarm(int aEventId)
-{
- QMetaObject::invokeMethod(parent(), "Alarm",Q_ARG(int, aEventId));
-}
-
-
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef ALARM_DBUS_ADAPTOR_P_H
-#define ALARM_DBUS_ADAPTOR_P_H
-
-#include <QtCore/QObject>
-#include <QtDBus/QtDBus>
-
-QT_BEGIN_NAMESPACE
-class QByteArray;
-template<class T> class QList;
-template<class Key, class Value> class QMap;
-class QString;
-class QStringList;
-class QVariant;
-QT_END_NAMESPACE
-
-
-class AlarmDBusAdaptor: public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "at.priv.toastfreeware.confclerk.AlarmInterface")
- Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"at.priv.toastfreeware.confclerk.AlarmInterface\" >\n"
-" <method name=\"Alarm\">\n"
-" <arg name=\"aEventId\" type=\"i\" direction=\"in\"/>\n"
-" </method>\n"
-" </interface>\n"
- "")
-public:
- AlarmDBusAdaptor(QObject *parent);
- virtual ~AlarmDBusAdaptor();
-
-public: // PROPERTIES
-public Q_SLOTS: // METHODS
- void Alarm(int aEventId);
-};
-
-#endif
DESTDIR = ../bin
QT += sql xml network
CONFIG(maemo5) {
- QT += maemo5 dbus
+ QT += maemo5
}
# module dependencies
INCLUDEPATH += ../alarm
DEPENDPATH += ../alarm
POST_TARGETDEPS += $$DESTDIR/libqalarm.a
- HEADERS += alarmdbus.h \
- alarmdbusadaptorp.h
- SOURCES += alarmdbus.cpp \
- alarmdbusadaptor.cpp
}
HEADERS += appsettings.h \
#include "eventdialog.h"
#include "application.h"
-#ifdef MAEMO
-//#include "alarmdialog.h"
-#include "alarmdbus.h"
-#include "alarmdbusadaptorp.h"
-#endif /* MAEMO */
-
-
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(icons);
QWidget* window = new MainWindow;
-#ifdef MAEMO
- // Alarm Dbus
- CAlarmDBus *alarmDBus = new CAlarmDBus(window);
- new AlarmDBusAdaptor(alarmDBus);
- QDBusConnection connection = QDBusConnection::sessionBus();
-
- if(connection.registerObject("/ConfClerk", alarmDBus) == true)
- {
- if( connection.registerService("at.priv.toastfreeware.confclerk") == false)
- {
- if(argc==3)
- {
- QDBusInterface *interface = new QDBusInterface("at.priv.toastfreeware.confclerk",
- "/ConfClerk",
- "at.priv.toastfreeware.confclerk.AlarmInterface",
- connection);
- interface->call("Alarm",atoi(argv[2]));
- return 0;
- }
- }
- }
-#endif
-
// If we were started with the parameters confernceid and eventid, show the corresponding event (alarm)
if (argc == 3) {
QString conferenceIdStr = argv[1];