https://issues.shibboleth.net/jira/browse/SSPCPP-304
[shibboleth/cpp-opensaml.git] / saml / saml2 / metadata / MetadataCredentialCriteria.h
index 910b6f0..901b3c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
  * Metadata-based CredentialCriteria subclass.
  */
 
-#ifndef __saml_metacred_h__
-#define __saml_metacred_h__
+#ifndef __saml_metacrit_h__
+#define __saml_metacrit_h__
 
 #include <saml/base.h>
 #include <xmltooling/security/CredentialCriteria.h>
 namespace opensaml {
     namespace saml2md {
         
-        class SAML_API RoleDescriptor;
-        
         /**
          * Metadata-based CredentialCriteria subclass.
          */
         class SAML_API MetadataCredentialCriteria : public xmltooling::CredentialCriteria
         {
         public:
-            /*
+            /**
              * Constructor.
              *
              * @param role      source of metadata-supplied credentials
              */
-            MetadataCredentialCriteria(const RoleDescriptor& role) : m_role(role) {}
+            MetadataCredentialCriteria(const RoleDescriptor& role);
     
             virtual ~MetadataCredentialCriteria() {}
             
@@ -55,10 +53,13 @@ namespace opensaml {
                 return m_role;
             }
 
+            void reset();
+            bool matches(const xmltooling::Credential& credential) const;
+
         private:
             const RoleDescriptor& m_role;
         };
     };
 };
 
-#endif /* __saml_metacred_h__ */
+#endif /* __saml_metacrit_h__ */