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

Detailed Description

Definition at line 227 of file account.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file account.cpp.

References Requests.

IdentifyRequest::~IdentifyRequest ( )

Definition at line 27 of file account.cpp.

References Requests.

Member Function Documentation

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().

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

Definition at line 251 of file account.h.

Referenced by NSRecoverRequest::OnFail(), and IdentifyInterface::OnResult().

void IdentifyRequest::Hold ( Module m)

Definition at line 32 of file account.cpp.

References holds.

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

void IdentifyRequest::ModuleUnload ( Module m)

Definition at line 69 of file account.cpp.

References owner, Release(), and Requests.

Referenced by Module::~Module().

virtual void IdentifyRequest::OnFail ( )
pure virtual
virtual void IdentifyRequest::OnSuccess ( )
pure virtual
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().

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

Anope::string IdentifyRequest::account

Definition at line 232 of file account.h.

bool IdentifyRequest::dispatched

Definition at line 236 of file account.h.

Referenced by Dispatch(), and Release().

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

Definition at line 235 of file account.h.

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

Module* IdentifyRequest::owner

Definition at line 231 of file account.h.

Referenced by ModuleUnload().

Anope::string IdentifyRequest::password

Definition at line 233 of file account.h.

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

Definition at line 239 of file account.h.

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

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: