Update copyright.
[shibboleth/xmltooling.git] / xmltooling / XMLToolingConfig.h
index f29f706..44eba99 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2006 Internet2
+ *  Copyright 2001-2007 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,8 +42,11 @@ namespace xmlsignature {
 namespace xmltooling {
     
     class XMLTOOL_API ReplayCache;
+    class XMLTOOL_API SOAPTransport;
     class XMLTOOL_API StorageService;
+    class XMLTOOL_API TemplateEngine;
     class XMLTOOL_API TrustEngine;
+    class XMLTOOL_API KeyInfoSource;
     class XMLTOOL_API XSECCryptoX509CRL;
 
     /**
@@ -57,10 +60,13 @@ namespace xmltooling {
     {
         MAKE_NONCOPYABLE(XMLToolingConfig);
     protected:
-        XMLToolingConfig() : m_replayCache(NULL), clock_skew_secs(180) {}
+        XMLToolingConfig() : m_replayCache(NULL), m_templateEngine(NULL), clock_skew_secs(180) {}
         
         /** Global ReplayCache instance. */
         ReplayCache* m_replayCache;
+        
+        /** Global TemplateEngine instance. */
+        TemplateEngine* m_templateEngine;
     public:
         virtual ~XMLToolingConfig() {}
 
@@ -150,6 +156,24 @@ namespace xmltooling {
         ReplayCache* getReplayCache() const {
             return m_replayCache;
         }
+
+        /**
+         * Sets the global TemplateEngine instance.
+         * This method must be externally synchronized with any code that uses the object.
+         * Any previously set object is destroyed.
+         * 
+         * @param templateEngine   new TemplateEngine instance to store
+         */
+        void setTemplateEngine(TemplateEngine* templateEngine);
+
+        /**
+         * Returns the global TemplateEngine instance.
+         * 
+         * @return  global TemplateEngine or NULL
+         */
+        TemplateEngine* getTemplateEngine() const {
+            return m_templateEngine;
+        }
                 
         /**
          * List of catalog files to load into validating parser pool at initialization time.
@@ -187,6 +211,11 @@ namespace xmltooling {
 #endif
 
         /**
+         * Manages factories for SOAPTransport plugins.
+         */
+        PluginManager<SOAPTransport,std::pair<const KeyInfoSource*,const char*> > SOAPTransportManager;
+
+        /**
          * Manages factories for StorageService plugins.
          */
         PluginManager<StorageService,const DOMElement*> StorageServiceManager;