#endif
#ifdef WIN32
- BOOL LogEvent(\r
- LPCSTR lpUNCServerName,\r
- WORD wType,\r
- DWORD dwEventID,\r
- PSID lpUserSid,\r
- LPCSTR message)\r
- {\r
- LPCSTR messages[] = {message, NULL};\r
-\r
- HANDLE hElog = RegisterEventSource(lpUNCServerName, "OpenSAML XMLTooling Library");\r
- BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, NULL);\r
- return (DeregisterEventSource(hElog) && res);\r
- }\r
+ BOOL LogEvent(
+ LPCSTR lpUNCServerName,
+ WORD wType,
+ DWORD dwEventID,
+ PSID lpUserSid,
+ LPCSTR message)
+ {
+ LPCSTR messages[] = {message, NULL};
+
+ HANDLE hElog = RegisterEventSource(lpUNCServerName, "OpenSAML XMLTooling Library");
+ BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, NULL);
+ return (DeregisterEventSource(hElog) && res);
+ }
#endif
}
string msg = string("failed to configure logging: ") + e.what();
Category::getInstance(XMLTOOLING_LOGCAT".Logging").crit(msg);
#ifdef WIN32
- LogEvent(NULL, EVENTLOG_ERROR_TYPE, 2100, NULL, msg.c_str());\r
+ LogEvent(NULL, EVENTLOG_ERROR_TYPE, 2100, NULL, msg.c_str());
#endif
return false;
}
delete m_replayCache;
m_replayCache = replayCache;
}
+
+void XMLToolingConfig::setKeyInfoResolver(xmltooling::KeyInfoResolver *keyInfoResolver)
+{
+ delete m_keyInfoResolver;
+ m_keyInfoResolver = keyInfoResolver;
+}
#endif
void XMLToolingConfig::setPathResolver(PathResolver* pathResolver)
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef XMLTOOLING_NO_XMLSEC
/**
- * Sets the global KeyInfoResolver instance.
- * This method must be externally synchronized with any code that uses the object.
- * Any previously set object is destroyed.
- *
- * @param keyInfoResolver new KeyInfoResolver instance to store
- */
- void setKeyInfoResolver(KeyInfoResolver* keyInfoResolver);
-
- /**
* Returns the global KeyInfoResolver instance.
*
* @return global KeyInfoResolver or NULL
}
/**
- * 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;
}
-#endif
/**
- * Sets the global URLEncoder instance.
+ * Sets the global KeyInfoResolver instance.
* This method must be externally synchronized with any code that uses the object.
* Any previously set object is destroyed.
*
- * @param urlEncoder new URLEncoder instance to store
- */
- void setURLEncoder(URLEncoder* urlEncoder);
-
- /**
- * Returns the global URLEncoder instance.
- *
- * @return global URLEncoder or NULL
+ * @param keyInfoResolver new KeyInfoResolver instance to store
*/
- const URLEncoder* getURLEncoder() const {
- return m_urlEncoder;
- }
-
+ void setKeyInfoResolver(KeyInfoResolver* keyInfoResolver);
+
/**
- * Sets the global TemplateEngine instance.
+ * 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 templateEngine new TemplateEngine instance to store
+ * @param replayCache new ReplayCache instance to store
*/
- void setTemplateEngine(TemplateEngine* templateEngine);
+ void setReplayCache(ReplayCache* replayCache);
+#endif
/**
+ * Returns the global PathResolver instance.
+ *
+ * @return global PathResolver or NULL
+ */
+ PathResolver* getPathResolver() const {
+ return m_pathResolver;
+ }
+
+ /**
* Returns the global TemplateEngine instance.
*
* @return global TemplateEngine or NULL
}
/**
+ * Returns the global URLEncoder instance.
+ *
+ * @return global URLEncoder or NULL
+ */
+ const URLEncoder* getURLEncoder() const {
+ return m_urlEncoder;
+ }
+
+ /**
* Sets the global PathResolver instance.
* This method must be externally synchronized with any code that uses the object.
* Any previously set object is destroyed.
* @param pathResolver new PathResolver instance to store
*/
void setPathResolver(PathResolver* pathResolver);
+
+ /**
+ * 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 PathResolver instance.
+ * Sets the global URLEncoder instance.
+ * This method must be externally synchronized with any code that uses the object.
+ * Any previously set object is destroyed.
*
- * @return global PathResolver or NULL
+ * @param urlEncoder new URLEncoder instance to store
*/
- PathResolver* getPathResolver() const {
- return m_pathResolver;
- }
+ void setURLEncoder(URLEncoder* urlEncoder);
/**
* List of catalog files to load into validating parser pool at initialization time.