ReplayCache, some decoder work, and merged schema validators into one suite.
[shibboleth/cpp-opensaml.git] / saml / SAMLConfig.h
index 1d0dbd1..8491d0f 100644 (file)
@@ -39,6 +39,7 @@ namespace opensaml {
     class SAML_API ArtifactMap;\r
     class SAML_API MessageEncoder;\r
     class SAML_API MessageDecoder;\r
+    class SAML_API ReplayCache;\r
     class SAML_API SAMLArtifact;\r
     class SAML_API TrustEngine;\r
     class SAML_API URLEncoder;\r
@@ -106,7 +107,7 @@ namespace opensaml {
         /**\r
          * Returns the global ArtifactMap instance.\r
          * \r
-         * @return  global ArtifactMap\r
+         * @return  global ArtifactMap or NULL\r
          */\r
         ArtifactMap* getArtifactMap() const {\r
             return m_artifactMap;\r
@@ -124,13 +125,31 @@ namespace opensaml {
         /**\r
          * Returns the global URLEncoder instance.\r
          * \r
-         * @return  global URLEncoder\r
+         * @return  global URLEncoder or NULL\r
          */\r
         URLEncoder* getURLEncoder() const {\r
             return m_urlEncoder;\r
         }\r
         \r
         /**\r
+         * Sets the global ReplayCache instance.\r
+         * This method must be externally synchronized with any code that uses the object.\r
+         * Any previously set object is destroyed.\r
+         * \r
+         * @param replayCache   new ReplayCache instance to store\r
+         */\r
+        void setReplayCache(ReplayCache* replayCache);\r
+\r
+        /**\r
+         * Returns the global ReplayCache instance.\r
+         * \r
+         * @return  global ReplayCache or NULL\r
+         */\r
+        ReplayCache* getReplayCache() const {\r
+            return m_replayCache;\r
+        }\r
+        \r
+        /**\r
          * Generate random information using the underlying security library\r
          * \r
          * @param buf   buffer for the information\r
@@ -195,13 +214,16 @@ namespace opensaml {
         xmltooling::PluginManager<saml2md::MetadataFilter,const DOMElement*> MetadataFilterManager;\r
 \r
     protected:\r
-        SAMLConfig() : m_artifactMap(NULL), m_urlEncoder(NULL) {}\r
+        SAMLConfig() : m_artifactMap(NULL), m_urlEncoder(NULL), m_replayCache(NULL) {}\r
         \r
         /** Global ArtifactMap instance for use by artifact-related functions. */\r
         ArtifactMap* m_artifactMap;\r
 \r
         /** Global URLEncoder instance for use by URL-related functions. */\r
         URLEncoder* m_urlEncoder;\r
+        \r
+        /** Global ReplayCache instance. */\r
+        ReplayCache* m_replayCache;\r
     };\r
 \r
 #if defined (_MSC_VER)\r