https://issues.shibboleth.net/jira/browse/SSPCPP-132
[shibboleth/cpp-opensaml.git] / saml / saml2 / metadata / MetadataProvider.h
index 483d05c..beced6e 100644 (file)
@@ -155,7 +155,13 @@ namespace opensaml {
             /**
              * Batches up criteria for entity lookup.
              */
-            struct Criteria {
+            struct SAML_API Criteria {
+                /**
+                 * Default constructor.
+                 */
+                Criteria() : entityID_unicode(NULL), entityID_ascii(NULL), artifact(NULL), role(NULL), protocol(NULL), protocol2(NULL), validOnly(true) {
+                }
+            
                 /**
                  * Constructor.
                  * 
@@ -192,6 +198,8 @@ namespace opensaml {
                     : entityID_unicode(NULL), entityID_ascii(NULL), artifact(a), role(q), protocol(prot), protocol2(NULL), validOnly(valid) {
                 }
                 
+                virtual ~Criteria() {}
+                
                 /** Unique ID of entity. */
                 const XMLCh* entityID_unicode;
                 /** Unique ID of entity. */
@@ -249,6 +257,9 @@ namespace opensaml {
         /** MetadataProvider that wraps a sequence of metadata providers. */
         #define CHAINING_METADATA_PROVIDER  "Chaining"
 
+        /** MetadataProvider that returns an empty "dummy" entity descriptor. */
+        #define NULL_METADATA_PROVIDER  "Null"
+
         DECL_XMLTOOLING_EXCEPTION(MetadataException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,xmltooling::XMLToolingException,Exceptions related to metadata use);
     };
 };