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

dcop

  • dcop
dcopsignals.h
1 /*
2 Copyright (c) 2000 Waldo Bastian <bastian@kde.org>
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 */
21 
22 #ifndef DCOPSIGNALS_H
23 #define DCOPSIGNALS_H "$Id$"
24 
25 #include <tqdict.h>
26 #include <tqasciidict.h>
27 #include <tqptrlist.h>
28 #include <tqstring.h>
29 #include "tdelibs_export.h"
30 
31 class DCOPConnection;
32 
37 class DCOP_EXPORT DCOPSignalConnection
38 {
39 public:
40  TQCString sender; // Sender client, empty means any client
41  DCOPConnection *senderConn; //Sender client.
42  TQCString senderObj; // Object that sends the signal.
43  TQCString signal; // Signal name. Connections are sorted on signal name.
44 
45  DCOPConnection *recvConn; // Client that wants to receive the signal
46  TQCString recvObj; // Object that wants to receive the signal
47  TQCString slot; // Function to send to in the object.
48 };
49 
51 class DCOP_EXPORT DCOPSignalConnectionList : public TQPtrList<DCOPSignalConnection>
52 {
53 public:
54  DCOPSignalConnectionList() { };
55 };
56 
60 class DCOP_EXPORT DCOPSignals
61 {
62 public:
63  DCOPSignals();
64 
73  void emitSignal( DCOPConnection *conn, const TQCString &fun, const TQByteArray &data, bool excludeSelf);
74 
89  bool connectSignal( const TQCString &sender, const TQCString &senderObj,
90  const TQCString &signal,
91  DCOPConnection *conn, const TQCString &receiverObj,
92  const TQCString &slot, bool Volatile);
93 
103  bool disconnectSignal( const TQCString &sender, const TQCString &senderObj,
104  const TQCString &signal,
105  DCOPConnection *conn, const TQCString &receiverObj,
106  const TQCString &slot);
107 
114  void removeConnections(DCOPConnection *conn, const TQCString &obj=0);
115 
116 
117  /*
118  * The administration.
119  *
120  * All connections are sorted by "signal" and then inserted in the
121  * administration as a list.
122  *
123  * connections[signal] gives a list of all connections related to
124  * a given signal. The connections in this list may specify different
125  * senders and receiving clients/objects.
126  */
127  TQAsciiDict<DCOPSignalConnectionList> connections;
128 };
129 
130 //
131 // connectSignal:
132 //
133 // Check whether signal and slot match wrt arguments.
134 // A slot may ignore arguments from the signal.
135 //
136 // If volatile
137 // then lookup senderConn...
138 // If not found?
139 // then return false
140 // Create DCOPSignalConnection.
141 // Add DCOPSignalConnection to "connections".
142 // Add DCOPSignalConnection to conn->connectionList()
143 // If volatile
144 // then Add DCOPSignalConnection to senderConn->connectionList()
145 // Return true
146 
147 
148 // removeConnections:
149 //
150 // For each DCOPSignalConnection in conn->connectionList
151 // if DCOPSignalConnection->sender == conn->appId
152 // then remove DCOPSignalConnection from DCOPSIgnalConnection->conn
153 // if DCOPSignalConnection->conn == conn
154 // then.. this is ugly.. remove DCOPSignalConnection from DCOPSignalConnection->sender
155 // WARNING: Take care when sender and conn are the same client!
156 // Remove DCOPSignalConnection from connections[DCOPSignalConnection->signal]
157 
158 #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
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dcop by doxygen 1.8.8
This website is maintained by Timothy Pearson.