Mixe for Privacy and Anonymity in the Internet
|
This class encapsulates the connection to the JPI. More...
#include <CAAccountingBIInterface.hpp>
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.
Definition at line 51 of file CAAccountingBIInterface.hpp.
CAAccountingBIInterface::CAAccountingBIInterface | ( | ) |
private constructor just initializes fields, server configuration is done separately
Definition at line 44 of file CAAccountingBIInterface.cpp.
References m_phttpClient, m_pPiServerAddress, and m_pSocket.
CAAccountingBIInterface::~CAAccountingBIInterface | ( | ) |
private destructor
Definition at line 56 of file CAAccountingBIInterface.cpp.
References m_phttpClient, m_pPiServerAddress, m_pSocket, and terminateBIConnection().
SINT32 CAAccountingBIInterface::initBIConnection | ( | ) |
Establishes HTTP(s) connection to the BI (JPI)
Definition at line 131 of file CAAccountingBIInterface.cpp.
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 | ) |
Definition at line 82 of file CAAccountingBIInterface.cpp.
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.
Definition at line 354 of file CAAccountingBIInterface.cpp.
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 | ||
) |
Definition at line 210 of file CAAccountingBIInterface.cpp.
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)
Definition at line 192 of file CAAccountingBIInterface.cpp.
References CATLSClientSocket::close(), E_SUCCESS, E_UNKNOWN, m_pSocket, and CAMsg::printMsg().
Referenced by CAAccountingInstance::__newSettlementTransaction(), CAAccountingInstance::settlementTransaction(), and ~CAAccountingBIInterface().
|
private |
Definition at line 90 of file CAAccountingBIInterface.hpp.
Referenced by CAAccountingBIInterface(), initBIConnection(), settle(), settleAll(), and ~CAAccountingBIInterface().
|
private |
Definition at line 91 of file CAAccountingBIInterface.hpp.
Referenced by CAAccountingBIInterface(), initBIConnection(), setPIServerConfiguration(), and ~CAAccountingBIInterface().
|
private |
Definition at line 92 of file CAAccountingBIInterface.hpp.
Referenced by initBIConnection(), and setPIServerConfiguration().
|
private |
Definition at line 89 of file CAAccountingBIInterface.hpp.
Referenced by CAAccountingBIInterface(), initBIConnection(), settle(), settleAll(), terminateBIConnection(), and ~CAAccountingBIInterface().