Mixe for Privacy and Anonymity in the Internet
CAAccountingControlChannel.cpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2000, The JAP-Team
3 All rights reserved.
4 Redistribution and use in source and binary forms, with or without modification,
5 are permitted provided that the following conditions are met:
6 
7  - Redistributions of source code must retain the above copyright notice,
8  this list of conditions and the following disclaimer.
9 
10  - Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation and/or
12  other materials provided with the distribution.
13 
14  - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors
15  may be used to endorse or promote products derived from this software without specific
16  prior written permission.
17 
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
20 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
22 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
27 */
28 
29 #include "StdAfx.h"
30 #ifdef PAYMENT
32 
39  {
40  m_pHashEntry = pHashEntry;
41  if (m_pHashEntry == NULL)
42  {
43  CAMsg::printMsg(LOG_CRIT,"CAAccountingControlChannel: User hash entry is NULL - creating control channel will fail!");
44  }
46  {
48  }
49  }
50 
51 
53  {
54  // todo cleanup hashtable entry
55  #ifdef DEBUG
56  CAMsg::printMsg(LOG_DEBUG, "~CAAccountingControlChannel destructor\n");
57  #endif
59  }
60 
61 
66 SINT32 CAAccountingControlChannel::processXMLMessage(const XERCES_CPP_NAMESPACE::DOMDocument* a_doc)
67  {
68  #ifdef DEBUG
69  CAMsg::printMsg(LOG_DEBUG, "Invoking processJapMessage\n");
70  #endif
72  }
73 #endif
74 
signed int SINT32
Definition: basetypedefs.h:132
CAAccountingControlChannel(fmHashTableEntry *pHashEntry)
Creates a new accounting controlchannel and stores a pointer to this in the pHashEntry.
SINT32 processXMLMessage(const XERCES_CPP_NAMESPACE::DOMDocument *a_doc)
processMessage - receives an XML msg and appends it to the AI message queue where it will be processe...
static SINT32 processJapMessage(fmHashTableEntry *pHashEntry, const XERCES_CPP_NAMESPACE::DOMDocument *a_DomDoc)
Handle a user (xml) message sent to us by the Jap through the ControlChannel.
static SINT32 initTableEntry(fmHashTableEntry *pHashEntry)
This must be called whenever a JAP is connecting to init our per-user data structures.
static SINT32 cleanupTableEntry(fmHashTableEntry *pHashEntry)
This should always be called when closing a JAP connection to cleanup the data structures.
static SINT32 printMsg(UINT32 typ, const char *format,...)
Writes a given message to the log.
Definition: CAMsg.cpp:251
A synchronous control channel.
#define ACCOUNT_CONTROL_CHANNEL_ID
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
CAAccountingControlChannel * pControlChannel
a pointer to the user-specific control channel object
Definition: typedefs.hpp:330
tAiAccountingInfo * pAccountingInfo