Set fourth file version digit to signify rebuild.
[shibboleth/cpp-opensaml.git] / saml / saml2 / metadata / MetadataProvider.h
index 571d4bd..e8c852f 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <vector>
 #include <iostream>
+#include <boost/ptr_container/ptr_vector.hpp>
 #include <xmltooling/exceptions.h>
 #include <xmltooling/security/CredentialResolver.h>
 
@@ -50,6 +51,7 @@ namespace opensaml {
         class SAML_API RoleDescriptor;
         class SAML_API MetadataCredentialResolver;
         class SAML_API MetadataFilter;
+        class SAML_API MetadataFilterContext;
 
 #if defined (_MSC_VER)
         #pragma warning( push )
@@ -120,6 +122,15 @@ namespace opensaml {
             virtual MetadataFilter* removeMetadataFilter(MetadataFilter* oldFilter);
 
             /**
+             * Sets a filtering context object for use by the filtering process.
+             * <p>The object's lifetime must last for the duration of the lifetime
+             * of the MetadataProvider.
+             *
+             * @param ctx   a context object
+             */
+            void setContext(const MetadataFilterContext* ctx);
+
+            /**
              * Should be called after instantiating provider and adding filters, but before
              * performing any lookup operations. Allows the provider to defer initialization
              * processes that are likely to result in exceptions until after the provider is
@@ -250,7 +261,8 @@ namespace opensaml {
             void doFilters(xmltooling::XMLObject& xmlObject) const;
 
         private:
-            std::vector<MetadataFilter*> m_filters;
+            const MetadataFilterContext* m_filterContext;
+            boost::ptr_vector<MetadataFilter> m_filters;
         };
 
 #if defined (_MSC_VER)
@@ -271,6 +283,9 @@ namespace opensaml {
         /** MetadataProvider that wraps a sequence of metadata providers. */
         #define CHAINING_METADATA_PROVIDER  "Chaining"
 
+        /** MetadataProvider that loads a directory of files. */
+        #define FOLDER_METADATA_PROVIDER  "Folder"
+
         /** MetadataProvider that returns an empty "dummy" entity descriptor. */
         #define NULL_METADATA_PROVIDER  "Null"