16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.Cooperation.CooperationClient</h1> |
23 <h1>eric6.Cooperation.CooperationClient</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the client of the cooperation package. |
26 Module implementing the client of the cooperation package. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#CooperationClient">CooperationClient</a></td> |
38 <td><a href="#CooperationClient">CooperationClient</a></td> |
34 <td>Class implementing the client of the cooperation package.</td> |
39 <td>Class implementing the client of the cooperation package.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="CooperationClient" ID="CooperationClient"></a> |
49 <a NAME="CooperationClient" ID="CooperationClient"></a> |
43 <h2>CooperationClient</h2> |
50 <h2>CooperationClient</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing the client of the cooperation package. |
53 Class implementing the client of the cooperation package. |
46 </p><h3>Signals</h3> |
54 </p> |
47 <dl> |
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
48 <dt>cannotConnect()</dt> |
58 <dt>cannotConnect()</dt> |
49 <dd> |
59 <dd> |
50 emitted, if the initial connection fails |
60 emitted, if the initial connection fails |
51 </dd><dt>connectionError(message)</dt> |
61 </dd> |
|
62 <dt>connectionError(message)</dt> |
52 <dd> |
63 <dd> |
53 emitted when a connection error occurs |
64 emitted when a connection error occurs |
54 (string) |
65 (string) |
55 </dd><dt>editorCommand(hash, filename, message)</dt> |
66 </dd> |
|
67 <dt>editorCommand(hash, filename, message)</dt> |
56 <dd> |
68 <dd> |
57 emitted when an editor |
69 emitted when an editor |
58 command has been received (string, string, string) |
70 command has been received (string, string, string) |
59 </dd><dt>newMessage(user, message)</dt> |
71 </dd> |
|
72 <dt>newMessage(user, message)</dt> |
60 <dd> |
73 <dd> |
61 emitted after a new message has |
74 emitted after a new message has |
62 arrived (string, string) |
75 arrived (string, string) |
63 </dd><dt>newParticipant(nickname)</dt> |
76 </dd> |
|
77 <dt>newParticipant(nickname)</dt> |
64 <dd> |
78 <dd> |
65 emitted after a new participant joined |
79 emitted after a new participant joined |
66 (string) |
80 (string) |
67 </dd><dt>participantLeft(nickname)</dt> |
81 </dd> |
|
82 <dt>participantLeft(nickname)</dt> |
68 <dd> |
83 <dd> |
69 emitted after a participant left (string) |
84 emitted after a participant left (string) |
70 </dd> |
85 </dd> |
71 </dl> |
86 </dl> |
72 <h3>Derived from</h3> |
87 <h3>Derived from</h3> |
73 QObject |
88 QObject |
74 <h3>Class Attributes</h3> |
89 <h3>Class Attributes</h3> |
|
90 |
75 <table> |
91 <table> |
76 <tr><td>None</td></tr> |
92 <tr><td>None</td></tr> |
77 </table> |
93 </table> |
78 <h3>Class Methods</h3> |
94 <h3>Class Methods</h3> |
|
95 |
79 <table> |
96 <table> |
80 <tr><td>None</td></tr> |
97 <tr><td>None</td></tr> |
81 </table> |
98 </table> |
82 <h3>Methods</h3> |
99 <h3>Methods</h3> |
83 <table> |
100 |
|
101 <table> |
|
102 |
84 <tr> |
103 <tr> |
85 <td><a href="#CooperationClient.__init__">CooperationClient</a></td> |
104 <td><a href="#CooperationClient.__init__">CooperationClient</a></td> |
86 <td>Constructor</td> |
105 <td>Constructor</td> |
87 </tr><tr> |
106 </tr> |
|
107 <tr> |
88 <td><a href="#CooperationClient.__connectionError">__connectionError</a></td> |
108 <td><a href="#CooperationClient.__connectionError">__connectionError</a></td> |
89 <td>Private slot to handle a connection error.</td> |
109 <td>Private slot to handle a connection error.</td> |
90 </tr><tr> |
110 </tr> |
|
111 <tr> |
91 <td><a href="#CooperationClient.__connectionRejected">__connectionRejected</a></td> |
112 <td><a href="#CooperationClient.__connectionRejected">__connectionRejected</a></td> |
92 <td>Private slot to handle the rejection of a connection.</td> |
113 <td>Private slot to handle the rejection of a connection.</td> |
93 </tr><tr> |
114 </tr> |
|
115 <tr> |
94 <td><a href="#CooperationClient.__disconnected">__disconnected</a></td> |
116 <td><a href="#CooperationClient.__disconnected">__disconnected</a></td> |
95 <td>Private slot to handle the disconnection of a chat client.</td> |
117 <td>Private slot to handle the disconnection of a chat client.</td> |
96 </tr><tr> |
118 </tr> |
|
119 <tr> |
97 <td><a href="#CooperationClient.__findConnections">__findConnections</a></td> |
120 <td><a href="#CooperationClient.__findConnections">__findConnections</a></td> |
98 <td>Private method to get a list of connection given a nick name.</td> |
121 <td>Private method to get a list of connection given a nick name.</td> |
99 </tr><tr> |
122 </tr> |
|
123 <tr> |
100 <td><a href="#CooperationClient.__getParticipants">__getParticipants</a></td> |
124 <td><a href="#CooperationClient.__getParticipants">__getParticipants</a></td> |
101 <td>Private slot to handle the request for a list of participants.</td> |
125 <td>Private slot to handle the request for a list of participants.</td> |
102 </tr><tr> |
126 </tr> |
|
127 <tr> |
103 <td><a href="#CooperationClient.__newConnection">__newConnection</a></td> |
128 <td><a href="#CooperationClient.__newConnection">__newConnection</a></td> |
104 <td>Private slot to handle a new connection.</td> |
129 <td>Private slot to handle a new connection.</td> |
105 </tr><tr> |
130 </tr> |
|
131 <tr> |
106 <td><a href="#CooperationClient.__processParticipants">__processParticipants</a></td> |
132 <td><a href="#CooperationClient.__processParticipants">__processParticipants</a></td> |
107 <td>Private slot to handle the receipt of a list of participants.</td> |
133 <td>Private slot to handle the receipt of a list of participants.</td> |
108 </tr><tr> |
134 </tr> |
|
135 <tr> |
109 <td><a href="#CooperationClient.__readyForUse">__readyForUse</a></td> |
136 <td><a href="#CooperationClient.__readyForUse">__readyForUse</a></td> |
110 <td>Private slot to handle a connection getting ready for use.</td> |
137 <td>Private slot to handle a connection getting ready for use.</td> |
111 </tr><tr> |
138 </tr> |
|
139 <tr> |
112 <td><a href="#CooperationClient.banKickUser">banKickUser</a></td> |
140 <td><a href="#CooperationClient.banKickUser">banKickUser</a></td> |
113 <td>Public method to ban and kick a user by its nick name.</td> |
141 <td>Public method to ban and kick a user by its nick name.</td> |
114 </tr><tr> |
142 </tr> |
|
143 <tr> |
115 <td><a href="#CooperationClient.banUser">banUser</a></td> |
144 <td><a href="#CooperationClient.banUser">banUser</a></td> |
116 <td>Public method to ban a user by its nick name.</td> |
145 <td>Public method to ban a user by its nick name.</td> |
117 </tr><tr> |
146 </tr> |
|
147 <tr> |
118 <td><a href="#CooperationClient.chatWidget">chatWidget</a></td> |
148 <td><a href="#CooperationClient.chatWidget">chatWidget</a></td> |
119 <td>Public method to get a reference to the chat widget.</td> |
149 <td>Public method to get a reference to the chat widget.</td> |
120 </tr><tr> |
150 </tr> |
|
151 <tr> |
121 <td><a href="#CooperationClient.close">close</a></td> |
152 <td><a href="#CooperationClient.close">close</a></td> |
122 <td>Public method to close all connections and stop listening.</td> |
153 <td>Public method to close all connections and stop listening.</td> |
123 </tr><tr> |
154 </tr> |
|
155 <tr> |
124 <td><a href="#CooperationClient.connectToHost">connectToHost</a></td> |
156 <td><a href="#CooperationClient.connectToHost">connectToHost</a></td> |
125 <td>Public method to connect to a host.</td> |
157 <td>Public method to connect to a host.</td> |
126 </tr><tr> |
158 </tr> |
|
159 <tr> |
127 <td><a href="#CooperationClient.disconnectConnections">disconnectConnections</a></td> |
160 <td><a href="#CooperationClient.disconnectConnections">disconnectConnections</a></td> |
128 <td>Public slot to disconnect from the chat network.</td> |
161 <td>Public slot to disconnect from the chat network.</td> |
129 </tr><tr> |
162 </tr> |
|
163 <tr> |
130 <td><a href="#CooperationClient.errorString">errorString</a></td> |
164 <td><a href="#CooperationClient.errorString">errorString</a></td> |
131 <td>Public method to get a human readable error message about the last server error.</td> |
165 <td>Public method to get a human readable error message about the last server error.</td> |
132 </tr><tr> |
166 </tr> |
|
167 <tr> |
133 <td><a href="#CooperationClient.hasConnection">hasConnection</a></td> |
168 <td><a href="#CooperationClient.hasConnection">hasConnection</a></td> |
134 <td>Public method to check for an existing connection.</td> |
169 <td>Public method to check for an existing connection.</td> |
135 </tr><tr> |
170 </tr> |
|
171 <tr> |
136 <td><a href="#CooperationClient.hasConnections">hasConnections</a></td> |
172 <td><a href="#CooperationClient.hasConnections">hasConnections</a></td> |
137 <td>Public method to check, if there are any connections established.</td> |
173 <td>Public method to check, if there are any connections established.</td> |
138 </tr><tr> |
174 </tr> |
|
175 <tr> |
139 <td><a href="#CooperationClient.isListening">isListening</a></td> |
176 <td><a href="#CooperationClient.isListening">isListening</a></td> |
140 <td>Public method to check, if the client is listening for connections.</td> |
177 <td>Public method to check, if the client is listening for connections.</td> |
141 </tr><tr> |
178 </tr> |
|
179 <tr> |
142 <td><a href="#CooperationClient.kickUser">kickUser</a></td> |
180 <td><a href="#CooperationClient.kickUser">kickUser</a></td> |
143 <td>Public method to kick a user by its nick name.</td> |
181 <td>Public method to kick a user by its nick name.</td> |
144 </tr><tr> |
182 </tr> |
|
183 <tr> |
145 <td><a href="#CooperationClient.nickName">nickName</a></td> |
184 <td><a href="#CooperationClient.nickName">nickName</a></td> |
146 <td>Public method to get the nick name.</td> |
185 <td>Public method to get the nick name.</td> |
147 </tr><tr> |
186 </tr> |
|
187 <tr> |
148 <td><a href="#CooperationClient.removeConnection">removeConnection</a></td> |
188 <td><a href="#CooperationClient.removeConnection">removeConnection</a></td> |
149 <td>Public method to remove a connection.</td> |
189 <td>Public method to remove a connection.</td> |
150 </tr><tr> |
190 </tr> |
|
191 <tr> |
151 <td><a href="#CooperationClient.sendEditorCommand">sendEditorCommand</a></td> |
192 <td><a href="#CooperationClient.sendEditorCommand">sendEditorCommand</a></td> |
152 <td>Public method to send an editor command.</td> |
193 <td>Public method to send an editor command.</td> |
153 </tr><tr> |
194 </tr> |
|
195 <tr> |
154 <td><a href="#CooperationClient.sendMessage">sendMessage</a></td> |
196 <td><a href="#CooperationClient.sendMessage">sendMessage</a></td> |
155 <td>Public method to send a message.</td> |
197 <td>Public method to send a message.</td> |
156 </tr><tr> |
198 </tr> |
|
199 <tr> |
157 <td><a href="#CooperationClient.startListening">startListening</a></td> |
200 <td><a href="#CooperationClient.startListening">startListening</a></td> |
158 <td>Public method to start listening for new connections.</td> |
201 <td>Public method to start listening for new connections.</td> |
159 </tr> |
202 </tr> |
160 </table> |
203 </table> |
161 <h3>Static Methods</h3> |
204 <h3>Static Methods</h3> |
|
205 |
162 <table> |
206 <table> |
163 <tr><td>None</td></tr> |
207 <tr><td>None</td></tr> |
164 </table> |
208 </table> |
|
209 |
165 <a NAME="CooperationClient.__init__" ID="CooperationClient.__init__"></a> |
210 <a NAME="CooperationClient.__init__" ID="CooperationClient.__init__"></a> |
166 <h4>CooperationClient (Constructor)</h4> |
211 <h4>CooperationClient (Constructor)</h4> |
167 <b>CooperationClient</b>(<i>parent=None</i>) |
212 <b>CooperationClient</b>(<i>parent=None</i>) |
|
213 |
168 <p> |
214 <p> |
169 Constructor |
215 Constructor |
170 </p><dl> |
216 </p> |
|
217 <dl> |
|
218 |
171 <dt><i>parent</i></dt> |
219 <dt><i>parent</i></dt> |
172 <dd> |
220 <dd> |
173 reference to the parent object (QObject) |
221 reference to the parent object (QObject) |
174 </dd> |
222 </dd> |
175 </dl><a NAME="CooperationClient.__connectionError" ID="CooperationClient.__connectionError"></a> |
223 </dl> |
|
224 <a NAME="CooperationClient.__connectionError" ID="CooperationClient.__connectionError"></a> |
176 <h4>CooperationClient.__connectionError</h4> |
225 <h4>CooperationClient.__connectionError</h4> |
177 <b>__connectionError</b>(<i>socketError, connection</i>) |
226 <b>__connectionError</b>(<i>socketError, connection</i>) |
|
227 |
178 <p> |
228 <p> |
179 Private slot to handle a connection error. |
229 Private slot to handle a connection error. |
180 </p><dl> |
230 </p> |
|
231 <dl> |
|
232 |
181 <dt><i>socketError</i> (QAbstractSocket.SocketError)</dt> |
233 <dt><i>socketError</i> (QAbstractSocket.SocketError)</dt> |
182 <dd> |
234 <dd> |
183 reference to the error object |
235 reference to the error object |
184 </dd><dt><i>connection</i> (Connection)</dt> |
236 </dd> |
|
237 <dt><i>connection</i> (Connection)</dt> |
185 <dd> |
238 <dd> |
186 connection that caused the error |
239 connection that caused the error |
187 </dd> |
240 </dd> |
188 </dl><a NAME="CooperationClient.__connectionRejected" ID="CooperationClient.__connectionRejected"></a> |
241 </dl> |
|
242 <a NAME="CooperationClient.__connectionRejected" ID="CooperationClient.__connectionRejected"></a> |
189 <h4>CooperationClient.__connectionRejected</h4> |
243 <h4>CooperationClient.__connectionRejected</h4> |
190 <b>__connectionRejected</b>(<i>msg</i>) |
244 <b>__connectionRejected</b>(<i>msg</i>) |
|
245 |
191 <p> |
246 <p> |
192 Private slot to handle the rejection of a connection. |
247 Private slot to handle the rejection of a connection. |
193 </p><dl> |
248 </p> |
|
249 <dl> |
|
250 |
194 <dt><i>msg</i></dt> |
251 <dt><i>msg</i></dt> |
195 <dd> |
252 <dd> |
196 error message (string) |
253 error message (string) |
197 </dd> |
254 </dd> |
198 </dl><a NAME="CooperationClient.__disconnected" ID="CooperationClient.__disconnected"></a> |
255 </dl> |
|
256 <a NAME="CooperationClient.__disconnected" ID="CooperationClient.__disconnected"></a> |
199 <h4>CooperationClient.__disconnected</h4> |
257 <h4>CooperationClient.__disconnected</h4> |
200 <b>__disconnected</b>(<i>connection</i>) |
258 <b>__disconnected</b>(<i>connection</i>) |
|
259 |
201 <p> |
260 <p> |
202 Private slot to handle the disconnection of a chat client. |
261 Private slot to handle the disconnection of a chat client. |
203 </p><dl> |
262 </p> |
|
263 <dl> |
|
264 |
204 <dt><i>connection</i> (Connection)</dt> |
265 <dt><i>connection</i> (Connection)</dt> |
205 <dd> |
266 <dd> |
206 connection that was disconnected |
267 connection that was disconnected |
207 </dd> |
268 </dd> |
208 </dl><a NAME="CooperationClient.__findConnections" ID="CooperationClient.__findConnections"></a> |
269 </dl> |
|
270 <a NAME="CooperationClient.__findConnections" ID="CooperationClient.__findConnections"></a> |
209 <h4>CooperationClient.__findConnections</h4> |
271 <h4>CooperationClient.__findConnections</h4> |
210 <b>__findConnections</b>(<i>nick</i>) |
272 <b>__findConnections</b>(<i>nick</i>) |
|
273 |
211 <p> |
274 <p> |
212 Private method to get a list of connection given a nick name. |
275 Private method to get a list of connection given a nick name. |
213 </p><dl> |
276 </p> |
|
277 <dl> |
|
278 |
214 <dt><i>nick</i></dt> |
279 <dt><i>nick</i></dt> |
215 <dd> |
280 <dd> |
216 nick name in the format of self.nickName() (string) |
281 nick name in the format of self.nickName() (string) |
217 </dd> |
282 </dd> |
218 </dl><dl> |
283 </dl> |
|
284 <dl> |
219 <dt>Returns:</dt> |
285 <dt>Returns:</dt> |
220 <dd> |
286 <dd> |
221 list of references to the connection objects (list of |
287 list of references to the connection objects (list of |
222 Connection) |
288 Connection) |
223 </dd> |
289 </dd> |
224 </dl><a NAME="CooperationClient.__getParticipants" ID="CooperationClient.__getParticipants"></a> |
290 </dl> |
|
291 <a NAME="CooperationClient.__getParticipants" ID="CooperationClient.__getParticipants"></a> |
225 <h4>CooperationClient.__getParticipants</h4> |
292 <h4>CooperationClient.__getParticipants</h4> |
226 <b>__getParticipants</b>(<i>reqConnection</i>) |
293 <b>__getParticipants</b>(<i>reqConnection</i>) |
|
294 |
227 <p> |
295 <p> |
228 Private slot to handle the request for a list of participants. |
296 Private slot to handle the request for a list of participants. |
229 </p><dl> |
297 </p> |
|
298 <dl> |
|
299 |
230 <dt><i>reqConnection</i> (Connection)</dt> |
300 <dt><i>reqConnection</i> (Connection)</dt> |
231 <dd> |
301 <dd> |
232 reference to the connection to get |
302 reference to the connection to get |
233 participants for |
303 participants for |
234 </dd> |
304 </dd> |
235 </dl><a NAME="CooperationClient.__newConnection" ID="CooperationClient.__newConnection"></a> |
305 </dl> |
|
306 <a NAME="CooperationClient.__newConnection" ID="CooperationClient.__newConnection"></a> |
236 <h4>CooperationClient.__newConnection</h4> |
307 <h4>CooperationClient.__newConnection</h4> |
237 <b>__newConnection</b>(<i>connection</i>) |
308 <b>__newConnection</b>(<i>connection</i>) |
|
309 |
238 <p> |
310 <p> |
239 Private slot to handle a new connection. |
311 Private slot to handle a new connection. |
240 </p><dl> |
312 </p> |
|
313 <dl> |
|
314 |
241 <dt><i>connection</i></dt> |
315 <dt><i>connection</i></dt> |
242 <dd> |
316 <dd> |
243 reference to the new connection (Connection) |
317 reference to the new connection (Connection) |
244 </dd> |
318 </dd> |
245 </dl><a NAME="CooperationClient.__processParticipants" ID="CooperationClient.__processParticipants"></a> |
319 </dl> |
|
320 <a NAME="CooperationClient.__processParticipants" ID="CooperationClient.__processParticipants"></a> |
246 <h4>CooperationClient.__processParticipants</h4> |
321 <h4>CooperationClient.__processParticipants</h4> |
247 <b>__processParticipants</b>(<i>participants</i>) |
322 <b>__processParticipants</b>(<i>participants</i>) |
|
323 |
248 <p> |
324 <p> |
249 Private slot to handle the receipt of a list of participants. |
325 Private slot to handle the receipt of a list of participants. |
250 </p><dl> |
326 </p> |
|
327 <dl> |
|
328 |
251 <dt><i>participants</i></dt> |
329 <dt><i>participants</i></dt> |
252 <dd> |
330 <dd> |
253 list of participants (list of strings of |
331 list of participants (list of strings of |
254 "host:port") |
332 "host:port") |
255 </dd> |
333 </dd> |
256 </dl><a NAME="CooperationClient.__readyForUse" ID="CooperationClient.__readyForUse"></a> |
334 </dl> |
|
335 <a NAME="CooperationClient.__readyForUse" ID="CooperationClient.__readyForUse"></a> |
257 <h4>CooperationClient.__readyForUse</h4> |
336 <h4>CooperationClient.__readyForUse</h4> |
258 <b>__readyForUse</b>(<i>connection</i>) |
337 <b>__readyForUse</b>(<i>connection</i>) |
|
338 |
259 <p> |
339 <p> |
260 Private slot to handle a connection getting ready for use. |
340 Private slot to handle a connection getting ready for use. |
261 </p><dl> |
341 </p> |
|
342 <dl> |
|
343 |
262 <dt><i>connection</i> (Connection)</dt> |
344 <dt><i>connection</i> (Connection)</dt> |
263 <dd> |
345 <dd> |
264 connection that got ready for use |
346 connection that got ready for use |
265 </dd> |
347 </dd> |
266 </dl><a NAME="CooperationClient.banKickUser" ID="CooperationClient.banKickUser"></a> |
348 </dl> |
|
349 <a NAME="CooperationClient.banKickUser" ID="CooperationClient.banKickUser"></a> |
267 <h4>CooperationClient.banKickUser</h4> |
350 <h4>CooperationClient.banKickUser</h4> |
268 <b>banKickUser</b>(<i>nick</i>) |
351 <b>banKickUser</b>(<i>nick</i>) |
|
352 |
269 <p> |
353 <p> |
270 Public method to ban and kick a user by its nick name. |
354 Public method to ban and kick a user by its nick name. |
271 </p><dl> |
355 </p> |
|
356 <dl> |
|
357 |
272 <dt><i>nick</i></dt> |
358 <dt><i>nick</i></dt> |
273 <dd> |
359 <dd> |
274 nick name in the format of self.nickName() (string) |
360 nick name in the format of self.nickName() (string) |
275 </dd> |
361 </dd> |
276 </dl><a NAME="CooperationClient.banUser" ID="CooperationClient.banUser"></a> |
362 </dl> |
|
363 <a NAME="CooperationClient.banUser" ID="CooperationClient.banUser"></a> |
277 <h4>CooperationClient.banUser</h4> |
364 <h4>CooperationClient.banUser</h4> |
278 <b>banUser</b>(<i>nick</i>) |
365 <b>banUser</b>(<i>nick</i>) |
|
366 |
279 <p> |
367 <p> |
280 Public method to ban a user by its nick name. |
368 Public method to ban a user by its nick name. |
281 </p><dl> |
369 </p> |
|
370 <dl> |
|
371 |
282 <dt><i>nick</i></dt> |
372 <dt><i>nick</i></dt> |
283 <dd> |
373 <dd> |
284 nick name in the format of self.nickName() (string) |
374 nick name in the format of self.nickName() (string) |
285 </dd> |
375 </dd> |
286 </dl><a NAME="CooperationClient.chatWidget" ID="CooperationClient.chatWidget"></a> |
376 </dl> |
|
377 <a NAME="CooperationClient.chatWidget" ID="CooperationClient.chatWidget"></a> |
287 <h4>CooperationClient.chatWidget</h4> |
378 <h4>CooperationClient.chatWidget</h4> |
288 <b>chatWidget</b>(<i></i>) |
379 <b>chatWidget</b>(<i></i>) |
|
380 |
289 <p> |
381 <p> |
290 Public method to get a reference to the chat widget. |
382 Public method to get a reference to the chat widget. |
291 </p><dl> |
383 </p> |
|
384 <dl> |
292 <dt>Returns:</dt> |
385 <dt>Returns:</dt> |
293 <dd> |
386 <dd> |
294 reference to the chat widget (ChatWidget) |
387 reference to the chat widget (ChatWidget) |
295 </dd> |
388 </dd> |
296 </dl><a NAME="CooperationClient.close" ID="CooperationClient.close"></a> |
389 </dl> |
|
390 <a NAME="CooperationClient.close" ID="CooperationClient.close"></a> |
297 <h4>CooperationClient.close</h4> |
391 <h4>CooperationClient.close</h4> |
298 <b>close</b>(<i></i>) |
392 <b>close</b>(<i></i>) |
|
393 |
299 <p> |
394 <p> |
300 Public method to close all connections and stop listening. |
395 Public method to close all connections and stop listening. |
301 </p><a NAME="CooperationClient.connectToHost" ID="CooperationClient.connectToHost"></a> |
396 </p> |
|
397 <a NAME="CooperationClient.connectToHost" ID="CooperationClient.connectToHost"></a> |
302 <h4>CooperationClient.connectToHost</h4> |
398 <h4>CooperationClient.connectToHost</h4> |
303 <b>connectToHost</b>(<i>host, port</i>) |
399 <b>connectToHost</b>(<i>host, port</i>) |
|
400 |
304 <p> |
401 <p> |
305 Public method to connect to a host. |
402 Public method to connect to a host. |
306 </p><dl> |
403 </p> |
|
404 <dl> |
|
405 |
307 <dt><i>host</i></dt> |
406 <dt><i>host</i></dt> |
308 <dd> |
407 <dd> |
309 host to connect to (string) |
408 host to connect to (string) |
310 </dd><dt><i>port</i></dt> |
409 </dd> |
|
410 <dt><i>port</i></dt> |
311 <dd> |
411 <dd> |
312 port to connect to (integer) |
412 port to connect to (integer) |
313 </dd> |
413 </dd> |
314 </dl><a NAME="CooperationClient.disconnectConnections" ID="CooperationClient.disconnectConnections"></a> |
414 </dl> |
|
415 <a NAME="CooperationClient.disconnectConnections" ID="CooperationClient.disconnectConnections"></a> |
315 <h4>CooperationClient.disconnectConnections</h4> |
416 <h4>CooperationClient.disconnectConnections</h4> |
316 <b>disconnectConnections</b>(<i></i>) |
417 <b>disconnectConnections</b>(<i></i>) |
|
418 |
317 <p> |
419 <p> |
318 Public slot to disconnect from the chat network. |
420 Public slot to disconnect from the chat network. |
319 </p><a NAME="CooperationClient.errorString" ID="CooperationClient.errorString"></a> |
421 </p> |
|
422 <a NAME="CooperationClient.errorString" ID="CooperationClient.errorString"></a> |
320 <h4>CooperationClient.errorString</h4> |
423 <h4>CooperationClient.errorString</h4> |
321 <b>errorString</b>(<i></i>) |
424 <b>errorString</b>(<i></i>) |
|
425 |
322 <p> |
426 <p> |
323 Public method to get a human readable error message about the last |
427 Public method to get a human readable error message about the last |
324 server error. |
428 server error. |
325 </p><dl> |
429 </p> |
|
430 <dl> |
326 <dt>Returns:</dt> |
431 <dt>Returns:</dt> |
327 <dd> |
432 <dd> |
328 human readable error message about the last server error |
433 human readable error message about the last server error |
329 (string) |
434 (string) |
330 </dd> |
435 </dd> |
331 </dl><a NAME="CooperationClient.hasConnection" ID="CooperationClient.hasConnection"></a> |
436 </dl> |
|
437 <a NAME="CooperationClient.hasConnection" ID="CooperationClient.hasConnection"></a> |
332 <h4>CooperationClient.hasConnection</h4> |
438 <h4>CooperationClient.hasConnection</h4> |
333 <b>hasConnection</b>(<i>senderIp, senderPort=-1</i>) |
439 <b>hasConnection</b>(<i>senderIp, senderPort=-1</i>) |
|
440 |
334 <p> |
441 <p> |
335 Public method to check for an existing connection. |
442 Public method to check for an existing connection. |
336 </p><dl> |
443 </p> |
|
444 <dl> |
|
445 |
337 <dt><i>senderIp</i></dt> |
446 <dt><i>senderIp</i></dt> |
338 <dd> |
447 <dd> |
339 address of the sender (QHostAddress) |
448 address of the sender (QHostAddress) |
340 </dd><dt><i>senderPort</i></dt> |
449 </dd> |
|
450 <dt><i>senderPort</i></dt> |
341 <dd> |
451 <dd> |
342 port of the sender (integer) |
452 port of the sender (integer) |
343 </dd> |
453 </dd> |
344 </dl><dl> |
454 </dl> |
|
455 <dl> |
345 <dt>Returns:</dt> |
456 <dt>Returns:</dt> |
346 <dd> |
457 <dd> |
347 flag indicating an existing connection (boolean) |
458 flag indicating an existing connection (boolean) |
348 </dd> |
459 </dd> |
349 </dl><a NAME="CooperationClient.hasConnections" ID="CooperationClient.hasConnections"></a> |
460 </dl> |
|
461 <a NAME="CooperationClient.hasConnections" ID="CooperationClient.hasConnections"></a> |
350 <h4>CooperationClient.hasConnections</h4> |
462 <h4>CooperationClient.hasConnections</h4> |
351 <b>hasConnections</b>(<i></i>) |
463 <b>hasConnections</b>(<i></i>) |
|
464 |
352 <p> |
465 <p> |
353 Public method to check, if there are any connections established. |
466 Public method to check, if there are any connections established. |
354 </p><dl> |
467 </p> |
|
468 <dl> |
355 <dt>Returns:</dt> |
469 <dt>Returns:</dt> |
356 <dd> |
470 <dd> |
357 flag indicating the presence of connections (boolean) |
471 flag indicating the presence of connections (boolean) |
358 </dd> |
472 </dd> |
359 </dl><a NAME="CooperationClient.isListening" ID="CooperationClient.isListening"></a> |
473 </dl> |
|
474 <a NAME="CooperationClient.isListening" ID="CooperationClient.isListening"></a> |
360 <h4>CooperationClient.isListening</h4> |
475 <h4>CooperationClient.isListening</h4> |
361 <b>isListening</b>(<i></i>) |
476 <b>isListening</b>(<i></i>) |
|
477 |
362 <p> |
478 <p> |
363 Public method to check, if the client is listening for connections. |
479 Public method to check, if the client is listening for connections. |
364 </p><dl> |
480 </p> |
|
481 <dl> |
365 <dt>Returns:</dt> |
482 <dt>Returns:</dt> |
366 <dd> |
483 <dd> |
367 flag indicating the listening state (boolean) |
484 flag indicating the listening state (boolean) |
368 </dd> |
485 </dd> |
369 </dl><a NAME="CooperationClient.kickUser" ID="CooperationClient.kickUser"></a> |
486 </dl> |
|
487 <a NAME="CooperationClient.kickUser" ID="CooperationClient.kickUser"></a> |
370 <h4>CooperationClient.kickUser</h4> |
488 <h4>CooperationClient.kickUser</h4> |
371 <b>kickUser</b>(<i>nick</i>) |
489 <b>kickUser</b>(<i>nick</i>) |
|
490 |
372 <p> |
491 <p> |
373 Public method to kick a user by its nick name. |
492 Public method to kick a user by its nick name. |
374 </p><dl> |
493 </p> |
|
494 <dl> |
|
495 |
375 <dt><i>nick</i></dt> |
496 <dt><i>nick</i></dt> |
376 <dd> |
497 <dd> |
377 nick name in the format of self.nickName() (string) |
498 nick name in the format of self.nickName() (string) |
378 </dd> |
499 </dd> |
379 </dl><a NAME="CooperationClient.nickName" ID="CooperationClient.nickName"></a> |
500 </dl> |
|
501 <a NAME="CooperationClient.nickName" ID="CooperationClient.nickName"></a> |
380 <h4>CooperationClient.nickName</h4> |
502 <h4>CooperationClient.nickName</h4> |
381 <b>nickName</b>(<i></i>) |
503 <b>nickName</b>(<i></i>) |
|
504 |
382 <p> |
505 <p> |
383 Public method to get the nick name. |
506 Public method to get the nick name. |
384 </p><dl> |
507 </p> |
|
508 <dl> |
385 <dt>Returns:</dt> |
509 <dt>Returns:</dt> |
386 <dd> |
510 <dd> |
387 nick name (string) |
511 nick name (string) |
388 </dd> |
512 </dd> |
389 </dl><a NAME="CooperationClient.removeConnection" ID="CooperationClient.removeConnection"></a> |
513 </dl> |
|
514 <a NAME="CooperationClient.removeConnection" ID="CooperationClient.removeConnection"></a> |
390 <h4>CooperationClient.removeConnection</h4> |
515 <h4>CooperationClient.removeConnection</h4> |
391 <b>removeConnection</b>(<i>connection</i>) |
516 <b>removeConnection</b>(<i>connection</i>) |
|
517 |
392 <p> |
518 <p> |
393 Public method to remove a connection. |
519 Public method to remove a connection. |
394 </p><dl> |
520 </p> |
|
521 <dl> |
|
522 |
395 <dt><i>connection</i></dt> |
523 <dt><i>connection</i></dt> |
396 <dd> |
524 <dd> |
397 reference to the connection to be removed |
525 reference to the connection to be removed |
398 (Connection) |
526 (Connection) |
399 </dd> |
527 </dd> |
400 </dl><a NAME="CooperationClient.sendEditorCommand" ID="CooperationClient.sendEditorCommand"></a> |
528 </dl> |
|
529 <a NAME="CooperationClient.sendEditorCommand" ID="CooperationClient.sendEditorCommand"></a> |
401 <h4>CooperationClient.sendEditorCommand</h4> |
530 <h4>CooperationClient.sendEditorCommand</h4> |
402 <b>sendEditorCommand</b>(<i>projectHash, filename, message</i>) |
531 <b>sendEditorCommand</b>(<i>projectHash, filename, message</i>) |
|
532 |
403 <p> |
533 <p> |
404 Public method to send an editor command. |
534 Public method to send an editor command. |
405 </p><dl> |
535 </p> |
|
536 <dl> |
|
537 |
406 <dt><i>projectHash</i></dt> |
538 <dt><i>projectHash</i></dt> |
407 <dd> |
539 <dd> |
408 hash of the project (string) |
540 hash of the project (string) |
409 </dd><dt><i>filename</i></dt> |
541 </dd> |
|
542 <dt><i>filename</i></dt> |
410 <dd> |
543 <dd> |
411 project relative universal file name of |
544 project relative universal file name of |
412 the sending editor (string) |
545 the sending editor (string) |
413 </dd><dt><i>message</i></dt> |
546 </dd> |
|
547 <dt><i>message</i></dt> |
414 <dd> |
548 <dd> |
415 editor command to be sent (string) |
549 editor command to be sent (string) |
416 </dd> |
550 </dd> |
417 </dl><a NAME="CooperationClient.sendMessage" ID="CooperationClient.sendMessage"></a> |
551 </dl> |
|
552 <a NAME="CooperationClient.sendMessage" ID="CooperationClient.sendMessage"></a> |
418 <h4>CooperationClient.sendMessage</h4> |
553 <h4>CooperationClient.sendMessage</h4> |
419 <b>sendMessage</b>(<i>message</i>) |
554 <b>sendMessage</b>(<i>message</i>) |
|
555 |
420 <p> |
556 <p> |
421 Public method to send a message. |
557 Public method to send a message. |
422 </p><dl> |
558 </p> |
|
559 <dl> |
|
560 |
423 <dt><i>message</i></dt> |
561 <dt><i>message</i></dt> |
424 <dd> |
562 <dd> |
425 message to be sent (string) |
563 message to be sent (string) |
426 </dd> |
564 </dd> |
427 </dl><a NAME="CooperationClient.startListening" ID="CooperationClient.startListening"></a> |
565 </dl> |
|
566 <a NAME="CooperationClient.startListening" ID="CooperationClient.startListening"></a> |
428 <h4>CooperationClient.startListening</h4> |
567 <h4>CooperationClient.startListening</h4> |
429 <b>startListening</b>(<i>port=-1</i>) |
568 <b>startListening</b>(<i>port=-1</i>) |
|
569 |
430 <p> |
570 <p> |
431 Public method to start listening for new connections. |
571 Public method to start listening for new connections. |
432 </p><dl> |
572 </p> |
|
573 <dl> |
|
574 |
433 <dt><i>port</i></dt> |
575 <dt><i>port</i></dt> |
434 <dd> |
576 <dd> |
435 port to listen on (integer) |
577 port to listen on (integer) |
436 </dd> |
578 </dd> |
437 </dl><dl> |
579 </dl> |
|
580 <dl> |
438 <dt>Returns:</dt> |
581 <dt>Returns:</dt> |
439 <dd> |
582 <dd> |
440 tuple giving a flag indicating success (boolean) and |
583 tuple giving a flag indicating success (boolean) and |
441 the port the server listens on |
584 the port the server listens on |
442 </dd> |
585 </dd> |