Changeset 6831c6a for src/app


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/app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/app/app.pro

    r8c4d4f7 r6831c6a  
    33TARGET = fosdem-schedule
    44DESTDIR = ../bin
    5 QT += sql xml network
     5QT += sql xml network dbus
    66
    77# module dependencies
  • src/app/main.cpp

    r8c4d4f7 r6831c6a  
    22
    33#include <QtGui/QApplication>
    4 #ifdef MAEMO
    5 #include <alarmdialog.h>
    6 #endif /* MAEMO */
     4//#ifdef MAEMO
     5//#include <alarmdialog.h>
     6//#endif /* MAEMO */
    77
    88#include <sqlengine.h>
     9
     10#include "alarmdbus.h"
     11#include "alarmdbusadaptorp.h"
    912
    1013int main(int argc, char *argv[])
     
    2528    // Usage: $ ./fosdem eventId alarmId
    2629    // Example: $ ./fosdem 521 13
    27     if(argc==3)
    28         window = new AlarmDialog(argc,argv);
    29     else if(argc==2) // display Event dialog automatically
    30         window = new MainWindow(atoi(argv[1])); // eventId = argv[1]
    31     else
     30//    if(argc==3)
     31//        window = new AlarmDialog(argc,argv);
     32//    else if(argc==2) // display Event dialog automatically
     33//        window = new MainWindow(atoi(argv[1])); // eventId = argv[1]
     34//    else
    3235        window = new MainWindow;
    3336#else
     
    3538#endif /* MAEMO */
    3639    window->show();
     40
     41    // Alarm Dbus
     42
     43    CAlarmDBus *alarmDBus = new CAlarmDBus(window);
     44    new AlarmDBusAdaptor(alarmDBus);
     45    //QDBusConnection connection = QDBusConnection::sessionBus();
     46    QDBusConnection connection = QDBusConnection::sessionBus();
     47
     48    if(connection.registerObject("/Fosdem", alarmDBus) == true)
     49    {
     50        if( connection.registerService("org.fosdem.schedule") == false)
     51        {
     52                qDebug() << "dbus register service failed";
     53        }
     54    }
     55
    3756    return a.exec();
    3857}
Note: See TracChangeset for help on using the changeset viewer.