1 .TH "Request" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
5 Request \- The Request class is a unicast message directed at a given module.
11 \fC#include <modules.h>\fP
13 Inherits \fBModuleMessage\fP.
15 .SS "Public Member Functions"
19 .RI "\fBRequest\fP (char *anydata, \fBModule\fP *src, \fBModule\fP *dst)"
21 .RI "\fICreate a new Request. \fP"
23 .RI "char * \fBGetData\fP ()"
25 .RI "\fIFetch the Request data. \fP"
27 .RI "\fBModule\fP * \fBGetSource\fP ()"
29 .RI "\fIFetch the request source. \fP"
31 .RI "\fBModule\fP * \fBGetDest\fP ()"
33 .RI "\fIFetch the request destination (should be 'this' in the receiving module). \fP"
35 .RI "char * \fBSend\fP ()"
37 .RI "\fISend the Request. \fP"
39 .SS "Protected Attributes"
43 .RI "char * \fBdata\fP"
45 .RI "\fIThis member holds a pointer to arbitary data set by the emitter of the message. \fP"
47 .RI "\fBModule\fP * \fBsource\fP"
49 .RI "\fIThis is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. \fP"
51 .RI "\fBModule\fP * \fBdest\fP"
53 .RI "\fIThe single destination of the Request. \fP"
55 .SH "Detailed Description"
57 The Request class is a unicast message directed at a given module.
59 When this class is properly instantiated it may be sent to a module using the \fBSend()\fP method, which will call the given module's OnRequest method with this class as its parameter.
61 Definition at line 157 of file modules.h.
62 .SH "Constructor & Destructor Documentation"
64 .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
68 Definition at line 165 of file modules.cpp.
71 165 : data(anydata), source(src), dest(dst) { };
74 .SH "Member Function Documentation"
76 .SS "char * Request::GetData ()"
78 Fetch the Request data.
80 Definition at line 167 of file modules.cpp.
86 169 return this->data;
90 .SS "\fBModule\fP * Request::GetDest ()"
92 Fetch the request destination (should be 'this' in the receiving module).
94 Definition at line 177 of file modules.cpp.
100 179 return this->dest;
104 .SS "\fBModule\fP * Request::GetSource ()"
106 Fetch the request source.
108 Definition at line 172 of file modules.cpp.
114 174 return this->source;
118 .SS "char * Request::Send ()\fC [virtual]\fP"
122 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.
124 Implements \fBModuleMessage\fP.
126 Definition at line 182 of file modules.cpp.
128 References dest, and Module::OnRequest().
134 186 return dest->OnRequest(this);
143 .SH "Member Data Documentation"
145 .SS "char* \fBRequest::data\fP\fC [protected]\fP"
147 This member holds a pointer to arbitary data set by the emitter of the message.
149 Definition at line 162 of file modules.h.
151 Referenced by GetData().
152 .SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP"
154 The single destination of the Request.
156 Definition at line 169 of file modules.h.
158 Referenced by GetDest(), and Send().
159 .SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP"
161 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
163 Definition at line 166 of file modules.h.
165 Referenced by GetSource().
169 Generated automatically by Doxygen for InspIRCd from the source code.