.TH "Request" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME Request \- The Request class is a unicast message directed at a given module. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBModuleMessage\fP. .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBRequest\fP (char *anydata, \fBModule\fP *src, \fBModule\fP *dst)" .br .RI "\fICreate a new Request. \fP" .ti -1c .RI "char * \fBGetData\fP ()" .br .RI "\fIFetch the Request data. \fP" .ti -1c .RI "\fBModule\fP * \fBGetSource\fP ()" .br .RI "\fIFetch the request source. \fP" .ti -1c .RI "\fBModule\fP * \fBGetDest\fP ()" .br .RI "\fIFetch the request destination (should be 'this' in the receiving module). \fP" .ti -1c .RI "char * \fBSend\fP ()" .br .RI "\fISend the Request. \fP" .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "char * \fBdata\fP" .br .RI "\fIThis member holds a pointer to arbitary data set by the emitter of the message. \fP" .ti -1c .RI "\fBModule\fP * \fBsource\fP" .br .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" .ti -1c .RI "\fBModule\fP * \fBdest\fP" .br .RI "\fIThe single destination of the Request. \fP" .in -1c .SH "Detailed Description" .PP The Request class is a unicast message directed at a given module. 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. .PP Definition at line 157 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)" .PP Create a new Request. .PP Definition at line 173 of file modules.cpp. .PP .nf 173 : data(anydata), source(src), dest(dst) { }; .fi .PP .SH "Member Function Documentation" .PP .SS "char * Request::GetData ()" .PP Fetch the Request data. .PP Definition at line 175 of file modules.cpp. .PP References data. .PP .nf 176 { 177 return this->data; 178 } .fi .PP .SS "\fBModule\fP * Request::GetDest ()" .PP Fetch the request destination (should be 'this' in the receiving module). .PP Definition at line 185 of file modules.cpp. .PP References dest. .PP .nf 186 { 187 return this->dest; 188 } .fi .PP .SS "\fBModule\fP * Request::GetSource ()" .PP Fetch the request source. .PP Definition at line 180 of file modules.cpp. .PP References source. .PP .nf 181 { 182 return this->source; 183 } .fi .PP .SS "char * Request::Send ()\fC [virtual]\fP" .PP Send the Request. .PP 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. .PP Implements \fBModuleMessage\fP. .PP Definition at line 190 of file modules.cpp. .PP References dest, and Module::OnRequest(). .PP .nf 191 { 192 if (this->dest) 193 { 194 return dest->OnRequest(this); 195 } 196 else 197 { 198 return NULL; 199 } 200 } .fi .PP .SH "Member Data Documentation" .PP .SS "char* \fBRequest::data\fP\fC [protected]\fP" .PP This member holds a pointer to arbitary data set by the emitter of the message. .PP Definition at line 162 of file modules.h. .PP Referenced by GetData(). .SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP" .PP The single destination of the Request. .PP Definition at line 169 of file modules.h. .PP Referenced by GetDest(), and Send(). .SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP" .PP This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. .PP Definition at line 166 of file modules.h. .PP Referenced by GetSource(). .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code.