X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2FXMLToolingConfig.h;h=737fe31743075ea74c9379838788e31f02d2ddf8;hb=2fb8dbb99c8806211921296801bac442f22a2ddf;hp=e1ce7f064ae669d3e62f4b726117b2042a4ad345;hpb=26562d6f18ee79cad4456dbd00b24c3c68854973;p=shibboleth%2Fxmltooling.git diff --git a/xmltooling/XMLToolingConfig.h b/xmltooling/XMLToolingConfig.h index e1ce7f0..737fe31 100644 --- a/xmltooling/XMLToolingConfig.h +++ b/xmltooling/XMLToolingConfig.h @@ -41,6 +41,7 @@ namespace xmlsignature { namespace xmltooling { + class XMLTOOL_API ReplayCache; class XMLTOOL_API StorageService; class XMLTOOL_API TrustEngine; class XMLTOOL_API XSECCryptoX509CRL; @@ -56,7 +57,10 @@ namespace xmltooling { { MAKE_NONCOPYABLE(XMLToolingConfig); protected: - XMLToolingConfig() : clock_skew_secs(180) {} + XMLToolingConfig() : m_replayCache(NULL), clock_skew_secs(180) {} + + /** Global ReplayCache instance. */ + ReplayCache* m_replayCache; public: virtual ~XMLToolingConfig() {} @@ -128,7 +132,25 @@ namespace xmltooling { * @return reference to a validating parser pool. */ virtual ParserPool& getValidatingParser() const=0; - + + /** + * Sets the global ReplayCache instance. + * This method must be externally synchronized with any code that uses the object. + * Any previously set object is destroyed. + * + * @param replayCache new ReplayCache instance to store + */ + void setReplayCache(ReplayCache* replayCache); + + /** + * Returns the global ReplayCache instance. + * + * @return global ReplayCache or NULL + */ + ReplayCache* getReplayCache() const { + return m_replayCache; + } + /** * List of catalog files to load into validating parser pool at initialization time. * Like other path settings, the separator depends on the platform