Anope IRC Services  Version 2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
IdentifyRequest Class Referenceabstract

#include <account.h>

Inheritance diagram for IdentifyRequest:
Inheritance graph
Collaboration diagram for IdentifyRequest:
Collaboration graph

Public Member Functions

virtual void OnSuccess ()=0
virtual void OnFail ()=0
const Anope::stringGetAccount () const
const Anope::stringGetPassword () const
void Hold (Module *m)
void Release (Module *m)
void Success (Module *m)
void Dispatch ()

Static Public Member Functions

static void ModuleUnload (Module *m)

Protected Member Functions

 IdentifyRequest (Module *o, const Anope::string &acc, const Anope::string &pass)
virtual ~IdentifyRequest ()

Private Attributes

Anope::string account
Anope::string password
std::set< Module * > holds
bool dispatched
bool success

Static Private Attributes

static std::set< IdentifyRequest * > Requests

Detailed Description

Definition at line 227 of file account.h.

Constructor & Destructor Documentation

◆ IdentifyRequest()

IdentifyRequest::IdentifyRequest ( Module o,
const Anope::string acc,
const Anope::string pass 

Definition at line 22 of file account.cpp.

References Requests.

◆ ~IdentifyRequest()

IdentifyRequest::~IdentifyRequest ( )

Definition at line 27 of file account.cpp.

References Requests.

Member Function Documentation

◆ Dispatch()

void IdentifyRequest::Dispatch ( )

Used to either finalize this request or marks it as dispatched and begins waiting for the module(s) that have holds to finish.

Definition at line 57 of file account.cpp.

References dispatched, holds, OnFail(), and success.

Referenced by MyXMLRPCEvent::DoCheckAuthentication(), CommandNSIdentify::Execute(), CommandNSGroup::Execute(), CommandNSRecover::Execute(), WebCPanel::Index::OnRequest(), Plain::ProcessMessage(), DHAES::ProcessMessage(), and DHBS::ProcessMessage().

◆ GetAccount()

const Anope::string& IdentifyRequest::GetAccount ( ) const

◆ GetPassword()

const Anope::string& IdentifyRequest::GetPassword ( ) const

◆ Hold()

void IdentifyRequest::Hold ( Module m)

Definition at line 32 of file account.cpp.

References holds.

Referenced by IdentifyInfo::IdentifyInfo(), and SQLAuthenticationResult::SQLAuthenticationResult().

◆ ModuleUnload()

void IdentifyRequest::ModuleUnload ( Module m)

Definition at line 69 of file account.cpp.

References owner, Release(), and Requests.

Referenced by Module::~Module().

◆ OnFail()

virtual void IdentifyRequest::OnFail ( )
pure virtual

◆ OnSuccess()

virtual void IdentifyRequest::OnSuccess ( )
pure virtual

◆ Release()

void IdentifyRequest::Release ( Module m)

Releases a held request

mThe module releaseing the hold

Definition at line 37 of file account.cpp.

References dispatched, holds, OnFail(), and success.

Referenced by ModuleUnload(), IdentifyInfo::~IdentifyInfo(), and SQLAuthenticationResult::~SQLAuthenticationResult().

◆ Success()

void IdentifyRequest::Success ( Module m)

Called by modules when this IdentifyRequest has successeded successfully. If this request is behind held it must still be Released after calling this.

mThe module confirming authentication

Definition at line 48 of file account.cpp.

References OnSuccess(), and success.

Referenced by SQLAuthenticationResult::OnResult(), and IdentifyInterface::OnResult().

Field Documentation

◆ account

Anope::string IdentifyRequest::account

Definition at line 232 of file account.h.

◆ dispatched

bool IdentifyRequest::dispatched

Definition at line 236 of file account.h.

Referenced by Dispatch(), and Release().

◆ holds

std::set<Module *> IdentifyRequest::holds

Definition at line 235 of file account.h.

Referenced by Dispatch(), Hold(), and Release().

◆ owner

Module* IdentifyRequest::owner

◆ password

Anope::string IdentifyRequest::password

Definition at line 233 of file account.h.

Referenced by MyXMLRPCEvent::DoCheckAuthentication().

◆ Requests

std::set< IdentifyRequest * > IdentifyRequest::Requests

Definition at line 239 of file account.h.

Referenced by IdentifyRequest(), ModuleUnload(), and ~IdentifyRequest().

◆ success

bool IdentifyRequest::success

Definition at line 237 of file account.h.

Referenced by Dispatch(), Release(), and Success().

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