Add chaining resolver.
[shibboleth/cpp-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 Attribute;
33
34     /**
35      * A context for a resolution request.
36      */
37     class SHIBSP_API ResolutionContext
38     {
39         MAKE_NONCOPYABLE(ResolutionContext);
40     protected:
41         ResolutionContext() {}
42     public:
43         virtual ~ResolutionContext() {}
44         
45         /**
46          * Returns the set of Attributes resolved and added to the context.
47          * 
48          * <p>Any Attributes left in the returned container will be freed by the
49          * context, so the caller should modify/clear the container after copying
50          * objects for its own use.
51          * 
52          * @return  a mutable array of Attributes.
53          */
54         virtual std::multimap<std::string,Attribute*>& getResolvedAttributes()=0;
55
56         /**
57          * Returns the set of assertions resolved and added to the context.
58          * 
59          * <p>Any assertions left in the returned container will be freed by the
60          * context, so the caller should modify/clear the container after copying
61          * objects for its own use.
62          * 
63          * @return  a mutable array of Assertions
64          */
65         virtual std::vector<opensaml::Assertion*>& getResolvedAssertions()=0;
66     };
67 };
68
69 #endif /* __shibsp_resctx_h__ */