diff options
Diffstat (limited to 'docs/man')
-rw-r--r-- | docs/man/man3/Event.3 | 140 | ||||
-rw-r--r-- | docs/man/man3/ModuleMessage.3 | 36 | ||||
-rw-r--r-- | docs/man/man3/Request.3 | 146 |
3 files changed, 322 insertions, 0 deletions
diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3 new file mode 100644 index 000000000..7cb7e8109 --- /dev/null +++ b/docs/man/man3/Event.3 @@ -0,0 +1,140 @@ +.TH "Event" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Event \- The Event class is a unicast message directed at all modules. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBModuleMessage\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBEvent\fP (char *anydata, \fBModule\fP *src, std::string eventid)" +.br +.RI "\fICreate a new Event. \fP" +.ti -1c +.RI "char * \fBGetData\fP ()" +.br +.RI "\fIGet the Event data. \fP" +.ti -1c +.RI "\fBModule\fP * \fBGetSource\fP ()" +.br +.RI "\fIGet the event Source. \fP" +.ti -1c +.RI "std::string \fBGetEventID\fP ()" +.br +.RI "\fIGet the event ID. \fP" +.ti -1c +.RI "char * \fBSend\fP ()" +.br +.RI "\fISend the Event. \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 "std::string \fBid\fP" +.br +.RI "\fIThe event identifier. \fP" +.in -1c +.SH "Detailed Description" +.PP +The Event class is a unicast message directed at all modules. + +When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter. +.PP +Definition at line 191 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "Event::Event (char * anydata, \fBModule\fP * src, std::string eventid)" +.PP +Create a new Event. Definition at line 337 of file modules.cpp. +.PP +.nf +337 : data(anydata), source(src), id(eventid) { }; +.fi +.SH "Member Function Documentation" +.PP +.SS "char * Event::GetData ()" +.PP +Get the Event data. Definition at line 339 of file modules.cpp. +.PP +References data. +.PP +.nf +340 { +341 return this->data; +342 } +.fi +.SS "std::string Event::GetEventID ()" +.PP +Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 355 of file modules.cpp. +.PP +References id. +.PP +.nf +356 { +357 return this->id; +358 } +.fi +.SS "\fBModule\fP * Event::GetSource ()" +.PP +Get the event Source. Definition at line 344 of file modules.cpp. +.PP +References source. +.PP +.nf +345 { +346 return this->source; +347 } +.fi +.SS "char * Event::Send ()\fC [virtual]\fP" +.PP +Send the Event. The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected. Implements \fBModuleMessage\fP. +.PP +Definition at line 349 of file modules.cpp. +.PP +References FOREACH_MOD. +.PP +.nf +350 { +351 FOREACH_MOD OnEvent(this); +352 return NULL; +353 } +.fi +.SH "Member Data Documentation" +.PP +.SS "char* \fBEvent::data\fP\fC [protected]\fP" +.PP +This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 196 of file modules.h. +.PP +Referenced by GetData(). +.SS "std::string \fBEvent::id\fP\fC [protected]\fP" +.PP +The event identifier. This is arbitary text which should be used to distinguish one type of event from another. Definition at line 205 of file modules.h. +.PP +Referenced by GetEventID(). +.SS "\fBModule\fP* \fBEvent::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. Definition at line 200 of file modules.h. +.PP +Referenced by GetSource(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3 new file mode 100644 index 000000000..faec8396b --- /dev/null +++ b/docs/man/man3/ModuleMessage.3 @@ -0,0 +1,36 @@ +.TH "ModuleMessage" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ModuleMessage \- The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +Inherited by \fBEvent\fP, and \fBRequest\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "virtual char * \fBSend\fP ()=0" +.br +.RI "\fIThis class is pure virtual and must be inherited. \fP" +.in -1c +.SH "Detailed Description" +.PP +The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. Definition at line 138 of file modules.h. +.SH "Member Function Documentation" +.PP +.SS "virtual char* ModuleMessage::Send ()\fC [pure virtual]\fP" +.PP +This class is pure virtual and must be inherited. Implemented in \fBRequest\fP, and \fBEvent\fP. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3 new file mode 100644 index 000000000..523b76247 --- /dev/null +++ b/docs/man/man3/Request.3 @@ -0,0 +1,146 @@ +.TH "Request" 3 "20 Apr 2005" "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 <modules.h>\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 151 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. Definition at line 308 of file modules.cpp. +.PP +.nf +308 : data(anydata), source(src), dest(dst) { }; +.fi +.SH "Member Function Documentation" +.PP +.SS "char * Request::GetData ()" +.PP +Fetch the Request data. Definition at line 310 of file modules.cpp. +.PP +References data. +.PP +.nf +311 { +312 return this->data; +313 } +.fi +.SS "\fBModule\fP * Request::GetDest ()" +.PP +Fetch the request destination (should be 'this' in the receiving module). Definition at line 320 of file modules.cpp. +.PP +References dest. +.PP +.nf +321 { +322 return this->dest; +323 } +.fi +.SS "\fBModule\fP * Request::GetSource ()" +.PP +Fetch the request source. Definition at line 315 of file modules.cpp. +.PP +References source. +.PP +.nf +316 { +317 return this->source; +318 } +.fi +.SS "char * Request::Send ()\fC [virtual]\fP" +.PP +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. +.PP +Definition at line 325 of file modules.cpp. +.PP +References dest, and Module::OnRequest(). +.PP +.nf +326 { +327 if (this->dest) +328 { +329 return dest->OnRequest(this); +330 } +331 else +332 { +333 return NULL; +334 } +335 } +.fi +.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. Definition at line 156 of file modules.h. +.PP +Referenced by GetData(). +.SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP" +.PP +The single destination of the Request. Definition at line 163 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. Definition at line 160 of file modules.h. +.PP +Referenced by GetSource(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. |