dcop Library API Documentation

dcopserver.h

00001 /*
00002 Copyright (c) 1999 Preston Brown <pbrown@kde.org>
00003 Copyright (c) 1999 Matthias Ettrich <ettrich@kde.org>
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a copy
00006 of this software and associated documentation files (the "Software"), to deal
00007 in the Software without restriction, including without limitation the rights
00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00009 copies of the Software, and to permit persons to whom the Software is
00010 furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00018 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00019 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00020 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00021 */
00022 #ifndef DCOPSERVER_H
00023 #define DCOPSERVER_H "$Id: dcopserver.h,v 1.36 2004/05/02 07:28:20 zrusin Exp $"
00024 
00025 #include <qobject.h>
00026 #include <qstring.h>
00027 #include <qsocketnotifier.h>
00028 #include <qptrlist.h>
00029 #include <qvaluelist.h>
00030 #include <qcstring.h>
00031 #include <qdict.h>
00032 #include <qptrdict.h>
00033 #include <qintdict.h>
00034 #include <qapplication.h>
00035 
00036 #define INT32 QINT32
00037 #ifdef Q_WS_X11
00038 #include <X11/Xlib.h>
00039 #include <X11/Xmd.h>
00040 #endif
00041 #include <KDE-ICE/ICElib.h>
00042 extern "C" {
00043 #include <KDE-ICE/ICEutil.h>
00044 #include <KDE-ICE/ICEmsg.h>
00045 #include <KDE-ICE/ICEproto.h>
00046 }
00047 
00048 class DCOPConnection;
00049 class DCOPListener;
00050 class DCOPSignalConnectionList;
00051 class DCOPSignals;
00052 class QTimer;
00053 
00054 // If you enable the following define DCOP will create
00055 // $HOME/.dcop.log file which will list all signals passing
00056 // through it.
00057 //#define DCOP_LOG
00058 #ifdef DCOP_LOG
00059 class QTextStream;
00060 class QFile;
00061 #endif
00062 
00063 typedef QValueList<QCString> QCStringList;
00064 
00068 class DCOPConnection : public QSocketNotifier
00069 {
00070 public:
00071     DCOPConnection( IceConn conn );
00072     ~DCOPConnection();
00073 
00074     DCOPSignalConnectionList *signalConnectionList();
00075 
00076     // Add the data from offset @p start in @p _data to the output
00077     // buffer and schedule it for later transmission.
00078     void waitForOutputReady(const QByteArray &_data, int start);
00079 
00080     // Called from DCOPServer::slotOutputReady()
00081     // Flush the output buffer.
00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void ass="comment">// 00082     void