VS10 solution files, convert from NULL macro to nullptr.
[shibboleth/sp.git] / shibsp / attribute / filtering / FilteringContext.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/attribute/filtering/FilteringContext.h
19  * 
20  * Context for attribute filtering operations.
21  */
22
23 #ifndef __shibsp_filtctx_h__
24 #define __shibsp_filtctx_h__
25
26 #include <shibsp/base.h>
27
28 #include <map>
29 #include <string>
30
31 namespace opensaml {
32     namespace saml2md {
33         class SAML_API RoleDescriptor;
34     };
35 };
36
37 namespace shibsp {
38
39     class SHIBSP_API Application;
40     class SHIBSP_API Attribute;
41
42     /**
43      * Context for attribute filtering operations.
44      */
45     class SHIBSP_API FilteringContext
46     {
47         MAKE_NONCOPYABLE(FilteringContext);
48     protected:
49         FilteringContext();
50     public:
51         virtual ~FilteringContext();
52
53         /**
54          * Gets the Application doing the filtering.
55          *
56          * @return  reference to an Application
57          */
58         virtual const Application& getApplication() const=0;
59
60         /**
61          * Returns a URI containing an AuthnContextClassRef associated with the subject.
62          * 
63          * <p>SAML 1.x AuthenticationMethods will be returned as class references.
64          * 
65          * @return  a URI identifying the authentication context class
66          */
67         virtual const XMLCh* getAuthnContextClassRef() const=0;
68
69         /**
70          * Returns a URI containing an AuthnContextDeclRef associated with the subject.
71          * 
72          * @return  a URI identifying the authentication context declaration
73          */
74         virtual const XMLCh* getAuthnContextDeclRef() const=0;
75
76         /**
77          * Gets the ID of the requester of the attributes, if known.
78          * 
79          * @return requester of the attributes, or nullptr
80          */
81         virtual const XMLCh* getAttributeRequester() const=0;
82         
83         /**
84          * Gets the ID of the issuer of the attributes, if known.
85          * 
86          * @return ID of the issuer of the attributes, or nullptr
87          */
88         virtual const XMLCh* getAttributeIssuer() const=0;
89
90         /**
91          * Gets the SAML metadata for the attribute requesting role, if available.
92          * 
93          * @return SAML metadata for the attribute requesting role, or nullptr
94          */
95         virtual const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const=0;
96         
97         /**
98          * Gets the SAML metadata for the attribute issuing role, if available.
99          * 
100          * @return SAML metadata for the attribute issuing role, or nullptr
101          */
102         virtual const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const=0;
103
104         /**
105          * Returns the set of Attributes being filtered.
106          * 
107          * <p>No modifications should be performed, access is provided only for use by
108          * MatchFunctors based on the presence of Attribute data.
109          * 
110          * @return  an immutable map of Attributes.
111          */
112         virtual const std::multimap<std::string,Attribute*>& getAttributes() const=0;
113
114     };
115 };
116
117 #endif /* __shibsp_filtctx_h__ */