From 21e0eb13ab19d5437288ba039c05d6865242d31d Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Wed, 17 Oct 2012 21:19:41 +0000 Subject: [PATCH] Rip out unused DBUS stuff. --- src/alarm/alarm.cpp | 23 --------------- src/alarm/alarm.pro | 7 ++--- src/app/alarmdbus.cpp | 45 ----------------------------- src/app/alarmdbus.h | 43 --------------------------- src/app/alarmdbusadaptor.cpp | 48 ------------------------------- src/app/alarmdbusadaptorp.h | 56 ------------------------------------ src/app/app.pro | 6 +--- src/app/main.cpp | 30 ------------------- 8 files changed, 3 insertions(+), 255 deletions(-) delete mode 100644 src/app/alarmdbus.cpp delete mode 100644 src/app/alarmdbus.h delete mode 100644 src/app/alarmdbusadaptor.cpp delete mode 100644 src/app/alarmdbusadaptorp.h diff --git a/src/alarm/alarm.cpp b/src/alarm/alarm.cpp index 7e9ccb6..4805a8a 100644 --- a/src/alarm/alarm.cpp +++ b/src/alarm/alarm.cpp @@ -27,8 +27,6 @@ #include -//#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; @@ -64,28 +62,7 @@ int Alarm::addAlarm(int conferenceId, int eventId, QString eventTitle, const QDa 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; diff --git a/src/alarm/alarm.pro b/src/alarm/alarm.pro index b83a288..6a5b896 100644 --- a/src/alarm/alarm.pro +++ b/src/alarm/alarm.pro @@ -1,8 +1,8 @@ TEMPLATE = lib TARGET = qalarm DESTDIR = ../bin -CONFIG += static qdbus -QT += sql dbus +CONFIG += static +QT += sql QMAKE_CLEAN += ../bin/libqalarm.a # module dependencies @@ -17,6 +17,3 @@ INCLUDEPATH += ../gui \ ../mvc \ ../orm \ ../sql - - - diff --git a/src/app/alarmdbus.cpp b/src/app/alarmdbus.cpp deleted file mode 100644 index a924041..0000000 --- a/src/app/alarmdbus.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 . - */ - -#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(); - -} diff --git a/src/app/alarmdbus.h b/src/app/alarmdbus.h deleted file mode 100644 index 1b9127c..0000000 --- a/src/app/alarmdbus.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ -#ifndef ALARM_DBUS_H -#define ALARM_DBUS_H - -#include -#include - -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 diff --git a/src/app/alarmdbusadaptor.cpp b/src/app/alarmdbusadaptor.cpp deleted file mode 100644 index fe1c483..0000000 --- a/src/app/alarmdbusadaptor.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 . - */ - -#include "alarmdbusadaptorp.h" -#include -#include -#include -#include -#include -#include -#include - - -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)); -} - - diff --git a/src/app/alarmdbusadaptorp.h b/src/app/alarmdbusadaptorp.h deleted file mode 100644 index c5413cd..0000000 --- a/src/app/alarmdbusadaptorp.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 . - */ -#ifndef ALARM_DBUS_ADAPTOR_P_H -#define ALARM_DBUS_ADAPTOR_P_H - -#include -#include - -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template 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", "" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - AlarmDBusAdaptor(QObject *parent); - virtual ~AlarmDBusAdaptor(); - -public: // PROPERTIES -public Q_SLOTS: // METHODS - void Alarm(int aEventId); -}; - -#endif diff --git a/src/app/app.pro b/src/app/app.pro index aa35549..57cd46f 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -4,7 +4,7 @@ TARGET = confclerk DESTDIR = ../bin QT += sql xml network CONFIG(maemo5) { - QT += maemo5 dbus + QT += maemo5 } # module dependencies @@ -17,10 +17,6 @@ maemo { INCLUDEPATH += ../alarm DEPENDPATH += ../alarm POST_TARGETDEPS += $$DESTDIR/libqalarm.a - HEADERS += alarmdbus.h \ - alarmdbusadaptorp.h - SOURCES += alarmdbus.cpp \ - alarmdbusadaptor.cpp } HEADERS += appsettings.h \ diff --git a/src/app/main.cpp b/src/app/main.cpp index cc749b6..d48ec09 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -24,13 +24,6 @@ #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); @@ -47,29 +40,6 @@ int main(int argc, char *argv[]) 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]; -- 2.39.5