Imported Upstream version 2.3+dfsg
[shibboleth/sp.git] / shibsp / metadata / MetadataExt.h
1 /*
2  *  Copyright 2001-2009 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/metadata/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/util/SPConstants.h>
27
28 #include <xmltooling/AttributeExtensibleXMLObject.h>
29 #include <xmltooling/ConcreteXMLObjectBuilder.h>
30 #include <xmltooling/util/XMLObjectChildrenList.h>
31
32 #define DECL_SHIBOBJECTBUILDER(cname) \
33     DECL_XMLOBJECTBUILDER(SHIBSP_API,cname,shibspconstants::SHIBMD_NS,shibspconstants::SHIBMD_PREFIX)
34
35 namespace xmlsignature {
36     class XMLTOOL_API KeyInfo;
37 };
38
39 namespace shibsp {
40
41     BEGIN_XMLOBJECT(SHIBSP_API,Scope,xmltooling::XMLObject,Scope element);
42         DECL_BOOLEAN_ATTRIB(Regexp,REGEXP,false);
43         DECL_SIMPLE_CONTENT(Value);
44     END_XMLOBJECT;
45
46     BEGIN_XMLOBJECT(SHIBSP_API,KeyAuthority,xmltooling::AttributeExtensibleXMLObject,KeyAuthority element);
47         DECL_INTEGER_ATTRIB(VerifyDepth,VERIFYDEPTH);
48         DECL_TYPED_FOREIGN_CHILDREN(KeyInfo,xmlsignature);
49     END_XMLOBJECT;
50
51     DECL_SHIBOBJECTBUILDER(Scope);
52     DECL_SHIBOBJECTBUILDER(KeyAuthority);
53     
54     /**
55      * Registers builders and validators for Shibboleth metadata extension classes into the runtime.
56      */
57     void SHIBSP_API registerMetadataExtClasses();
58 };
59
60 #endif /* __shibsp_metaext_h__ */