Starting SAML 1.x implementation.
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / impl / AssertionsImpl.cpp
1 /*
2 *  Copyright 2001-2006 Internet2
3  * 
4 * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * AssertionsImpl.cpp
19  * 
20  * Implementation classes for SAML 1.x Assertions schema
21  */
22
23 #include "internal.h"
24 #include "exceptions.h"
25 #include "saml1/core/Assertions.h"
26
27 #include <xmltooling/AbstractChildlessElement.h>
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
34 #include <xmltooling/validation/AbstractValidatingXMLObject.h>
35
36 #include <xercesc/util/XMLUniDefs.hpp>
37
38 using namespace opensaml::saml1;
39 using namespace opensaml;
40 using namespace xmltooling;
41 using namespace std;
42
43 #if defined (_MSC_VER)
44     #pragma warning( push )
45     #pragma warning( disable : 4250 4251 )
46 #endif
47
48 namespace opensaml {
49     namespace saml1 {
50     
51     DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
52     DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
53     DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
54     
55     };
56 };
57
58 #if defined (_MSC_VER)
59     #pragma warning( pop )
60 #endif
61
62 // Builder Implementations
63
64 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
65 IMPL_XMLOBJECTBUILDER(Audience);
66 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
67
68 // Unicode literals
69 const XMLCh AssertionIDReference::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
70 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
71 const XMLCh ConfirmationMethod::LOCAL_NAME[] =      UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
72
73 #define XCH(ch) chLatin_##ch
74 #define XNUM(d) chDigit_##d