Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes | List of all members
CAAccountingBIInterface Class Reference

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...
 
CAXMLErrorMessagesettle (CAXMLCostConfirmation &cc)
 Send a cost confirmation to the JPI. More...
 
CAXMLErrorMessage ** settleAll (CAXMLCostConfirmation **CCs, UINT32 nrOfCCs, CAXMLErrorMessage **settleException)
 

Private Attributes

CATLSClientSocketm_pSocket
 
CAHttpClientm_phttpClient
 
CASocketAddrINetm_pPiServerAddress
 
CACertificatem_pPiServerCertificate
 

Detailed Description

This class encapsulates the connection to the JPI.

Author
Bastian Voigt

Constructor & Destructor Documentation

◆ CAAccountingBIInterface()

CAAccountingBIInterface::CAAccountingBIInterface ( )

private constructor just initializes fields, server configuration is done separately

References m_phttpClient, m_pPiServerAddress, and m_pSocket.

◆ ~CAAccountingBIInterface()

CAAccountingBIInterface::~CAAccountingBIInterface ( )

private destructor

References m_phttpClient, m_pPiServerAddress, m_pSocket, and terminateBIConnection().

Member Function Documentation

◆ initBIConnection()

SINT32 CAAccountingBIInterface::initBIConnection ( )

◆ setPIServerConfiguration()

SINT32 CAAccountingBIInterface::setPIServerConfiguration ( CAXMLBI *  pPiServerConfig)

◆ settle()

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().

◆ settleAll()

CAXMLErrorMessage ** CAAccountingBIInterface::settleAll ( CAXMLCostConfirmation **  CCs,
UINT32  nrOfCCs,
CAXMLErrorMessage **  settleException 
)

◆ terminateBIConnection()

SINT32 CAAccountingBIInterface::terminateBIConnection ( )

Member Data Documentation

◆ m_phttpClient

CAHttpClient* CAAccountingBIInterface::m_phttpClient
private

◆ m_pPiServerAddress

CASocketAddrINet* CAAccountingBIInterface::m_pPiServerAddress
private

◆ m_pPiServerCertificate

CACertificate* CAAccountingBIInterface::m_pPiServerCertificate
private

◆ m_pSocket

CATLSClientSocket* CAAccountingBIInterface::m_pSocket
private