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">
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File 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>
11 <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code>
13 Inheritance diagram for Request:<p><center><img src="classRequest__inherit__graph.gif" border="0" usemap="#Request__inherit__map" alt="Inheritance graph"></center>
14 <map name="Request__inherit__map">
15 <area href="classModuleMessage.html" shape="rect" coords="8,82,128,109" alt="">
16 <area href="classclassbase.html" shape="rect" coords="28,8,108,34" alt="">
18 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Request:<p><center><img src="classRequest__coll__graph.gif" border="0" usemap="#Request__coll__map" alt="Collaboration graph"></center>
19 <map name="Request__coll__map">
20 <area href="classModuleMessage.html" shape="rect" coords="8,175,128,202" alt="">
21 <area href="classclassbase.html" shape="rect" coords="96,98,176,125" alt="">
22 <area href="classModule.html" shape="rect" coords="152,175,218,202" alt="">
24 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classRequest-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
26 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
27 <tr><td class="memItemLeft" nowrap align=right valign=top> </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>
29 <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new Request. </em> <a href="#a0"></a><em><br><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a1">GetData</a> ()</td></tr>
32 <tr><td class="mdescLeft"> </td><td class="mdescRight">Fetch the Request data. </em> <a href="#a1"></a><em><br><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a2">GetSource</a> ()</td></tr>
35 <tr><td class="mdescLeft"> </td><td class="mdescRight">Fetch the request source. </em> <a href="#a2"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a3">GetDest</a> ()</td></tr>
38 <tr><td class="mdescLeft"> </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>
39 <tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a4">Send</a> ()</td></tr>
41 <tr><td class="mdescLeft"> </td><td class="mdescRight">Send the Request. </em> <a href="#a4"></a><em><br><br></td></tr>
42 <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
43 <tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p0">data</a></td></tr>
45 <tr><td class="mdescLeft"> </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>
46 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p1">source</a></td></tr>
48 <tr><td class="mdescLeft"> </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>
49 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classModule.html">Module</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p2">dest</a></td></tr>
51 <tr><td class="mdescLeft"> </td><td class="mdescRight">The single destination of the Request. </em> <a href="#p2"></a><em><br><br></td></tr>
53 <hr><a name="_details"></a><h2>Detailed Description</h2>
54 The Request class is a unicast message directed at a given module.
56 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.
60 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 & Destructor Documentation</h2>
61 <a name="a0" doxytag="Request::Request"></a><p>
62 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
65 <table cellpadding="0" cellspacing="0" border="0">
67 <td class="md" nowrap valign="top"> Request::Request </td>
68 <td class="md" valign="top">( </td>
69 <td class="md" nowrap valign="top">char * </td>
70 <td class="mdname" nowrap> <em>anydata</em>, </td>
75 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
76 <td class="mdname" nowrap> <em>src</em>, </td>
81 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
82 <td class="mdname" nowrap> <em>dst</em></td>
86 <td class="md">) </td>
87 <td class="md" colspan="2"></td>
94 <table cellspacing=5 cellpadding=0 border=0>
102 Create a new Request.
106 Definition at line <a class="el" href="modules_8cpp-source.html#l00316">316</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
108 <div class="fragment"><pre>00316 : <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) { };
112 <hr><h2>Member Function Documentation</h2>
113 <a name="a1" doxytag="Request::GetData"></a><p>
114 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
117 <table cellpadding="0" cellspacing="0" border="0">
119 <td class="md" nowrap valign="top"> char * Request::GetData </td>
120 <td class="md" valign="top">( </td>
121 <td class="mdname1" valign="top" nowrap> </td>
122 <td class="md" valign="top"> ) </td>
123 <td class="md" nowrap></td>
130 <table cellspacing=5 cellpadding=0 border=0>
138 Fetch the Request data.
142 Definition at line <a class="el" href="modules_8cpp-source.html#l00318">318</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
144 References <a class="el" href="modules_8h-source.html#l00159">data</a>.
146 <div class="fragment"><pre>00319 {
147 00320 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p0">data</a>;
152 <a name="a3" doxytag="Request::GetDest"></a><p>
153 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
156 <table cellpadding="0" cellspacing="0" border="0">
158 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetDest </td>
159 <td class="md" valign="top">( </td>
160 <td class="mdname1" valign="top" nowrap> </td>
161 <td class="md" valign="top"> ) </td>
162 <td class="md" nowrap></td>
169 <table cellspacing=5 cellpadding=0 border=0>
177 Fetch the request destination (should be 'this' in the receiving module).
181 Definition at line <a class="el" href="modules_8cpp-source.html#l00328">328</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
183 References <a class="el" href="modules_8h-source.html#l00166">dest</a>.
185 <div class="fragment"><pre>00329 {
186 00330 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p2">dest</a>;
191 <a name="a2" doxytag="Request::GetSource"></a><p>
192 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
195 <table cellpadding="0" cellspacing="0" border="0">
197 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetSource </td>
198 <td class="md" valign="top">( </td>
199 <td class="mdname1" valign="top" nowrap> </td>
200 <td class="md" valign="top"> ) </td>
201 <td class="md" nowrap></td>
208 <table cellspacing=5 cellpadding=0 border=0>
216 Fetch the request source.
220 Definition at line <a class="el" href="modules_8cpp-source.html#l00323">323</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
222 References <a class="el" href="modules_8h-source.html#l00163">source</a>.
224 <div class="fragment"><pre>00324 {
225 00325 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p1">source</a>;
230 <a name="a4" doxytag="Request::Send"></a><p>
231 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
234 <table cellpadding="0" cellspacing="0" border="0">
236 <td class="md" nowrap valign="top"> char * Request::Send </td>
237 <td class="md" valign="top">( </td>
238 <td class="mdname1" valign="top" nowrap> </td>
239 <td class="md" valign="top"> ) </td>
240 <td class="md" nowrap><code> [virtual]</code></td>
247 <table cellspacing=5 cellpadding=0 border=0>
257 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.
259 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
261 Definition at line <a class="el" href="modules_8cpp-source.html#l00333">333</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
263 References <a class="el" href="modules_8h-source.html#l00166">dest</a>, and <a class="el" href="modules_8cpp-source.html#l00416">Module::OnRequest()</a>.
265 <div class="fragment"><pre>00334 {
266 00335 <span class="keywordflow">if</span> (this-><a class="code" href="classRequest.html#p2">dest</a>)
268 00337 <span class="keywordflow">return</span> <a class="code" href="classRequest.html#p2">dest</a>-><a class="code" href="classModule.html#a46">OnRequest</a>(<span class="keyword">this</span>);
270 00339 <span class="keywordflow">else</span>
272 00341 <span class="keywordflow">return</span> NULL;
278 <hr><h2>Member Data Documentation</h2>
279 <a name="p0" doxytag="Request::data"></a><p>
280 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
283 <table cellpadding="0" cellspacing="0" border="0">
285 <td class="md" nowrap valign="top"> char* <a class="el" href="classRequest.html#p0">Request::data</a><code> [protected]</code>
290 <table cellspacing=5 cellpadding=0 border=0>
298 This member holds a pointer to arbitary data set by the emitter of the message.
302 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>.
304 Referenced by <a class="el" href="modules_8cpp-source.html#l00318">GetData()</a>. </td>
307 <a name="p2" doxytag="Request::dest"></a><p>
308 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
311 <table cellpadding="0" cellspacing="0" border="0">
313 <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>
318 <table cellspacing=5 cellpadding=0 border=0>
326 The single destination of the Request.
330 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>.
332 Referenced by <a class="el" href="modules_8cpp-source.html#l00328">GetDest()</a>, and <a class="el" href="modules_8cpp-source.html#l00333">Send()</a>. </td>
335 <a name="p1" doxytag="Request::source"></a><p>
336 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
339 <table cellpadding="0" cellspacing="0" border="0">
341 <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>
346 <table cellspacing=5 cellpadding=0 border=0>
354 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
358 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>.
360 Referenced by <a class="el" href="modules_8cpp-source.html#l00323">GetSource()</a>. </td>
363 <hr>The documentation for this class was generated from the following files:<ul>
364 <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>
365 <hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:58 2005 for InspIRCd by
366 <a href="http://www.doxygen.org/index.html">
367 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
368 </a>1.3.3 </small></address>