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

Public Member Functions

 TermsAndConditions (UINT8 *id, UINT32 nrOfTranslations)
 Constructor with the id (Operator SKI), the number of translations and those elements to be imported to all translations. More...
 
virtual ~TermsAndConditions ()
 
const termsAndConditionsTranslation_tgetTranslation (const UINT8 *locale)
 returns the specific TermsAndconditions translation for the the language with the specified language code including the template AND the customized sections. More...
 
const DOMNode * getTranslationTemplate (const UINT8 *locale)
 returns only the template of the translation specified by the language code or NULL if no such translation exist. More...
 
const DOMNode * getTranslationCustomizedSections (const UINT8 *locale)
 returns only the customized sections of the translation specified by the language code or NULL if no such translation exist. More...
 
void removeTranslation (const UINT8 *locale)
 removes the specific Terms & Conditions translation for the the language with the specified language code including the template AND the customized sections. More...
 
void addTranslation (const UINT8 *locale, DOMNode *tnc_customized, DOMNode *tnc_template)
 add a language specific terms and Conditions document, which can be retrieved by *getTermsAndConditionsDoc with the language code More...
 
const UINT8getID ()
 

Public Attributes

CAMutexsynchLock
 

Private Member Functions

void setIndexToNextEmptySlot ()
 

Private Attributes

UINT8tnc_id
 
UINT32 translations
 
UINT32 currentTranslationIndex
 
termsAndConditionsTranslation_t ** allTranslations
 
XERCES_CPP_NAMESPACE::DOMDocument * customizedSectionsOwner
 

Constructor & Destructor Documentation

◆ TermsAndConditions()

TermsAndConditions::TermsAndConditions ( UINT8 id,
UINT32  nrOfTranslations 
)

Constructor with the id (Operator SKI), the number of translations and those elements to be imported to all translations.

Constructor with the id (Operator SKI) and the number of translations.

References allTranslations, createDOMDocument(), currentTranslationIndex, customizedSectionsOwner, synchLock, tnc_id, and translations.

◆ ~TermsAndConditions()

TermsAndConditions::~TermsAndConditions ( )
virtual

Member Function Documentation

◆ addTranslation()

void TermsAndConditions::addTranslation ( const UINT8 locale,
DOMNode *  tnc_customized,
DOMNode *  tnc_template 
)

◆ getID()

const UINT8 * TermsAndConditions::getID ( )

References tnc_id.

◆ getTranslation()

const termsAndConditionsTranslation_t * TermsAndConditions::getTranslation ( const UINT8 locale)

returns the specific TermsAndconditions translation for the the language with the specified language code including the template AND the customized sections.

If no translation exists for the specified language code NULL is returned.

References allTranslations, and translations.

Referenced by addTranslation(), getTranslationCustomizedSections(), getTranslationTemplate(), and CAFirstMix::handleTermsAndConditionsLogin().

◆ getTranslationCustomizedSections()

const DOMNode * TermsAndConditions::getTranslationCustomizedSections ( const UINT8 locale)

returns only the customized sections of the translation specified by the language code or NULL if no such translation exist.

References getTranslation(), and termsAndConditionsTranslation_t::tnc_customized.

◆ getTranslationTemplate()

const DOMNode * TermsAndConditions::getTranslationTemplate ( const UINT8 locale)

returns only the template of the translation specified by the language code or NULL if no such translation exist.

References getTranslation(), and termsAndConditionsTranslation_t::tnc_template.

◆ removeTranslation()

void TermsAndConditions::removeTranslation ( const UINT8 locale)

removes the specific Terms & Conditions translation for the the language with the specified language code including the template AND the customized sections.

References allTranslations, cleanupTnCTranslation(), setIndexToNextEmptySlot(), and translations.

◆ setIndexToNextEmptySlot()

void TermsAndConditions::setIndexToNextEmptySlot ( )
private

Member Data Documentation

◆ allTranslations

termsAndConditionsTranslation_t** TermsAndConditions::allTranslations
private

◆ currentTranslationIndex

UINT32 TermsAndConditions::currentTranslationIndex
private

◆ customizedSectionsOwner

XERCES_CPP_NAMESPACE::DOMDocument* TermsAndConditions::customizedSectionsOwner
private

◆ synchLock

CAMutex* TermsAndConditions::synchLock

◆ tnc_id

UINT8* TermsAndConditions::tnc_id
private

◆ translations

UINT32 TermsAndConditions::translations
private