Initial check-in.
authorScott Cantor <cantor.2@osu.edu>
Wed, 3 May 2006 20:57:04 +0000 (20:57 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 3 May 2006 20:57:04 +0000 (20:57 +0000)
saml/Makefile.am [new file with mode: 0644]
saml/SAMLConfig.h [new file with mode: 0644]
saml/base.h [new file with mode: 0644]
saml/exceptions.h [new file with mode: 0644]
saml/internal.h [new file with mode: 0644]
saml/saml.vcproj [new file with mode: 0644]
saml/version.h [new file with mode: 0644]

diff --git a/saml/Makefile.am b/saml/Makefile.am
new file mode 100644 (file)
index 0000000..145f099
--- /dev/null
@@ -0,0 +1,34 @@
+AUTOMAKE_OPTIONS = foreign
+
+lib_LTLIBRARIES = libsaml.la
+
+libsamlincludedir = $(includedir)/saml
+
+sigincludedir = $(includedir)/saml/signature
+
+utilincludedir = $(includedir)/saml/util
+
+libsamlinclude_HEADERS = \
+    base.h \
+    exceptions.h \
+    version.h \
+    SAMLConfig.h
+
+utilinclude_HEADERS = \
+    util/XMLConstants.h
+
+noinst_HEADERS = \
+    internal.h
+
+libsaml_la_SOURCES = \
+    SAMLConfig.cpp \
+    util/XMLConstants.cpp
+
+# this is different from the project version
+# http://sources.redhat.com/autobook/autobook/autobook_91.html
+libxmltooling_la_LDFLAGS = -version-info 2:0:0
+
+install-exec-hook:
+       for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done
+
+EXTRA_DIST = saml.vcproj
diff --git a/saml/SAMLConfig.h b/saml/SAMLConfig.h
new file mode 100644 (file)
index 0000000..c8a00d6
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * @file SAMLConfig.h\r
+ * \r
+ * Library configuration \r
+ */\r
+\r
+#ifndef __saml_config_h__\r
+#define __saml_config_h__\r
+\r
+#include <saml/base.h>\r
+\r
+namespace opensaml {\r
+\r
+    /**\r
+     * Singleton object that manages library startup/shutdown.configuration.\r
+     */\r
+    class SAML_API SAMLConfig\r
+    {\r
+    MAKE_NONCOPYABLE(SAMLConfig);\r
+    public:\r
+        virtual ~SAMLConfig() {}\r
+\r
+        /**\r
+         * Returns the global configuration object for the library.\r
+         * \r
+         * @return reference to the global library configuration object\r
+         */\r
+        static SAMLConfig& getConfig();\r
+        \r
+        /**\r
+         * Initializes library\r
+         * \r
+         * Each process using the library MUST call this function exactly once\r
+         * before using any library classes.\r
+         * \r
+         * @return true iff initialization was successful \r
+         */\r
+        virtual bool init()=0;\r
+        \r
+        /**\r
+         * Shuts down library\r
+         * \r
+         * Each process using the library SHOULD call this function exactly once\r
+         * before terminating itself\r
+         */\r
+        virtual void term()=0;\r
+\r
+    protected:\r
+        SAMLConfig() {}\r
+    };\r
+\r
+};\r
+\r
+#endif /* __saml_config_h__ */\r
diff --git a/saml/base.h b/saml/base.h
new file mode 100644 (file)
index 0000000..a5e581d
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ *  Copyright 2001-2006 Internet2
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file base.h
+ * 
+ * Base header file definitions
+ * Must be included prior to including any other header
+ */
+
+#ifndef __saml_base_h__
+#define __saml_base_h__
+
+#include <xmltooling/base.h>
+
+// Windows and GCC4 Symbol Visibility Macros
+#ifdef WIN32
+  #define SAML_IMPORT __declspec(dllimport)
+  #define SAML_EXPORT __declspec(dllexport)
+  #define SAML_DLLLOCAL
+  #define SAML_DLLPUBLIC
+#else
+  #define SAML_IMPORT
+  #ifdef GCC_HASCLASSVISIBILITY
+    #define SAML_EXPORT __attribute__ ((visibility("default")))
+    #define SAML_DLLLOCAL __attribute__ ((visibility("hidden")))
+    #define SAML_DLLPUBLIC __attribute__ ((visibility("default")))
+  #else
+    #define SAML_EXPORT
+    #define SAML_DLLLOCAL
+    #define SAML_DLLPUBLIC
+  #endif
+#endif
+
+// Define SAML_API for DLL builds
+#ifdef SAML_EXPORTS
+  #define SAML_API SAML_EXPORT
+#else
+  #define SAML_API SAML_IMPORT
+#endif
+
+// Throwable classes must always be visible on GCC in all binaries
+#ifdef WIN32
+  #define SAML_EXCEPTIONAPI(api) api
+#elif defined(GCC_HASCLASSVISIBILITY)
+  #define SAML_EXCEPTIONAPI(api) SAML_EXPORT
+#else
+  #define SAML_EXCEPTIONAPI(api)
+#endif
+
+#endif /* __saml_base_h__ */
diff --git a/saml/exceptions.h b/saml/exceptions.h
new file mode 100644 (file)
index 0000000..4aea899
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ *  Copyright 2001-2006 Internet2
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file exceptions.h
+ * 
+ * Exception classes
+ */
+#ifndef __saml_exceptions_h__
+#define __saml_exceptions_h__
+
+#include <xmltooling/exceptions.h>
+
+namespace opensaml {
+    
+};
+
+#endif /* __saml_exceptions_h__ */
diff --git a/saml/internal.h b/saml/internal.h
new file mode 100644 (file)
index 0000000..12d8662
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ *  Copyright 2001-2005 Internet2
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ *  internal.h - internally visible classes
+ */
+
+#ifndef __saml_internal_h__
+#define __saml_internal_h__
+
+#ifdef WIN32
+# define _CRT_SECURE_NO_DEPRECATE 1
+# define _CRT_NONSTDC_NO_DEPRECATE 1
+#endif
+
+// Export public APIs
+#define SAML_EXPORTS
+
+// eventually we might be able to support autoconf via cygwin...
+#if defined (_MSC_VER) || defined(__BORLANDC__)
+# include "config_win32.h"
+#else
+# include "config.h"
+#endif
+
+#include "base.h"
+#include "SAMLConfig.h"
+
+#define SAML_LOGCAT "OpenSAML"
+
+namespace opensaml {
+    
+    /// @cond OFF
+    class SAMLInternalConfig : public SAMLConfig
+    {
+    public:
+        SAMLInternalConfig() {}
+
+        static SAMLInternalConfig& getInternalConfig();
+
+        // global per-process setup and shutdown of runtime
+        bool init();
+        void term();
+
+    private:
+    };
+    /// @endcond
+
+};
+
+#endif /* __saml_internal_h__ */
diff --git a/saml/saml.vcproj b/saml/saml.vcproj
new file mode 100644 (file)
index 0000000..0a3a162
--- /dev/null
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="saml"\r
+       ProjectGUID="{34DE3EA5-EA05-4261-8B63-A850FFB91768}"\r
+       RootNamespace="saml"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\cpp-xmltooling\Debug\xmltooling_1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_6D.dll"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\cpp-xmltooling\Release\xmltooling_1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_6.dll"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <Filter\r
+                               Name="util"\r
+                               >\r
+                               <File\r
+                                       RelativePath=".\util\XMLConstants.cpp"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\base.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\exceptions.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\internal.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\SAMLConfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\version.h"\r
+                               >\r
+                       </File>\r
+                       <Filter\r
+                               Name="util"\r
+                               >\r
+                               <File\r
+                                       RelativePath=".\util\XMLConstants.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/saml/version.h b/saml/version.h
new file mode 100644 (file)
index 0000000..c7bd3f8
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * version.h\r
+ * \r
+ * Library version macros and constants \r
+ */\r
+\r
+#ifndef __saml_version_h__\r
+#define __saml_version_h__\r
+\r
+// This is all based on Xerces, on the theory it might be useful to\r
+// support this kind of stuff in the future. If they ever yank some\r
+// of this stuff, it can be copied into here.\r
+\r
+#include <xercesc/util/XercesVersion.hpp>\r
+\r
+// ---------------------------------------------------------------------------\r
+// V E R S I O N   S P E C I F I C A T I O N\r
+\r
+/**\r
+ * MODIFY THESE NUMERIC VALUES TO COINCIDE WITH OPENSAML VERSION\r
+ * AND DO NOT MODIFY ANYTHING ELSE IN THIS VERSION HEADER FILE\r
+ */\r
+\r
+#define OPENSAML_VERSION_MAJOR 1\r
+#define OPENSAML_VERSION_MINOR 0\r
+#define OPENSAML_VERSION_REVISION 0\r
+\r
+/** DO NOT MODIFY BELOW THIS LINE */\r
+\r
+/**\r
+ * MAGIC THAT AUTOMATICALLY GENERATES THE FOLLOWING:\r
+ *\r
+ *     gOpenSAMLVersionStr, gOpenSAMLFullVersionStr, gOpenSAMLMajVersion, gOpenSAMLMinVersion, gOpenSAMLRevision\r
+ */\r
+\r
+// ---------------------------------------------------------------------------\r
+// V E R S I O N   I N F O R M A T I O N\r
+\r
+// OpenSAML version strings; these particular macros cannot be used for\r
+// conditional compilation as they are not numeric constants\r
+\r
+#define OPENSAML_FULLVERSIONSTR INVK_CAT3_SEP_UNDERSCORE(OPENSAML_VERSION_MAJOR,OPENSAML_VERSION_MINOR,OPENSAML_VERSION_REVISION)\r
+#define OPENSAML_FULLVERSIONDOT INVK_CAT3_SEP_PERIOD(OPENSAML_VERSION_MAJOR,OPENSAML_VERSION_MINOR,OPENSAML_VERSION_REVISION)\r
+#define OPENSAML_FULLVERSIONNUM INVK_CAT3_SEP_NIL(OPENSAML_VERSION_MAJOR,OPENSAML_VERSION_MINOR,OPENSAML_VERSION_REVISION)\r
+#define OPENSAML_VERSIONSTR     INVK_CAT2_SEP_UNDERSCORE(OPENSAML_VERSION_MAJOR,OPENSAML_VERSION_MINOR)\r
+\r
+const char* const    gOpenSAMLVersionStr = OPENSAML_VERSIONSTR;\r
+const char* const    gOpenSAMLFullVersionStr = OPENSAML_FULLVERSIONSTR;\r
+const unsigned int   gOpenSAMLMajVersion = OPENSAML_VERSION_MAJOR;\r
+const unsigned int   gOpenSAMLMinVersion = OPENSAML_VERSION_MINOR;\r
+const unsigned int   gOpenSAMLRevision   = OPENSAML_VERSION_REVISION;\r
+\r
+// OpenSAML version numeric constants that can be used for conditional\r
+// compilation purposes.\r
+\r
+#define _OPENSAML_VERSION CALC_EXPANDED_FORM (OPENSAML_VERSION_MAJOR,OPENSAML_VERSION_MINOR,OPENSAML_VERSION_REVISION)\r
+\r
+#endif /* __saml_version_h__ */\r