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 Inherits <a class="el" href="classModuleMessage.html">ModuleMessage</a>.
15 <a href="classRequest-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <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>
20 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a1">GetData</a> ()</td></tr>
23 <tr><td class="mdescLeft"> </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> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a2">GetSource</a> ()</td></tr>
26 <tr><td class="mdescLeft"> </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> * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#a3">GetDest</a> ()</td></tr>
29 <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>
30 <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>
32 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p0">data</a></td></tr>
36 <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>
37 <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>
39 <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>
40 <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>
42 <tr><td class="mdescLeft"> </td><td class="mdescRight">The single destination of the Request. </em> <a href="#p2"></a><em><br><br></td></tr>
44 <hr><a name="_details"></a><h2>Detailed Description</h2>
45 The Request class is a unicast message directed at a given module.
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.
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 & Destructor Documentation</h2>
52 <a name="a0" doxytag="Request::Request"></a><p>
53 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
56 <table cellpadding="0" cellspacing="0" border="0">
58 <td class="md" nowrap valign="top"> Request::Request </td>
59 <td class="md" valign="top">( </td>
60 <td class="md" nowrap valign="top">char * </td>
61 <td class="mdname" nowrap> <em>anydata</em>, </td>
66 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
67 <td class="mdname" nowrap> <em>src</em>, </td>
72 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
73 <td class="mdname" nowrap> <em>dst</em></td>
77 <td class="md">) </td>
78 <td class="md" colspan="2"></td>
85 <table cellspacing=5 cellpadding=0 border=0>
97 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>.
99 <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) { };
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">
108 <table cellpadding="0" cellspacing="0" border="0">
110 <td class="md" nowrap valign="top"> char * Request::GetData </td>
111 <td class="md" valign="top">( </td>
112 <td class="mdname1" valign="top" nowrap> </td>
113 <td class="md" valign="top"> ) </td>
114 <td class="md" nowrap></td>
121 <table cellspacing=5 cellpadding=0 border=0>
129 Fetch the Request data.
133 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>.
135 References <a class="el" href="modules_8h-source.html#l00159">data</a>.
137 <div class="fragment"><pre>00319 {
138 00320 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p0">data</a>;
143 <a name="a3" doxytag="Request::GetDest"></a><p>
144 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
147 <table cellpadding="0" cellspacing="0" border="0">
149 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetDest </td>
150 <td class="md" valign="top">( </td>
151 <td class="mdname1" valign="top" nowrap> </td>
152 <td class="md" valign="top"> ) </td>
153 <td class="md" nowrap></td>
160 <table cellspacing=5 cellpadding=0 border=0>
168 Fetch the request destination (should be 'this' in the receiving module).
172 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>.
174 References <a class="el" href="modules_8h-source.html#l00166">dest</a>.
176 <div class="fragment"><pre>00329 {
177 00330 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p2">dest</a>;
182 <a name="a2" doxytag="Request::GetSource"></a><p>
183 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
186 <table cellpadding="0" cellspacing="0" border="0">
188 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Request::GetSource </td>
189 <td class="md" valign="top">( </td>
190 <td class="mdname1" valign="top" nowrap> </td>
191 <td class="md" valign="top"> ) </td>
192 <td class="md" nowrap></td>
199 <table cellspacing=5 cellpadding=0 border=0>
207 Fetch the request source.
211 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>.
213 References <a class="el" href="modules_8h-source.html#l00163">source</a>.
215 <div class="fragment"><pre>00324 {
216 00325 <span class="keywordflow">return</span> this-><a class="code" href="classRequest.html#p1">source</a>;
221 <a name="a4" doxytag="Request::Send"></a><p>
222 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
225 <table cellpadding="0" cellspacing="0" border="0">
227 <td class="md" nowrap valign="top"> char * Request::Send </td>
228 <td class="md" valign="top">( </td>
229 <td class="mdname1" valign="top" nowrap> </td>
230 <td class="md" valign="top"> ) </td>
231 <td class="md" nowrap><code> [virtual]</code></td>
238 <table cellspacing=5 cellpadding=0 border=0>
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.
250 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
252 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>.
254 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>.
256 <div class="fragment"><pre>00334 {
257 00335 <span class="keywordflow">if</span> (this-><a class="code" href="classRequest.html#p2">dest</a>)
259 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>);
261 00339 <span class="keywordflow">else</span>
263 00341 <span class="keywordflow">return</span> NULL;
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">
274 <table cellpadding="0" cellspacing="0" border="0">
276 <td class="md" nowrap valign="top"> char* <a class="el" href="classRequest.html#p0">Request::data</a><code> [protected]</code>
281 <table cellspacing=5 cellpadding=0 border=0>
289 This member holds a pointer to arbitary data set by the emitter of the message.
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>.
295 Referenced by <a class="el" href="modules_8cpp-source.html#l00318">GetData()</a>. </td>
298 <a name="p2" doxytag="Request::dest"></a><p>
299 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
302 <table cellpadding="0" cellspacing="0" border="0">
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>
309 <table cellspacing=5 cellpadding=0 border=0>
317 The single destination of the Request.
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>.
323 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>
326 <a name="p1" doxytag="Request::source"></a><p>
327 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
330 <table cellpadding="0" cellspacing="0" border="0">
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>
337 <table cellspacing=5 cellpadding=0 border=0>
345 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
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>.
351 Referenced by <a class="el" href="modules_8cpp-source.html#l00323">GetSource()</a>. </td>
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 22:59:04 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>