• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • dcop
 

dcop

dcopsignals.h
00001 /*
00002 Copyright (c) 2000 Waldo Bastian <bastian@kde.org>
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a copy
00005 of this software and associated documentation files (the "Software"), to deal
00006 in the Software without restriction, including without limitation the rights
00007 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00008 copies of the Software, and to permit persons to whom the Software is
00009 furnished to do so, subject to the following conditions:
00010 
00011 The above copyright notice and this permission notice shall be included in
00012 all copies or substantial portions of the Software.
00013 
00014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00017 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00020 */
00021 
00022 #ifndef DCOPSIGNALS_H
00023 #define DCOPSIGNALS_H "$Id$"
00024 
00025 #include <tqdict.h>
00026 #include <tqasciidict.h>
00027 #include <tqptrlist.h>
00028 #include <tqstring.h>
00029 #include "kdelibs_export.h"
00030 
00031 class DCOPConnection;
00032 
00037 class DCOP_EXPORT DCOPSignalConnection
00038 {
00039 public:
00040    TQCString sender;      // Sender client, empty means any client
00041    DCOPConnection *senderConn; //Sender client.
00042    TQCString senderObj;   // Object that sends the signal.
00043    TQCString signal;      // Signal name. Connections are sorted on signal name.
00044 
00045    DCOPConnection *recvConn; // Client that wants to receive the signal
00046    TQCString recvObj;     // Object that wants to receive the signal
00047    TQCString slot;        // Function to send to in the object.
00048 };
00049 
00051 class DCOP_EXPORT DCOPSignalConnectionList : public TQPtrList<DCOPSignalConnection>
00052 {
00053 public:
00054    DCOPSignalConnectionList() { };
00055 };
00056 
00060 class DCOP_EXPORT DCOPSignals
00061 {
00062 public:
00063    DCOPSignals();
00064 
00073    void emitSignal( DCOPConnection *conn, const TQCString &fun, const TQByteArray &data, bool excludeSelf);
00074 
00089    bool connectSignal( const TQCString &sender, const TQCString &senderObj,
00090                        const TQCString &signal,
00091                        DCOPConnection *conn, const TQCString &receiverObj,
00092                        const TQCString &slot, bool Volatile);
00093 
00103    bool disconnectSignal( const TQCString &sender, const TQCString &senderObj,
00104                        const TQCString &signal,
00105                        DCOPConnection *conn, const TQCString &receiverObj,
00106                        const TQCString &slot);
00107 
00114    void removeConnections(DCOPConnection *conn, const TQCString &obj=0);
00115 
00116 
00117    /*
00118     * The administration.
00119     *
00120     * All connections are sorted by "signal" and then inserted in the
00121     * administration as a list.
00122     *
00123     * connections[signal] gives a list of all connections related to
00124     * a given signal. The connections in this list may specify different
00125     * senders and receiving clients/objects.
00126     */
00127    TQAsciiDict<DCOPSignalConnectionList> connections;
00128 };
00129 
00130 //
00131 // connectSignal:
00132 //
00133 // Check whether signal and slot match wrt arguments.
00134 // A slot may ignore arguments from the signal.
00135 //
00136 // If volatile
00137 //    then lookup senderConn...
00138 //         If not found?
00139 //            then return false
00140 // Create DCOPSignalConnection.
00141 // Add DCOPSignalConnection to "connections".
00142 // Add DCOPSignalConnection to conn->connectionList()
00143 // If volatile
00144 //    then Add DCOPSignalConnection to senderConn->connectionList()
00145 // Return true
00146 
00147 
00148 // removeConnections:
00149 //
00150 // For each DCOPSignalConnection in conn->connectionList
00151 //    if DCOPSignalConnection->sender == conn->appId
00152 //        then remove DCOPSignalConnection from DCOPSIgnalConnection->conn
00153 //    if DCOPSignalConnection->conn == conn
00154 //       then.. this is ugly.. remove DCOPSignalConnection from DCOPSignalConnection->sender
00155 //    WARNING: Take care when sender and conn are the same client!
00156 //    Remove DCOPSignalConnection from connections[DCOPSignalConnection->signal]
00157 
00158 #endif

dcop

Skip menu "dcop"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

dcop

Skip menu "dcop"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for dcop by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |