Mixes for Privacy and Anonymity in the Internet
|
This class encapsulates the connection to the JPI. More...
Public Member Functions | |
CAAccountingBIInterface () | |
private constructor just initializes fields, server configuration is done separately More... | |
~CAAccountingBIInterface () | |
private destructor More... | |
SINT32 | setPIServerConfiguration (CAXMLBI *pPiServerConfig) |
SINT32 | initBIConnection () |
Establishes HTTP(s) connection to the BI (JPI) More... | |
SINT32 | terminateBIConnection () |
Terminate HTTP(s) connection to the BI (JPI) More... | |
CAXMLErrorMessage * | settle (CAXMLCostConfirmation &cc) |
Send a cost confirmation to the JPI. More... | |
CAXMLErrorMessage ** | settleAll (CAXMLCostConfirmation **CCs, UINT32 nrOfCCs, CAXMLErrorMessage **settleException) |
Private Attributes | |
CATLSClientSocket * | m_pSocket |
CAHttpClient * | m_phttpClient |
CASocketAddrINet * | m_pPiServerAddress |
CACertificate * | m_pPiServerCertificate |
This class encapsulates the connection to the JPI.
CAAccountingBIInterface::CAAccountingBIInterface | ( | ) |
private constructor just initializes fields, server configuration is done separately
References m_phttpClient, m_pPiServerAddress, and m_pSocket.
CAAccountingBIInterface::~CAAccountingBIInterface | ( | ) |
private destructor
References m_phttpClient, m_pPiServerAddress, m_pSocket, and terminateBIConnection().
SINT32 CAAccountingBIInterface::initBIConnection | ( | ) |
Establishes HTTP(s) connection to the BI (JPI)
References CATLSClientSocket::close(), CATLSClientSocket::connect(), E_SUCCESS, E_UNKNOWN, CASocketAddrINet::getHostName(), CASocketAddrINet::getPort(), m_phttpClient, m_pPiServerAddress, m_pPiServerCertificate, m_pSocket, PI_CONNECT_TIMEOUT, CAMsg::printMsg(), CATLSClientSocket::setServerCertificate(), and CAHttpClient::setSocket().
Referenced by CAAccountingInstance::__newSettlementTransaction(), and CAAccountingInstance::settlementTransaction().
SINT32 CAAccountingBIInterface::setPIServerConfiguration | ( | CAXMLBI * | pPiServerConfig | ) |
References E_SUCCESS, E_UNKNOWN, m_pPiServerAddress, m_pPiServerCertificate, CAMsg::printMsg(), and CASocketAddrINet::setAddr().
Referenced by CAAccountingInstance::CAAccountingInstance().
CAXMLErrorMessage * CAAccountingBIInterface::settle | ( | CAXMLCostConfirmation & | cc | ) |
Send a cost confirmation to the JPI.
Send a cost confirmation to the JPI TODO: Error handling.
References E_SUCCESS, E_TIMEDOUT, m_phttpClient, m_pSocket, CAHttpClient::parseHTTPHeader(), CAMsg::printMsg(), CASocket::receiveFullyT(), CAHttpClient::sendPostRequest(), and CASocket::setNonBlocking().
Referenced by CAAccountingInstance::settlementTransaction().
CAXMLErrorMessage ** CAAccountingBIInterface::settleAll | ( | CAXMLCostConfirmation ** | CCs, |
UINT32 | nrOfCCs, | ||
CAXMLErrorMessage ** | settleException | ||
) |
References createDOMDocument(), createDOMElement(), DOM_Output::dumpToMem(), E_SUCCESS, E_TIMEDOUT, E_UNKNOWN, CAXMLErrorMessage::ERR_INTERNAL_SERVER_ERROR, getDOMElementAttribute(), getElementsByTagName(), m_phttpClient, m_pSocket, parseDOMDocument(), CAHttpClient::parseHTTPHeader(), POST_CMD_SETTLEALL, CAMsg::printMsg(), CASocket::receiveFullyT(), CAHttpClient::sendPostRequest(), CASocket::setNonBlocking(), XML_ATTR_SETTLE_SUCCESSFUL, XML_ELEMENT_CCS, and XML_ELEMENT_ERROR_MSG.
Referenced by CAAccountingInstance::__newSettlementTransaction().
SINT32 CAAccountingBIInterface::terminateBIConnection | ( | ) |
Terminate HTTP(s) connection to the BI (JPI)
References CATLSClientSocket::close(), E_SUCCESS, E_UNKNOWN, m_pSocket, and CAMsg::printMsg().
Referenced by CAAccountingInstance::__newSettlementTransaction(), CAAccountingInstance::settlementTransaction(), and ~CAAccountingBIInterface().
|
private |
Referenced by CAAccountingBIInterface(), initBIConnection(), settle(), settleAll(), and ~CAAccountingBIInterface().
|
private |
Referenced by CAAccountingBIInterface(), initBIConnection(), setPIServerConfiguration(), and ~CAAccountingBIInterface().
|
private |
Referenced by initBIConnection(), and setPIServerConfiguration().
|
private |
Referenced by CAAccountingBIInterface(), initBIConnection(), settle(), settleAll(), terminateBIConnection(), and ~CAAccountingBIInterface().