InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Public Attributes | List of all members
Request Class Reference

#include <modules.h>

Inheritance diagram for Request:
classbase

Public Member Functions

 Request (Module *src, Module *dst, const char *idstr)
 
void Send ()
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

const char *const id
 
ModuleRef source
 
ModuleRef dest
 

Detailed Description

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 Send() method, which will call the given module's OnRequest method with this class as its parameter.

Constructor & Destructor Documentation

Request::Request ( Module src,
Module dst,
const char *  idstr 
)

Create a new Request This is for the 'new' way of defining a subclass of Request and defining it in a common header, passing an object of your Request subclass through as a Request* and using the ID string to determine what to cast it back to and the other end.

Member Function Documentation

void Request::Send ( )

Send the Request.

Member Data Documentation

ModuleRef Request::dest

The single destination of the Request

const char* const Request::id

This should be a null-terminated string identifying the type of request, all modules should define this and use it to determine the nature of the request before they attempt to cast the Request in any way.

ModuleRef Request::source

This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.


The documentation for this class was generated from the following files: