InspIRCd  2.0
Public Member Functions | Public Attributes | List of all members
Request Class Reference

#include <modules.h>

Inheritance diagram for Request:

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::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

◆ Send()

void Request::Send ( )

Send the Request.

Member Data Documentation

◆ dest

ModuleRef Request::dest

The single destination of the Request

◆ id

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.

◆ source

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: