VS10 solution files, convert from NULL macro to nullptr.
[shibboleth/sp.git] / shibsp / metadata / MetadataProviderCriteria.h
1 /*
2  *  Copyright 2001-2010 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/MetadataProviderCriteria.h
19  *
20  * Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
21  */
22
23 #ifndef __shibsp_metaprovcrit_h__
24 #define __shibsp_metaprovcrit_h__
25
26 #include <shibsp/base.h>
27
28 #include <saml/saml2/metadata/MetadataProvider.h>
29
30 namespace shibsp {
31
32     class SHIBSP_API Application;
33
34     /**
35      * Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
36      */
37     struct SHIBSP_API MetadataProviderCriteria : public opensaml::saml2md::MetadataProvider::Criteria
38     {
39         /**
40          * Constructor.
41          *
42          * @param app   application performing the lookup
43          */
44         MetadataProviderCriteria(const Application& app);
45
46         /**
47          * Constructor.
48          *
49          * @param app   application performing the lookup
50          * @param id    entityID to lookup
51          * @param q     element/type of role, if any
52          * @param prot  protocol support constant, if any
53          * @param valid true iff stale metadata should be ignored
54          */
55         MetadataProviderCriteria(
56             const Application& app, const XMLCh* id, const xmltooling::QName* q=nullptr, const XMLCh* prot=nullptr, bool valid=true
57             );
58
59         /**
60          * Constructor.
61          *
62          * @param app   application performing the lookup
63          * @param id    entityID to lookup
64          * @param q     element/type of role, if any
65          * @param prot  protocol support constant, if any
66          * @param valid true iff stale metadata should be ignored
67          */
68         MetadataProviderCriteria(
69             const Application& app, const char* id, const xmltooling::QName* q=nullptr, const XMLCh* prot=nullptr, bool valid=true
70             );
71
72         /**
73          * Constructor.
74          *
75          * @param app   application performing the lookup
76          * @param a     artifact to lookup
77          * @param q     element/type of role, if any
78          * @param prot  protocol support constant, if any
79          * @param valid true iff stale metadata should be ignored
80          */
81         MetadataProviderCriteria(
82             const Application& app, const opensaml::SAMLArtifact* a, const xmltooling::QName* q=nullptr, const XMLCh* prot=nullptr, bool valid=true
83             );
84
85         ~MetadataProviderCriteria();
86
87         /** The application performing the lookup. */
88         const Application& application;
89     };
90 };
91
92 #endif /* __shibsp_metaprovcrit_h__ */