Moved ReplayCache into xmltooling
[shibboleth/cpp-xmltooling.git] / xmltooling / XMLToolingConfig.h
index e1ce7f0..737fe31 100644 (file)
@@ -41,6 +41,7 @@ namespace xmlsignature {
 \r
 namespace xmltooling {\r
     \r
+    class XMLTOOL_API ReplayCache;\r
     class XMLTOOL_API StorageService;\r
     class XMLTOOL_API TrustEngine;\r
     class XMLTOOL_API XSECCryptoX509CRL;\r
@@ -56,7 +57,10 @@ namespace xmltooling {
     {\r
         MAKE_NONCOPYABLE(XMLToolingConfig);\r
     protected:\r
-        XMLToolingConfig() : clock_skew_secs(180) {}\r
+        XMLToolingConfig() : m_replayCache(NULL), clock_skew_secs(180) {}\r
+        \r
+        /** Global ReplayCache instance. */\r
+        ReplayCache* m_replayCache;\r
     public:\r
         virtual ~XMLToolingConfig() {}\r
 \r
@@ -128,7 +132,25 @@ namespace xmltooling {
          * @return reference to a validating parser pool.\r
          */\r
         virtual ParserPool& getValidatingParser() const=0;\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
          * List of catalog files to load into validating parser pool at initialization time.\r
          * Like other path settings, the separator depends on the platform\r