]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classRequest.html
Documented new recvq and sendq stuff
[user/henk/code/inspircd.git] / docs / module-doc / classRequest.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Request class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Request Class Reference</h1>The Request class is a unicast message directed at a given module.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
13 Inherits <a class="el" href="classModuleMessage.html">ModuleMessage</a>.
14 <p>
15 <a href="classRequest-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16 <tr><td></td></tr>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a0">Request</a> (char *anydata, <a class="el" href="classModule.html">Module</a> *src, <a class="el" href="classModule.html">Module</a> *dst)</td></tr>
19
20 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new Request. </em> <a href="#a0"></a><em><br><br></td></tr>
21 <tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a1">GetData</a> ()</td></tr>
22
23 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the Request data. </em> <a href="#a1"></a><em><br><br></td></tr>
24 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a2">GetSource</a> ()</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the request source. </em> <a href="#a2"></a><em><br><br></td></tr>
27 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a3">GetDest</a> ()</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the request destination (should be 'this' in the receiving module). </em> <a href="#a3"></a><em><br><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a4">Send</a> ()</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the Request. </em> <a href="#a4"></a><em><br><br></td></tr>
33 <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
34 <tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p0">data</a></td></tr>
35
36 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This member holds a pointer to arbitary data set by the emitter of the message. </em> <a href="#p0"></a><em><br><br></td></tr>
37 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p1">source</a></td></tr>
38
39 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. </em> <a href="#p1"></a><em><br><br></td></tr>
40 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p2">dest</a></td></tr>
41
42 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The single destination of the Request. </em> <a href="#p2"></a><em><br><br></td></tr>
43 </table>
44 <hr><a name="_details"></a><h2>Detailed Description</h2>
45 The Request class is a unicast message directed at a given module. 
46 <p>
47 When this class is properly instantiated it may be sent to a module using the <a class="el" href="classRequest.html#a4">Send()</a> method, which will call the given module's OnRequest method with this class as its parameter. 
48 <p>
49
50 <p>
51 Definition at line <a class="el" href="modules_8h-source.html#l00154">154</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
52 <a name="a0" doxytag="Request::Request"></a><p>
53 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
54   <tr>
55     <td class="mdRow">
56       <table cellpadding="0" cellspacing="0" border="0">
57         <tr>
58           <td class="md" nowrap valign="top"> Request::Request </td>
59           <td class="md" valign="top">(&nbsp;</td>
60           <td class="md" nowrap valign="top">char *&nbsp;</td>
61           <td class="mdname" nowrap> <em>anydata</em>, </td>
62         </tr>
63         <tr>
64           <td></td>
65           <td></td>
66           <td class="md" nowrap><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
67           <td class="mdname" nowrap> <em>src</em>, </td>
68         </tr>
69         <tr>
70           <td></td>
71           <td></td>
72           <td class="md" nowrap><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
73           <td class="mdname" nowrap> <em>dst</em></td>
74         </tr>
75         <tr>
76           <td></td>
77           <td class="md">)&nbsp;</td>
78           <td class="md" colspan="2"></td>
79         </tr>
80
81       </table>
82     </td>
83   </tr>
84 </table>
85 <table cellspacing=5 cellpadding=0 border=0>
86   <tr>
87     <td>
88       &nbsp;
89     </td>
90     <td>
91
92 <p>
93 Create a new Request. 
94 <p>
95
96 <p>
97 Definition at line <a class="el" href="modules_8cpp-source.html#l00315">315</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
98 <p>
99 <div class="fragment"><pre>00315 : <a class="code" href="classRequest.html#p0">data</a>(anydata), <a class="code" href="classRequest.html#p1">source</a>(src), <a class="code" href="classRequest.html#p2">dest</a>(dst) { };
100 </pre></div>    </td>
101   </tr>
102 </table>
103 <hr><h2>Member Function Documentation</h2>
104 <a name="a1" doxytag="Request::GetData"></a><p>
105 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
106   <tr>
107     <td class="mdRow">
108       <table cellpadding="0" cellspacing="0" border="0">
109         <tr>
110           <td class="md" nowrap valign="top"> char * Request::GetData </td>
111           <td class="md" valign="top">(&nbsp;</td>
112           <td class="mdname1" valign="top" nowrap>          </td>
113           <td class="md" valign="top">&nbsp;)&nbsp;</td>
114           <td class="md" nowrap></td>
115         </tr>
116
117       </table>
118     </td>
119   </tr>
120 </table>
121 <table cellspacing=5 cellpadding=0 border=0>
122   <tr>
123     <td>
124       &nbsp;
125     </td>
126     <td>
127
128 <p>
129 Fetch the Request data. 
130 <p>
131
132 <p>
133 Definition at line <a class="el" href="modules_8cpp-source.html#l00317">317</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
134 <p>
135 References <a class="el" href="modules_8h-source.html#l00159">data</a>.
136 <p>
137 <div class="fragment"><pre>00318 {
138 00319         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p0">data</a>;
139 00320 }
140 </pre></div>    </td>
141   </tr>
142 </table>
143 <a name="a3" doxytag="Request::GetDest"></a><p>
144 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
145   <tr>
146     <td class="mdRow">
147       <table cellpadding="0" cellspacing="0" border="0">
148         <tr>
149           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetDest </td>
150           <td class="md" valign="top">(&nbsp;</td>
151           <td class="mdname1" valign="top" nowrap>          </td>
152           <td class="md" valign="top">&nbsp;)&nbsp;</td>
153           <td class="md" nowrap></td>
154         </tr>
155
156       </table>
157     </td>
158   </tr>
159 </table>
160 <table cellspacing=5 cellpadding=0 border=0>
161   <tr>
162     <td>
163       &nbsp;
164     </td>
165     <td>
166
167 <p>
168 Fetch the request destination (should be 'this' in the receiving module). 
169 <p>
170
171 <p>
172 Definition at line <a class="el" href="modules_8cpp-source.html#l00327">327</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
173 <p>
174 References <a class="el" href="modules_8h-source.html#l00166">dest</a>.
175 <p>
176 <div class="fragment"><pre>00328 {
177 00329         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p2">dest</a>;
178 00330 }
179 </pre></div>    </td>
180   </tr>
181 </table>
182 <a name="a2" doxytag="Request::GetSource"></a><p>
183 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
184   <tr>
185     <td class="mdRow">
186       <table cellpadding="0" cellspacing="0" border="0">
187         <tr>
188           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetSource </td>
189           <td class="md" valign="top">(&nbsp;</td>
190           <td class="mdname1" valign="top" nowrap>          </td>
191           <td class="md" valign="top">&nbsp;)&nbsp;</td>
192           <td class="md" nowrap></td>
193         </tr>
194
195       </table>
196     </td>
197   </tr>
198 </table>
199 <table cellspacing=5 cellpadding=0 border=0>
200   <tr>
201     <td>
202       &nbsp;
203     </td>
204     <td>
205
206 <p>
207 Fetch the request source. 
208 <p>
209
210 <p>
211 Definition at line <a class="el" href="modules_8cpp-source.html#l00322">322</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
212 <p>
213 References <a class="el" href="modules_8h-source.html#l00163">source</a>.
214 <p>
215 <div class="fragment"><pre>00323 {
216 00324         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p1">source</a>;
217 00325 }
218 </pre></div>    </td>
219   </tr>
220 </table>
221 <a name="a4" doxytag="Request::Send"></a><p>
222 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
223   <tr>
224     <td class="mdRow">
225       <table cellpadding="0" cellspacing="0" border="0">
226         <tr>
227           <td class="md" nowrap valign="top"> char * Request::Send </td>
228           <td class="md" valign="top">(&nbsp;</td>
229           <td class="mdname1" valign="top" nowrap>          </td>
230           <td class="md" valign="top">&nbsp;)&nbsp;</td>
231           <td class="md" nowrap><code> [virtual]</code></td>
232         </tr>
233
234       </table>
235     </td>
236   </tr>
237 </table>
238 <table cellspacing=5 cellpadding=0 border=0>
239   <tr>
240     <td>
241       &nbsp;
242     </td>
243     <td>
244
245 <p>
246 Send the Request. 
247 <p>
248 Upon returning the result will be arbitary data returned by the module you sent the request to. It is up to your module to know what this data is and how to deal with it. 
249 <p>
250 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
251 <p>
252 Definition at line <a class="el" href="modules_8cpp-source.html#l00332">332</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
253 <p>
254 References <a class="el" href="modules_8h-source.html#l00166">dest</a>, and <a class="el" href="modules_8cpp-source.html#l00415">Module::OnRequest()</a>.
255 <p>
256 <div class="fragment"><pre>00333 {
257 00334         <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classRequest.html#p2">dest</a>)
258 00335         {
259 00336                 <span class="keywordflow">return</span> <a class="code" href="classRequest.html#p2">dest</a>-&gt;<a class="code" href="classModule.html#a46">OnRequest</a>(<span class="keyword">this</span>);
260 00337         }
261 00338         <span class="keywordflow">else</span>
262 00339         {
263 00340                 <span class="keywordflow">return</span> NULL;
264 00341         }
265 00342 }
266 </pre></div>    </td>
267   </tr>
268 </table>
269 <hr><h2>Member Data Documentation</h2>
270 <a name="p0" doxytag="Request::data"></a><p>
271 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
272   <tr>
273     <td class="mdRow">
274       <table cellpadding="0" cellspacing="0" border="0">
275         <tr>
276           <td class="md" nowrap valign="top"> char* <a class="el" href="classRequest.html#p0">Request::data</a><code> [protected]</code>
277       </table>
278     </td>
279   </tr>
280 </table>
281 <table cellspacing=5 cellpadding=0 border=0>
282   <tr>
283     <td>
284       &nbsp;
285     </td>
286     <td>
287
288 <p>
289 This member holds a pointer to arbitary data set by the emitter of the message. 
290 <p>
291
292 <p>
293 Definition at line <a class="el" href="modules_8h-source.html#l00159">159</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
294 <p>
295 Referenced by <a class="el" href="modules_8cpp-source.html#l00317">GetData()</a>.    </td>
296   </tr>
297 </table>
298 <a name="p2" doxytag="Request::dest"></a><p>
299 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
300   <tr>
301     <td class="mdRow">
302       <table cellpadding="0" cellspacing="0" border="0">
303         <tr>
304           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a>* <a class="el" href="classRequest.html#p2">Request::dest</a><code> [protected]</code>
305       </table>
306     </td>
307   </tr>
308 </table>
309 <table cellspacing=5 cellpadding=0 border=0>
310   <tr>
311     <td>
312       &nbsp;
313     </td>
314     <td>
315
316 <p>
317 The single destination of the Request. 
318 <p>
319
320 <p>
321 Definition at line <a class="el" href="modules_8h-source.html#l00166">166</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
322 <p>
323 Referenced by <a class="el" href="modules_8cpp-source.html#l00327">GetDest()</a>, and <a class="el" href="modules_8cpp-source.html#l00332">Send()</a>.    </td>
324   </tr>
325 </table>
326 <a name="p1" doxytag="Request::source"></a><p>
327 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
328   <tr>
329     <td class="mdRow">
330       <table cellpadding="0" cellspacing="0" border="0">
331         <tr>
332           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a>* <a class="el" href="classRequest.html#p1">Request::source</a><code> [protected]</code>
333       </table>
334     </td>
335   </tr>
336 </table>
337 <table cellspacing=5 cellpadding=0 border=0>
338   <tr>
339     <td>
340       &nbsp;
341     </td>
342     <td>
343
344 <p>
345 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. 
346 <p>
347
348 <p>
349 Definition at line <a class="el" href="modules_8h-source.html#l00163">163</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
350 <p>
351 Referenced by <a class="el" href="modules_8cpp-source.html#l00322">GetSource()</a>.    </td>
352   </tr>
353 </table>
354 <hr>The documentation for this class was generated from the following files:<ul>
355 <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
356 <hr size="1"><address style="align: right;"><small>Generated on Thu May 12 02:25:25 2005 for InspIRCd by
357 <a href="http://www.doxygen.org/index.html">
358 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
359 </a>1.3.3 </small></address>
360 </body>
361 </html>