1 .TH "Request" 3 "20 Apr 2005" "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 151 of file modules.h.
62 .SH "Constructor & Destructor Documentation"
64 .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
66 Create a new Request. Definition at line 308 of file modules.cpp.
69 308 : data(anydata), source(src), dest(dst) { };
71 .SH "Member Function Documentation"
73 .SS "char * Request::GetData ()"
75 Fetch the Request data. Definition at line 310 of file modules.cpp.
81 312 return this->data;
84 .SS "\fBModule\fP * Request::GetDest ()"
86 Fetch the request destination (should be 'this' in the receiving module). Definition at line 320 of file modules.cpp.
92 322 return this->dest;
95 .SS "\fBModule\fP * Request::GetSource ()"
97 Fetch the request source. Definition at line 315 of file modules.cpp.
103 317 return this->source;
106 .SS "char * Request::Send ()\fC [virtual]\fP"
108 Send the Request. 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. Implements \fBModuleMessage\fP.
110 Definition at line 325 of file modules.cpp.
112 References dest, and Module::OnRequest().
118 329 return dest->OnRequest(this);
126 .SH "Member Data Documentation"
128 .SS "char* \fBRequest::data\fP\fC [protected]\fP"
130 This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 156 of file modules.h.
132 Referenced by GetData().
133 .SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP"
135 The single destination of the Request. Definition at line 163 of file modules.h.
137 Referenced by GetDest(), and Send().
138 .SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP"
140 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 160 of file modules.h.
142 Referenced by GetSource().
146 Generated automatically by Doxygen for InspIRCd from the source code.