/* * Ivy, C interface * * Copyright (C) 1997-2000 * Centre d'Études de la Navigation Aérienne * * Main loop based on the QT Toolkit (troltech) * * Authors: Alexandre Bustico * * * $Id: ivyqtloop.h 1231 2011-01-11 16:34:15Z bustico $ * * Please refer to file version.h for the * copyright notice regarding this software */ #ifndef IVYQTLOOP_H #define IVYQTLOOP_H using namespace std; #include #include "Ivy/ivychannel.h" class IvyQt; struct _channel { IvyQt *ivyQt; int fd; void *data; ChannelHandleDelete handle_delete; ChannelHandleRead handle_read; ChannelHandleWrite handle_write; }; class IvyQt : public QObject { Q_OBJECT public: IvyQt(struct _channel *chan, QObject *parent=0); ~IvyQt(); private slots: void ivyRead (int); void ivyWrite (int); void ivyDelete (int); private: struct _channel *channel; QSocketNotifier* id_read; QSocketNotifier* id_write; QSocketNotifier* id_delete; public: void startNotifiersRead (); void startNotifiersWrite (); void removeNotifiersRead (); void removeNotifiersWrite (); }; #endif // IVYQTLOOP_H