Copied over mapping and filtering schemas.
[shibboleth/sp.git] / shibsp / attribute / resolver / ResolutionContext.h
1 /*
2  *  Copyright 2001-2007 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/resolver/ResolutionContext.h
19  * 
20  * A context for a resolution request.
21  */
22
23 #ifndef __shibsp_resctx_h__
24 #define __shibsp_resctx_h__
25
26 #include <shibsp/base.h>
27
28 #include <saml/Assertion.h>
29
30 namespace shibsp {
31
32     class SHIBSP_API Application;
33     class SHIBSP_API Session;
34     class SHIBSP_API Attribute;
35
36     /**
37      * A context for a resolution request.
38      */
39     class SHIBSP_API ResolutionContext
40     {
41         MAKE_NONCOPYABLE(ResolutionContext);
42     protected:
43         ResolutionContext() {}
44     public:
45         virtual ~ResolutionContext() {}
46         
47         /**
48          * Returns the set of Attributes resolved and added to the context.
49          * 
50          * <p>Any Attributes left in the returned container will be freed by the
51          * context, so the caller should modify/clear the container after copying
52          * objects for its own use.
53          * 
54          * @return  a mutable array of Attributes.
55          */
56         virtual std::multimap<std::string,Attribute*>& getResolvedAttributes()=0;
57
58         /**
59          * Returns the set of assertions resolved and added to the context.
60          * 
61          * <p>Any assertions left in the returned container will be freed by the
62          * context, so the caller should modify/clear the container after copying
63          * objects for its own use.
64          * 
65          * @return  a mutable array of Assertions
66          */
67         virtual std::vector<opensaml::Assertion*>& getResolvedAssertions()=0;
68     };
69 };
70
71 #endif /* __shibsp_resctx_h__ */