Next integration phase, metadata and trust conversion.
[shibboleth/cpp-sp.git] / shibsp / MetadataExt.h
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  * @file shibsp/MetadataExt.h
19  * 
20  * XMLObjects representing Shibboleth metadata extensions
21  */
22
23 #ifndef __shibsp_metaext_h__
24 #define __shibsp_metaext_h__
25
26 #include <shibsp/SPConstants.h>
27 #include <xmltooling/XMLObjectBuilder.h>
28 #include <xmltooling/signature/KeyInfo.h>
29 #include <xercesc/util/XMLUniDefs.hpp>
30
31 #define DECL_SHIBOBJECTBUILDER(cname) \
32     DECL_XMLOBJECTBUILDER(SHIBSP_API,cname,shibspconstants::SHIBMD_NS,shibspconstants::SHIBMD_PREFIX)
33
34 namespace shibsp {
35
36     BEGIN_XMLOBJECT(SHIBSP_API,Scope,xmltooling::XMLObject,Scope element);
37         DECL_BOOLEAN_ATTRIB(Regexp,REGEXP,false);
38         DECL_SIMPLE_CONTENT(Value);
39     END_XMLOBJECT;
40
41     BEGIN_XMLOBJECT(SHIBSP_API,KeyAuthority,xmltooling::AttributeExtensibleXMLObject,KeyAuthority element);
42         DECL_INTEGER_ATTRIB(VerifyDepth,VERIFYDEPTH);
43         DECL_TYPED_FOREIGN_CHILDREN(KeyInfo,xmlsignature);
44     END_XMLOBJECT;
45
46     DECL_SHIBOBJECTBUILDER(Scope);
47     DECL_SHIBOBJECTBUILDER(KeyAuthority);
48     
49     /**
50      * Registers builders and validators for Shibboleth metadata extension classes into the runtime.
51      */
52     void SHIBSP_API registerMetadataExtClasses();
53 };
54
55 #endif /* __shibsp_metaext_h__ */