Mixe for Privacy and Anonymity in the Internet
|
A thread that settles CCs with the BI. More...
#include <CAAccountingSettleThread.hpp>
Public Member Functions | |
CAAccountingSettleThread (Hashtable *a_accountingHashtable, UINT8 *currentCascade) | |
~CAAccountingSettleThread () | |
void | settle () |
Static Private Member Functions | |
static THREAD_RETURN | mainLoop (void *param) |
The main loop. More... | |
Private Attributes | |
CAConditionVariable * | m_pCondition |
CAConditionVariable * | m_pForcedSettlementCondition |
UINT8 * | m_settleCascade |
CAThread * | m_pThread |
volatile bool | m_bRun |
Hashtable * | m_accountingHashtable |
bool | m_bSleep |
A thread that settles CCs with the BI.
Definition at line 62 of file CAAccountingSettleThread.hpp.
CAAccountingSettleThread::CAAccountingSettleThread | ( | Hashtable * | a_accountingHashtable, |
UINT8 * | currentCascade | ||
) |
Definition at line 41 of file CAAccountingSettleThread.cpp.
References m_accountingHashtable, m_bRun, m_pCondition, m_pThread, m_settleCascade, mainLoop(), CAMsg::printMsg(), CAThread::setMainLoop(), and CAThread::start().
CAAccountingSettleThread::~CAAccountingSettleThread | ( | ) |
Definition at line 60 of file CAAccountingSettleThread.cpp.
References CAThread::join(), m_bRun, m_pCondition, m_pThread, and settle().
|
staticprivate |
The main loop.
Sleeps for a few minutes, then contacts the BI to settle CCs, then sleeps again
Definition at line 90 of file CAAccountingSettleThread.cpp.
References BEGIN_STACK, E_SUCCESS, FINISH_STACK, CALibProxytest::getOptions(), CACmdLnOptions::getPaymentSettleInterval(), INIT_STACK, CAMutex::lock(), m_bRun, m_pCondition, CAAccountingInstance::newSettlementTransaction(), CAMsg::printMsg(), THREAD_RETURN_SUCCESS, CAMutex::unlock(), and CAConditionVariable::wait().
Referenced by CAAccountingSettleThread().
void CAAccountingSettleThread::settle | ( | ) |
Definition at line 78 of file CAAccountingSettleThread.cpp.
References CAMutex::lock(), m_pCondition, CAConditionVariable::signal(), and CAMutex::unlock().
Referenced by CAAccountingInstance::handleCostConfirmation_internal(), and ~CAAccountingSettleThread().
|
private |
Definition at line 78 of file CAAccountingSettleThread.hpp.
Referenced by CAAccountingSettleThread().
|
private |
Definition at line 77 of file CAAccountingSettleThread.hpp.
Referenced by CAAccountingSettleThread(), mainLoop(), and ~CAAccountingSettleThread().
|
private |
Definition at line 79 of file CAAccountingSettleThread.hpp.
|
private |
Definition at line 72 of file CAAccountingSettleThread.hpp.
Referenced by CAAccountingSettleThread(), mainLoop(), settle(), and ~CAAccountingSettleThread().
|
private |
Definition at line 73 of file CAAccountingSettleThread.hpp.
|
private |
Definition at line 76 of file CAAccountingSettleThread.hpp.
Referenced by CAAccountingSettleThread(), and ~CAAccountingSettleThread().
|
private |
Definition at line 74 of file CAAccountingSettleThread.hpp.
Referenced by CAAccountingSettleThread().