Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
CAXMLCostConfirmation Class Reference

this class corresponds to anon.pay.xml.XMLEasyCC in the Java implementation More...

List of all members.

Public Member Functions

 ~CAXMLCostConfirmation ()
UINT32 getNumberOfHashes ()
SINT32 getPosition (UINT32 a_hashNumber)
UINT8getPriceCertHash (UINT32 a_hashNumber)
UINT8getMixId (UINT32 a_hashNumber)
UINT8dumpToMem (UINT32 *pLen)
 dumps the XML CC to memory without trailing '0'.
SINT32 toXMLString (UINT8 *buff, UINT32 *bufflen)
 dumps the XML CC to a string (with trailing '0').
UINT64 getTransferredBytes ()
UINT64 getAccountNumber ()
UINT32 getID ()
UINT8getPIID ()
XERCES_CPP_NAMESPACE::DOMDocument * getXMLDocument ()

Static Public Member Functions

static CAXMLCostConfirmationgetInstance (UINT8 *strXmlData, UINT32 strXMlDataLen)
 Tries to create an CAXMLCostConfirmation object from the given XML string.
static CAXMLCostConfirmationgetInstance (DOMElement *elemRoot)
 Tries to create an CAXMLCostConfirmation object from the given XML string.
static const char *const getXMLElementName ()

Private Member Functions

SINT32 setValues ()
 CAXMLCostConfirmation ()
SINT32 checkLen (UINT32 a_hashNumber)

Private Attributes

UINT64 m_lTransferredBytes
UINT64 m_lAccountNumber
UINT32 m_id
CAPriceInfo ** m_priceCerts
UINT32 m_priceCertsLen
UINT8m_pStrPIID
XERCES_CPP_NAMESPACE::DOMDocument * m_domDocument

Static Private Attributes

static const char *const ms_pStrElemName = "CC"

Detailed Description

this class corresponds to anon.pay.xml.XMLEasyCC in the Java implementation

Author:
Bastian Voigt

Constructor & Destructor Documentation

References m_domDocument, m_priceCerts, and m_pStrPIID.

Referenced by getInstance().


Member Function Documentation

SINT32 CAXMLCostConfirmation::checkLen ( UINT32  a_hashNumber) [private]

dumps the XML CC to memory without trailing '0'.

References m_domDocument.

Referenced by CAAccountingBIInterface::settle().

References m_id.

CAXMLCostConfirmation * CAXMLCostConfirmation::getInstance ( UINT8 strXmlData,
UINT32  strXMlDataLen 
) [static]

Tries to create an CAXMLCostConfirmation object from the given XML string.

Return values:
NULLif the XML data was wrong
Returns:
a newly allocated CAXMLCostconfirmationObject

References CAXMLCostConfirmation(), E_SUCCESS, m_domDocument, parseDOMDocument(), and setValues().

Referenced by CAAccountingDBInterface::__getCostConfirmation(), CAAccountingDBInterface::__getUnsettledCostConfirmations(), CAAccountingInstance::handleCostConfirmation_internal(), and CAXMLErrorMessage::setValues().

CAXMLCostConfirmation * CAXMLCostConfirmation::getInstance ( DOMElement *  elemRoot) [static]

Tries to create an CAXMLCostConfirmation object from the given XML string.

Return values:
NULLif the XML data was wrong
Returns:
a newly allocated CAXMLCostconfirmationObject

References CAXMLCostConfirmation(), createDOMDocument(), E_SUCCESS, m_domDocument, and setValues().

Returns:
a newly allocated buffer which must be deleted by the caller

References m_pStrPIID.

XERCES_CPP_NAMESPACE::DOMDocument* CAXMLCostConfirmation::getXMLDocument ( )
static const char* const CAXMLCostConfirmation::getXMLElementName ( ) [static]

References ms_pStrElemName.

we do not use the price cert hashes for anything in the AI except storing them as part of the xml string in the db

if you need them, make sure the destructor deletes them (and initialize certArray with new(), otherwise it, and m_priceCerts with it, will be gone by the end of this method!!!)

References E_SUCCESS, E_UNKNOWN, equals(), getDOMChildByName(), getDOMElementAttribute(), getDOMElementValue(), getElementsByTagName(), len, m_domDocument, m_lAccountNumber, m_lTransferredBytes, m_priceCerts, m_priceCertsLen, m_pStrPIID, and ms_pStrElemName.

Referenced by getInstance().

dumps the XML CC to a string (with trailing '0').

References DOM_Output::dumpToMem(), E_SUCCESS, E_UNKNOWN, and m_domDocument.

Referenced by CAAccountingDBInterface::__storeCostConfirmation().


Member Data Documentation

XERCES_CPP_NAMESPACE::DOMDocument* CAXMLCostConfirmation::m_domDocument [private]

Referenced by getID().

Referenced by getAccountNumber(), and setValues().

Referenced by getTransferredBytes(), and setValues().

const char *const CAXMLCostConfirmation::ms_pStrElemName = "CC" [static, private]

Referenced by getXMLElementName(), and setValues().