Mixe for Privacy and Anonymity in the Internet
CAXMLBI.hpp
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 #ifndef __CAXMLBI__
30 #define __CAXMLBI__
31 
32 #if !defined (ONLY_LOCAL_PROXY) && defined(PAYMENT)
34 #include "CACertificate.hpp"
35 #include "CASignature.hpp"
36 #include "CAUtil.hpp"
37 
44 class CAXMLBI : public CAAbstractXMLEncodable
45 {
46  public:
47  static CAXMLBI* getInstance(const UINT8 * biID, const UINT8 * hostName, const int portNumber, CACertificate * pCert);
48  static CAXMLBI* getInstance(DOMElement* elemRoot);
49  ~CAXMLBI();
50 
52  UINT8 * getID()
53  {
54  return m_pBiID;
55  }
56 
60  /*CASignature * getVerifier()
61  {
62  if (!m_pVeryfire)
63  {
64  m_pVeryfire = new CASignature;
65  m_pVeryfire->setVerifyKey(m_pCert);
66  }
67  return m_pVeryfire;
68  }*/
69 
71  UINT8* getHostName()
72  {
73  return m_pHostName;
74  }
75 
77  UINT32 getPortNumber()
78  {
79  return m_iPortNumber;
80  }
81 
82  SINT32 toXmlElement( XERCES_CPP_NAMESPACE::DOMDocument* a_doc, DOMElement* & elemRoot);
83 
84  CACertificate* getCertificate()
85  {
86  return m_pCert;
87  }
88 
89  static const char* const getXMLElementName()
90  {
91  return CAXMLBI::ms_pXmlElemName;
92  }
93 
94 
95  private:
96  SINT32 setValues(DOMElement* elemRoot);
97  UINT8 * m_pBiID;
98  UINT8 * m_pHostName;
99  CACertificate * m_pCert;
100  CASignature * m_pVeryfire;
101  UINT32 m_iPortNumber;
102  CAXMLBI();
103  static const char* const ms_pXmlElemName;
104 };
105 
106 #endif //ONLY_LOCAL_PROXY
107 #endif
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
Abstract base class for classes which can be converted to an XML structure.