Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CAlert Class Reference

An alert is a combination of a serialized CUnsignedAlert and a signature. More...

#include <alert.h>

+ Inheritance diagram for CAlert:
+ Collaboration diagram for CAlert:

Public Member Functions

 CAlert ()
 
 IMPLEMENT_SERIALIZE (READWRITE(vchMsg);READWRITE(vchSig);) void SetNull()
 
bool IsNull () const
 
uint256 GetHash () const
 
bool IsInEffect () const
 
bool Cancels (const CAlert &alert) const
 
bool AppliesTo (int nVersion, std::string strSubVerIn) const
 
bool AppliesToMe () const
 
bool RelayTo (CNode *pnode) const
 
bool CheckSignature () const
 
bool ProcessAlert (bool fThread=true)
 
- Public Member Functions inherited from CUnsignedAlert
 IMPLEMENT_SERIALIZE (READWRITE(this->nVersion);nVersion=this->nVersion;READWRITE(nRelayUntil);READWRITE(nExpiration);READWRITE(nID);READWRITE(nCancel);READWRITE(setCancel);READWRITE(nMinVer);READWRITE(nMaxVer);READWRITE(setSubVer);READWRITE(nPriority);READWRITE(LIMITED_STRING(strComment, 65536));READWRITE(LIMITED_STRING(strStatusBar, 256));READWRITE(LIMITED_STRING(strReserved, 256));) void SetNull()
 
std::string ToString () const
 
void print () const
 

Static Public Member Functions

static CAlert getAlertByHash (const uint256 &hash)
 

Public Attributes

std::vector< unsigned char > vchMsg
 
std::vector< unsigned char > vchSig
 
- Public Attributes inherited from CUnsignedAlert
int nVersion
 
int64_t nRelayUntil
 
int64_t nExpiration
 
int nID
 
int nCancel
 
std::set< intsetCancel
 
int nMinVer
 
int nMaxVer
 
std::set< std::string > setSubVer
 
int nPriority
 
std::string strComment
 
std::string strStatusBar
 
std::string strReserved
 

Detailed Description

An alert is a combination of a serialized CUnsignedAlert and a signature.

Definition at line 75 of file alert.h.

Constructor & Destructor Documentation

CAlert::CAlert ( )
inline

Definition at line 81 of file alert.h.

Member Function Documentation

bool CAlert::AppliesTo ( int  nVersion,
std::string  strSubVerIn 
) const

Definition at line 115 of file alert.cpp.

bool CAlert::AppliesToMe ( ) const

Definition at line 123 of file alert.cpp.

References CLIENT_NAME, CLIENT_VERSION, FormatSubVersion(), and PROTOCOL_VERSION.

Referenced by GetWarnings().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CAlert::Cancels ( const CAlert alert) const

Definition at line 108 of file alert.cpp.

References CUnsignedAlert::nID.

Referenced by ProcessAlert().

+ Here is the caller graph for this function:

bool CAlert::CheckSignature ( ) const

Definition at line 146 of file alert.cpp.

References error(), Hash(), Params(), PROTOCOL_VERSION, SER_NETWORK, and CPubKey::Verify().

+ Here is the call graph for this function:

CAlert CAlert::getAlertByHash ( const uint256 hash)
static

Definition at line 158 of file alert.cpp.

References LOCK.

Referenced by ClientModel::updateAlert().

+ Here is the caller graph for this function:

uint256 CAlert::GetHash ( ) const

Definition at line 98 of file alert.cpp.

References Hash().

+ Here is the call graph for this function:

CAlert::IMPLEMENT_SERIALIZE ( READWRITE(vchMsg);READWRITE(vchSig);  )
bool CAlert::IsInEffect ( ) const

Definition at line 103 of file alert.cpp.

References GetAdjustedTime().

Referenced by ProcessAlert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CAlert::IsNull ( ) const

Definition at line 93 of file alert.cpp.

Referenced by ClientModel::updateAlert().

+ Here is the caller graph for this function:

bool CAlert::ProcessAlert ( bool  fThread = true)

Definition at line 170 of file alert.cpp.

References Cancels(), CT_DELETED, CT_NEW, GetArg(), IsInEffect(), LOCK, LogPrint(), CUnsignedAlert::nID, CClientUIInterface::NotifyAlertChanged, PAIRTYPE, runCommand(), SanitizeString(), and uiInterface.

+ Here is the call graph for this function:

bool CAlert::RelayTo ( CNode pnode) const

Definition at line 128 of file alert.cpp.

References GetAdjustedTime(), CNode::nVersion, CNode::PushMessage(), CNode::setKnown, and CNode::strSubVer.

Referenced by ProcessMessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<unsigned char> CAlert::vchMsg

Definition at line 78 of file alert.h.

std::vector<unsigned char> CAlert::vchSig

Definition at line 79 of file alert.h.


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