X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fopensaml2.git;a=blobdiff_plain;f=saml%2FSAMLConfig.h;h=90e00ad5a7509e929e9c2a3065f589169d42fca9;hp=047470798e6395e3e397bd6a75257fdac9fbf7b7;hb=21e8f66003ba7a0d106a14702c1891b0561fc7e8;hpb=387c0acdd07f202a44f741674424eb63a6621365 diff --git a/saml/SAMLConfig.h b/saml/SAMLConfig.h index 0474707..90e00ad 100644 --- a/saml/SAMLConfig.h +++ b/saml/SAMLConfig.h @@ -24,6 +24,7 @@ #define __saml_config_h__ #include +#include #include #include @@ -36,6 +37,8 @@ */ namespace opensaml { + class SAML_API MessageEncoder; + class SAML_API MessageDecoder; class SAML_API SAMLArtifact; class SAML_API TrustEngine; @@ -91,6 +94,27 @@ namespace opensaml { virtual void term(bool termXMLTooling=true)=0; /** + * Sets the global ArtifactMap instance. + * This method must be externally synchronized with any code that uses the object. + * Any previously set object is destroyed. + * + * @param artifactMap new ArtifactMap instance to store + */ + void setArtifactMap(ArtifactMap* artifactMap) { + delete m_artifactMap; + m_artifactMap = artifactMap; + } + + /** + * Returns the global ArtifactMap instance. + * + * @return global ArtifactMap + */ + ArtifactMap* getArtifactMap() const { + return m_artifactMap; + } + + /** * Generate random information using the underlying security library * * @param buf buffer for the information @@ -123,16 +147,16 @@ namespace opensaml { * @return SHA-1 hash of the data */ virtual std::string hashSHA1(const char* s, bool toHex=false)=0; - + /** - * Manages factories for MetadataProvider plugins. + * Manages factories for MessageDecoder plugins. */ - xmltooling::PluginManager MetadataProviderManager; - + xmltooling::PluginManager MessageDecoderManager; + /** - * Manages factories for MetadataFilter plugins. + * Manages factories for MessageEncoder plugins. */ - xmltooling::PluginManager MetadataFilterManager; + xmltooling::PluginManager MessageEncoderManager; /** * Manages factories for SAMLArtifact plugins. @@ -144,8 +168,21 @@ namespace opensaml { */ xmltooling::PluginManager TrustEngineManager; + /** + * Manages factories for MetadataProvider plugins. + */ + xmltooling::PluginManager MetadataProviderManager; + + /** + * Manages factories for MetadataFilter plugins. + */ + xmltooling::PluginManager MetadataFilterManager; + protected: - SAMLConfig() {} + SAMLConfig() : m_artifactMap(NULL) {} + + /** Global ArtifactMap instance for use by artifact-related functions. */ + ArtifactMap* m_artifactMap; }; #if defined (_MSC_VER)