|
Mixes for Privacy and Anonymity in the Internet
|
A thread that settles CCs with the BI. More...
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. | |
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.
| CAAccountingSettleThread::CAAccountingSettleThread | ( | Hashtable * | a_accountingHashtable, |
| UINT8 * | currentCascade | ||
| ) |
References CAThread::join(), m_bRun, m_pCondition, m_pThread, and settle().
| THREAD_RETURN CAAccountingSettleThread::mainLoop | ( | void * | pParam | ) | [static, private] |
The main loop.
Sleeps for a few minutes, then contacts the BI to settle CCs, then sleeps again
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 | ( | ) |
References CAMutex::lock(), m_pCondition, CAConditionVariable::signal(), and CAMutex::unlock().
Referenced by CAAccountingInstance::handleCostConfirmation_internal(), and ~CAAccountingSettleThread().
Referenced by CAAccountingSettleThread().
volatile bool CAAccountingSettleThread::m_bRun [private] |
Referenced by CAAccountingSettleThread(), mainLoop(), and ~CAAccountingSettleThread().
bool CAAccountingSettleThread::m_bSleep [private] |
Referenced by CAAccountingSettleThread(), mainLoop(), settle(), and ~CAAccountingSettleThread().
CAThread* CAAccountingSettleThread::m_pThread [private] |
Referenced by CAAccountingSettleThread(), and ~CAAccountingSettleThread().
UINT8* CAAccountingSettleThread::m_settleCascade [private] |
Referenced by CAAccountingSettleThread().
1.7.6.1