activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1005247 - in /activemq/activemq-cpp/trunk/activemq-c: ./ m4/ src/main/c/ src/main/c/types/
Date Wed, 06 Oct 2010 20:59:12 GMT
Author: tabish
Date: Wed Oct  6 20:59:11 2010
New Revision: 1005247

URL: http://svn.apache.org/viewvc?rev=1005247&view=rev
Log:
Renames some files and adds a skeleton for more of the C API.  Initial implementation for the ConnectionFactory API methods.

Added:
    activemq/activemq-cpp/trunk/activemq-c/activemqc-config.in
      - copied unchanged from r1004820, activemq/activemq-cpp/trunk/activemq-c/activemqc-1-config.in
    activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4   (with props)
    activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.cpp
      - copied, changed from r1004820, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.c
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.h
      - copied, changed from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.h
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.h
      - copied, changed from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnectionFactory.h
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.cpp
      - copied, changed from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.c
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.h
      - copied, changed from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h   (with props)
Removed:
    activemq/activemq-cpp/trunk/activemq-c/activemqc-1-config.in
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.c
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.h
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnectionFactory.h
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.c
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h
Modified:
    activemq/activemq-cpp/trunk/activemq-c/configure.ac
    activemq/activemq-cpp/trunk/activemq-c/pom.xml
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am

Modified: activemq/activemq-cpp/trunk/activemq-c/configure.ac
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/configure.ac?rev=1005247&r1=1005246&r2=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/configure.ac (original)
+++ activemq/activemq-cpp/trunk/activemq-c/configure.ac Wed Oct  6 20:59:11 2010
@@ -22,7 +22,7 @@ AC_PREREQ(2.61)
 ## -----------------------------------------------------------------------------
 AC_INIT(activemq-c, 1, dev@activemq.apache.org)
 AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_SRCDIR(src/main/c/ActiveMQConnection.c)
+AC_CONFIG_SRCDIR(src/main/c/cms.cpp)
 AC_CONFIG_MACRO_DIR([m4])
 
 ## -----------------------------------------------------------------------------
@@ -172,6 +172,10 @@ if test "$GCC" = "yes"; then
    PLAT_CXXFLAGS="-ansi -pedantic"
 fi
 
+## Find and configure the cflags and libs needed to build against the
+## ActiveMQ-CPP library.
+AMQ_CONFIGURE_ACTIVEMQCPP
+
 ## find and configure the Apache Decaf Library
 ## DECAF_CONFIGURE_DECAF - Future use for decaf as a standalone lib
 ## Flags for building the decaf cpp library
@@ -192,20 +196,20 @@ AC_SUBST([AMQ_CXXFLAGS])
 AC_SUBST([AMQ_LIBS])
 
 if test "$GCC" = "yes"; then
-   AMQ_CXXFLAGS="$PLAT_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -W -Wall -Wextra -Wconversion -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long"
+   AMQ_CXXFLAGS="$PLAT_CXXFLAGS $AMQCPP_INCLUDES $AMQCPP_CPPFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -W -Wall -Wextra -Wconversion -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long"
 else
-   AMQ_CXXFLAGS="$PLAT_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -PIC"
+   AMQ_CXXFLAGS="$PLAT_CXXFLAGS $AMQCPP_INCLUDES $AMQCPP_CPPFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -PIC"
 fi
 
-AMQ_LIBS="$PLAT_LIBS $DECAF_LIBS"
+AMQ_LIBS="$PLAT_LIBS $AMQCPP_LIBS $DECAF_LIBS"
 
 if test "$GCC" = "yes"; then
-   AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized"
+   AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $AMQCPP_INCLUDES $AMQCPP_CPPFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized"
 else
-   AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS"
+   AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $AMQCPP_INCLUDES $AMQCPP_CPPFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS"
 fi
 
-AMQ_TEST_LIBS="../main/libactivemq-c.la $DECAF_LIBS"
+AMQ_TEST_LIBS="../main/libactivemq-c.la $AMQCPP_LIBS $DECAF_LIBS"
 
 ## Flags for building the test applications.
 AC_SUBST([AMQ_TEST_CXXFLAGS])
@@ -235,12 +239,12 @@ DX_INIT_DOXYGEN(activemq-c, doxygen.cfg,
 ## Generates Makefile's, configuration files and scripts
 ## -----------------------------------------------------------------------------
 
-AC_OUTPUT_COMMANDS([chmod +x activemqc-1-config],[])
+AC_OUTPUT_COMMANDS([chmod +x activemqc-config],[])
 
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES(activemq-c.pc)
 AC_CONFIG_FILES(src/main/c/Makefile)
-AC_CONFIG_FILES(activemqc-1-config)
+AC_CONFIG_FILES(activemqc-config)
 
 if test x$cppunit = xyes
 then

Added: activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4 Wed Oct  6 20:59:11 2010
@@ -0,0 +1,93 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl
+dnl  This Macro File defines functions that help to manage the libraries
+dnl  dependance on the Apache Portable Runtime.
+dnl
+dnl  DECAF_CONFIGURE_APR()
+dnl
+dnl  Check configure options and assign variables related to
+dnl  the Apache Portable Runtime (APR) library.
+dnl
+
+AC_DEFUN([AMQ_CONFIGURE_ACTIVEMQCPP],
+[
+  AC_MSG_NOTICE([ActiveMQ-CPP library configuration])
+  AC_FIND_ACTIVEMQCPP([], [], 1, [3])
+
+  if test $amqcpp_found = "no"; then
+    AC_MSG_WARN([ActiveMQ-CPP not found])
+    AC_DOWNLOAD_ACTIVEMQCPP
+  fi
+
+  AMQCPP_VER_REGEXES=["3\.[3-9]\.[0-9] 3\.[3-9]\.1[0-9] "]
+
+  dnl check ActiveMQ-CPP version number against regex
+
+  AC_MSG_CHECKING([ActiveMQ-CPP version])
+  amqcpp_version="`$activemqcpp_config --version`"
+  if test $? -ne 0; then
+    AC_MSG_ERROR([activemqcpp_config --version failed])
+  fi
+  AC_MSG_RESULT([$amqcpp_version])
+
+  AMQCPP_WANTED_REGEX_MATCH=0
+  for amqcpp_wanted_regex in $AMQCPP_VER_REGEXES; do
+    if test `expr $amqcpp_version : $amqcpp_wanted_regex` -ne 0; then
+      AMQCPP_WANTED_REGEX_MATCH=1
+      break
+    fi
+  done
+
+  if test $AMQCPP_WANTED_REGEX_MATCH -eq 0; then
+    echo "wanted regexes are $AMQCPP_VER_REGEXES"
+    AC_MSG_ERROR([invalid activemq-cpp version found, check the README for supported versions.])
+  fi
+
+  dnl Get build information from ActiveMQ-CPP
+
+  AMQCPP_CPPFLAGS="`$activemqcpp_config --cflags`"
+  if test $? -ne 0; then
+    AC_MSG_ERROR([activemqcpp-config --cflags failed])
+  fi
+
+  AMQCPP_INCLUDES="`$activemqcpp_config --includes`"
+  if test $? -ne 0; then
+    AC_MSG_ERROR([activemqcpp-config --includes failed])
+  fi
+
+  AMQCPP_LIBS="`$activemqcpp_config --libs`"
+  if test $? -ne 0; then
+    AC_MSG_ERROR([activemqcpp-config --libs failed])
+  fi
+
+  AC_SUBST([AMQCPP_LIBS])
+  AC_SUBST([AMQCPP_CPPFLAGS])
+  AC_SUBST([AMQCPP_INCLUDES])
+
+])
+
+dnl DECAF_DOWNLOAD_APR()
+dnl no apr found, print out a message telling the user what to do
+AC_DEFUN([AC_DOWNLOAD_ACTIVEMQCPP],
+[
+  echo "The Apache ActiveMQ-CPP library cannot be found."
+  echo "Please install ActiveMQ-CPP on this system and supply the appropriate"
+  echo "--with-activemqcpp option to 'configure'"
+
+  AC_MSG_ERROR([no suitable ActiveMQ-CPP found])
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/amqcpp_tools.m4
------------------------------------------------------------------------------
    svn:executable = *

Added: activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4 Wed Oct  6 20:59:11 2010
@@ -0,0 +1,146 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl
+dnl find_decaf.m4 : locate the decaf include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the Decaf
+dnl library. It provides a standardized mechanism for using Decaf. It supports
+dnl embedding Decaf into the application source, or locating an installed
+dnl copy of Decaf.
+dnl
+dnl AC_FIND_ACTIVEMQCPP(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl
+dnl   where srcdir is the location of the bundled ActiveMQ-CPP source directory, or
+dnl   empty if source is not bundled.
+dnl
+dnl   where builddir is the location where the bundled ActiveMQ-CPP will will be built,
+dnl   or empty if the build will occur in the srcdir.
+dnl
+dnl   where implicit-install-check set to 1 indicates if there is no
+dnl   --with-decaf option specified, we will look for installed copies.
+dnl
+dnl   where acceptable-majors is a space separated list of acceptable major
+dnl   version numbers. Often only a single major version will be acceptable.
+dnl   If multiple versions are specified, and --with-decaf=PREFIX or the
+dnl   implicit installed search are used, then the first (leftmost) version
+dnl   in the list that is found will be used.  Currently defaults to [0 1].
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl   amqcpp_found : "yes", "no", "reconfig"
+dnl
+dnl   activemqcpp_config : If the activemqcpp-config tool exists, this refers to it. If
+dnl                        amqcpp_found is "reconfig", then the bundled directory
+dnl                        should be reconfigured *before* using activemqcpp_config.
+dnl
+dnl Note: this macro file assumes that activemqcpp_config has been installed; it
+dnl       is normally considered a required part of an ActiveMQ-CPP installation.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then amqcpp_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If amqcpp_found is "yes" or "reconfig", then the caller should use the
+dnl value of activemqcpp_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([AC_FIND_ACTIVEMQCPP], [
+  amqcpp_found="no"
+
+  if test "$target_os" = "os2-emx"; then
+    # Scripts don't pass test -x on OS/2
+    TEST_X="test -f"
+  else
+    TEST_X="test -x"
+  fi
+
+  ifelse([$4], [], [
+         ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to ActiveMQ-CPP 3.x then ActiveMQ-CPP 4.x]))
+         acceptable_majors="3 4"],
+         [acceptable_majors="$4"])
+
+  ac_temp_acceptable_amqcpp_config="activemqcpp-config"
+
+  AC_MSG_CHECKING(for ActiveMQ-CPP)
+  AC_ARG_WITH(activemqcpp,
+  [  --with-activemqcpp=PATH         prefix for installed ActiveMQ-CPP, path to ActiveMQ-CPP build tree,
+                                     or the full path to activemqcpp-config],
+  [
+    if test "$withval" = "no" || test "$withval" = "yes"; then
+      AC_MSG_ERROR([--with-activemqcpp requires a directory or file to be provided])
+    fi
+
+    for ac_temp_acceptable_amqcpp_config_file in $ac_temp_acceptable_amqcpp_config
+    do
+      for lookdir in "$withval/bin" "$withval"
+      do
+        if $TEST_X "$lookdir/$ac_temp_acceptable_amqcpp_config_file"; then
+          amqcpp_found="yes"
+          activemqcpp_config="$lookdir/$ac_temp_acceptable_amqcpp_config_file"
+          break 2
+        fi
+      done
+    done
+
+    if test "$amqcpp_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+      amqcpp_found="yes"
+      activemqcpp_config="$withval"
+    fi
+
+    dnl if --with-activemqcpp is used, it is a fatal error for its argument
+    dnl to be invalid
+    if test "$amqcpp_found" != "yes"; then
+      AC_MSG_ERROR([the --with-activemqcpp parameter is incorrect. It must specify an install prefix, a build directory, or an activemqcpp-config file.])
+    fi
+  ],[
+    dnl If we allow installed copies, check those before using bundled copy.
+    if test -n "$3" && test "$3" = "1"; then
+      for ac_temp_acceptable_amqcpp_config_file in $ac_temp_acceptable_amqcpp_config
+      do
+        if $ac_temp_acceptable_amqcpp_config_file --help > /dev/null 2>&1 ; then
+          amqcpp_found="yes"
+          activemqcpp_config="$ac_temp_acceptable_amqcpp_config_file"
+          break
+        else
+          dnl look in some standard places
+          for lookdir in /usr /usr/local /usr/local/activemq-cpp /opt/activemq-cpp; do
+            if $TEST_X "$lookdir/bin/$ac_temp_acceptable_amqcpp_config_file"; then
+              amqcpp_found="yes"
+              activemqcpp_config="$lookdir/bin/$ac_temp_acceptable_amqcpp_config_file"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$amqcpp_found" = "no" && test -d "$1"; then
+      amqcpp_temp_abs_srcdir="`cd $1 && pwd`"
+      amqcpp_found="reconfig"
+      ac_temp_acceptable_amqcpp_config_file="activemqcpp_config"
+
+      if test -n "$2"; then
+        activemqcpp_config="$2/$ac_temp_acceptable_amqcpp_config_file"
+      else
+        activemqcpp_config="$1/$ac_temp_acceptable_amqcpp_config_file"
+      fi
+    fi
+  ])
+
+  AC_MSG_RESULT($amqcpp_found)
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_activemqcpp.m4
------------------------------------------------------------------------------
    svn:executable = *

Modified: activemq/activemq-cpp/trunk/activemq-c/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/pom.xml?rev=1005247&r1=1005246&r2=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/pom.xml (original)
+++ activemq/activemq-cpp/trunk/activemq-c/pom.xml Wed Oct  6 20:59:11 2010
@@ -72,6 +72,7 @@
               <sources>
                 <directory>${basedir}/src/main/c</directory>
                 <includes>
+                  <includes>**\*.cpp</includes>
                   <includes>**\*.c</includes>
                 </includes>
               </sources>

Copied: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.cpp (from r1004820, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.c)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.cpp?p2=activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.cpp&p1=activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.c&r1=1004820&r2=1005247&rev=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.c (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.cpp Wed Oct  6 20:59:11 2010
@@ -15,15 +15,4 @@
  * limitations under the License.
  */
 
-#ifndef _ACTIVEMQCONNECTION_H_
-#define _ACTIVEMQCONNECTION_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _ACTIVEMQCONNECTION_H_ */
+#include <CMS_Connection.h>

Copied: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.h (from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.h)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.h?p2=activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.h&p1=activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.h&r1=1004821&r2=1005247&rev=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnection.h (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Connection.h Wed Oct  6 20:59:11 2010
@@ -15,8 +15,10 @@
  * limitations under the License.
  */
 
-#ifndef _ACTIVEMQCONNECTION_H_
-#define _ACTIVEMQCONNECTION_H_
+#include <cms.h>
+
+#ifndef _CMS_CONNECTION_WRAPPER_H_
+#define _CMS_CONNECTION_WRAPPER_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -26,4 +28,4 @@ extern "C" {
 }
 #endif
 
-#endif /* _ACTIVEMQCONNECTION_H_ */
+#endif /* _CMS_CONNECTION_WRAPPER_H_ */

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_ConnectionFactory.h>
+
+#include <Config.h>
+#include <types/CMS_Types.h>
+
+#include <activemq/core/ActiveMQConnectionFactory.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <memory>
+
+////////////////////////////////////////////////////////////////////////////////
+cms_status createDefaultConnectionFactory(CMS_ConnectionFactory** factory) {
+
+    cms_status result = CMS_SUCCESS;
+    std::auto_ptr<CMS_ConnectionFactory> wrapper( new CMS_ConnectionFactory );
+
+    try{
+        wrapper->factory = new activemq::core::ActiveMQConnectionFactory();
+        *factory = wrapper.release();
+    } catch(...) {
+        result = CMS_ERROR;
+    }
+
+    return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+cms_status createConnectionFactory(CMS_ConnectionFactory** factory,
+                                   const char* brokerUri,
+                                   const char* username,
+                                   const char* password) {
+
+    cms_status result = CMS_SUCCESS;
+    std::auto_ptr<CMS_ConnectionFactory> wrapper( new CMS_ConnectionFactory );
+
+    try{
+
+        if (brokerUri == NULL) {
+            wrapper->factory = new activemq::core::ActiveMQConnectionFactory();
+        } else {
+            wrapper->factory = new activemq::core::ActiveMQConnectionFactory( brokerUri, username, password );
+        }
+
+        *factory = wrapper.release();
+    } catch(...) {
+        result = CMS_ERROR;
+    }
+
+    return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+cms_status destroyConnectionFactory(CMS_ConnectionFactory* factory) {
+
+    cms_status result = CMS_SUCCESS;
+
+    if(factory != NULL) {
+
+        try{
+            delete factory->factory;
+            delete factory;
+        } catch(...) {
+            result = CMS_ERROR;
+        }
+    }
+
+    return result;
+}

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.h (from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnectionFactory.h)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.h?p2=activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.h&p1=activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnectionFactory.h&r1=1004821&r2=1005247&rev=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/ActiveMQConnectionFactory.h (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_ConnectionFactory.h Wed Oct  6 20:59:11 2010
@@ -15,15 +15,60 @@
  * limitations under the License.
  */
 
-#ifndef _ACTIVEMQCONNECTIONFACTORY_H_
-#define _ACTIVEMQCONNECTIONFACTORY_H_
+#include <cms.h>
+
+#ifndef _CMS_CONNECTIONFACTORY_WRAPPER_H_
+#define _CMS_CONNECTIONFACTORY_WRAPPER_H_
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/**
+ * Creates a Connection Factory using the Default URI and Connection options.
+ *
+ * @param factory
+ *      The memory address where the newly created ConnectionFactory will be stored.
+ *
+ * @returns result code indicating if the operation was successful.
+ */
+cms_status createDefaultConnectionFactory(CMS_ConnectionFactory** factory);
+
+/**
+ * Creates a Connection Factory using the options provided.  The URI option if null will
+ * use the default URI from the ConnectionFactory implementation and cause any username or
+ * password values to be ignored, the username and password can be NULL if none is needed
+ * to connect to the Broker.
+ *
+ * @param factory
+ *      The memory address where the newly created ConnectionFactory will be stored.
+ * @param brokerUri
+ *      The URI string describing the location and options used to connect to the broker.
+ * @param username
+ *      The user name that will be passed to the Broker for Authentication.
+ * @param password
+ *      The password that will be passed to the Broker for Authentication.
+ *
+ * @returns result code indicating if the operation was successful.
+ */
+cms_status createConnectionFactory(CMS_ConnectionFactory** factory,
+                                   const char* brokerUri,
+                                   const char* username,
+                                   const char* password);
+
+/**
+ * Any ConnectionFactory created from the C Wrapper library must be destroyed using this
+ * destroy method to ensure proper cleanup of allocated resources.
+ *
+ * @param factory
+ *      The ConnectionFactory instance to destroy.
+ *
+ * @returns result code indicating if the operation was successful.
+ */
+cms_status destroyConnectionFactory(CMS_ConnectionFactory* factory);
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* ACTIVEMQCONNECTIONFACTORY_H_ */
+#endif /* _CMS_CONNECTIONFACTORY_WRAPPER_H_ */

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_Destination.h>

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <cms.h>
+
+#ifndef _CMS_DESTINATION_WRAPPER_H_
+#define _CMS_DESTINATION_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CMS_DESTINATION_WRAPPER_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Destination.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_Message.h>

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <cms.h>
+
+#ifndef _CMS_MESSAGE_WRAPPER_H_
+#define _CMS_MESSAGE_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CMS_MESSAGE_WRAPPER_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Message.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_MessageConsumer.h>
+

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <cms.h>
+
+#ifndef _CMS_MESSAGECONSUMER_WRAPPER_H_
+#define _CMS_MESSAGECONSUMER_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CMS_MESSAGECONSUMER_WRAPPER_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageConsumer.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_MessageProducer.h>
+

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <cms.h>
+
+#ifndef _CMS_MESSAGEPRODUCER_WRAPPER_H_
+#define _CMS_MESSAGEPRODUCER_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CMS_MESSAGEPRODUCER_WRAPPER_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp Wed Oct  6 20:59:11 2010
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <CMS_Session.h>

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <cms.h>
+
+#ifndef _CMS_SESSION_WRAPPER_H_
+#define _CMS_SESSION_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CMS_SESSION_WRAPPER_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_Session.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+#ifdef AMQC_DLL
+ #ifdef AMQC_EXPORTS
+ #define AMQC_API __declspec(dllexport)
+ #else
+ #define AMQC_API __declspec(dllimport)
+ #endif
+#else
+ #if defined(__GNUC__) && __GNUC__ >= 4
+ #define AMQC_API __attribute__ ((visibility("default")))
+ #else
+ #define AMQC_API
+ #endif
+#endif
+
+//
+// The purpose of this header is to try to detect the supported headers
+// of the platform when the ./configure script is not being used to generate
+// the config.h file.
+//
+#if defined(HAVE_CONFIG_H)
+
+    // config.h is generated by the ./configure script and it only
+    // used by unix like systems (including cygwin)
+    #include <config.h>
+
+#else /* !defined(HAVE_CONFIG_H) */
+
+    // Not using ./configure script and make system.. chances are your using the native build tools
+    // of Windows or OS X to do this build
+
+    #if defined(_WIN32)
+        #ifndef HAVE_OBJBASE_H
+            #define HAVE_OBJBASE_H
+        #endif
+        #ifndef HAVE_RPCDCE_H
+            #define HAVE_RPCDCE_H
+        #endif
+        #ifndef HAVE_WINSOCK2_H
+            #define HAVE_WINSOCK2_H
+        #endif
+        #ifndef HAVE_STRUCT_ADDRINFO
+            #define HAVE_STRUCT_ADDRINFO
+        #endif
+        #ifndef HAVE_SYS_TIMEB_H
+            #define HAVE_SYS_TIMEB_H
+        #endif
+        #ifndef HAVE_FTIME
+            #define HAVE_FTIME
+        #endif
+        #ifndef HAVE_WINDOWS_H
+            #define HAVE_WINDOWS_H
+        #endif
+    #else
+        #ifndef HAVE_UUID_UUID_H
+            #define HAVE_UUID_UUID_H
+        #endif
+        #ifndef HAVE_UUID_T
+            #define HAVE_UUID_T
+        #endif
+        #ifndef HAVE_PTHREAD_H
+            #define HAVE_PTHREAD_H
+        #endif
+    #endif
+
+#endif /* !defined(HAVE_CONFIG_H) */
+
+// Macro to mark attributes as unused
+#ifdef __GNUC__
+   #define AMQC_UNUSED __attribute__ ((__unused__))
+#else
+   #define AMQC_UNUSED
+#endif
+
+
+#endif /* _CONFIG_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Config.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am?rev=1005247&r1=1005246&r2=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am Wed Oct  6 20:59:11 2010
@@ -16,14 +16,27 @@
 # ---------------------------------------------------------------------------
 
 cc_sources = \
-    ActiveMQConnection.c \
-    activemqc.c
+    CMS_Connection.cpp \
+    CMS_ConnectionFactory.cpp \
+    CMS_Destination.cpp \
+    CMS_Message.cpp \
+    CMS_MessageConsumer.cpp \
+    CMS_MessageProducer.cpp \
+    CMS_Session.cpp \
+    cms.cpp
 
 
 h_sources = \
-    ActiveMQConnection.h \
-    ActiveMQConnectionFactory.h \
-    activemqc.h
+    CMS_Connection.h \
+    CMS_ConnectionFactory.h \
+    CMS_Destination.h \
+    CMS_Message.h \
+    CMS_MessageConsumer.h \
+    CMS_MessageProducer.h \
+    CMS_Session.h \
+    Config.h \
+    cms.h \
+    types/CMS_Types.h
 
 
 ##

Copied: activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.cpp (from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.c)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.cpp?p2=activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.cpp&p1=activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.c&r1=1004821&r2=1005247&rev=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.c (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.cpp Wed Oct  6 20:59:11 2010
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-#include <activemqc.h>
+#include <cms.h>
 
 ////////////////////////////////////////////////////////////////////////////////
 void cms_initialize() {

Copied: activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.h (from r1004821, activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.h?p2=activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.h&p1=activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h&r1=1004821&r2=1005247&rev=1005247&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/cms.h Wed Oct  6 20:59:11 2010
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-#ifndef _ACTIVEMQC_H_
-#define _ACTIVEMQC_H_
+#ifndef _CMS_H_
+#define _CMS_H_
 
 #ifdef __cplusplus
 extern "C" {
-#endif /* __cplusplus */
+#endif
 
 /**
  * Types used throughout the C Wrapper lib are declared here, the actual definition
@@ -54,7 +54,7 @@ typedef struct CMS_Destination CMS_Desti
  */
 
 /** Enum that defines the various message types supported by CMS. */
-typedef enum {
+typedef enum MESSAGE_TYPE {
     CMS_MESSAGE,
     CMS_BYTES_MESSAGE,
     CMS_MAP_MESSAGE,
@@ -62,10 +62,26 @@ typedef enum {
     CMS_TEXT_MESSAGE
 };
 
+/** Enum that defines the various destination types that are supported by CMS. */
+typedef enum DESTINATION_TYPE {
+    CMS_TOPIC,
+    CMS_QUEUE,
+    CMS_TEMPORARY_TOPIC,
+    CMS_TEMPORARY_QUEUE
+};
+
 /** Result code returned from wrapper functions to indicate success or failure. */
 typedef int cms_status;
 
 /**
+ * CMS Wrapper Library Status Codes.  These should map in some way to the CMS
+ * Exception Types or the type of errors that some CMS API calls can encounter.
+ */
+
+#define CMS_SUCCESS       0
+#define CMS_ERROR         1
+
+/**
  * C Functions used to initialize and shutdown the ActiveMQ-C library.
  */
 
@@ -86,6 +102,6 @@ void cms_terminate();
 
 #ifdef __cplusplus
 }
-#endif /* __cplusplus */
+#endif
 
 #endif /* _ACTIVEMQC_H_ */

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h?rev=1005247&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h Wed Oct  6 20:59:11 2010
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#ifndef _CMS_TYPES_H_
+#define _CMS_TYPES_H_
+
+#include <cms.h>
+
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/MessageConsumer.h>
+#include <cms/MessageProducer.h>
+#include <cms/Message.h>
+#include <cms/Destination.h>
+
+/**
+ * Structure used to Wrap the CMS ConnectionFactory type.
+ */
+struct CMS_ConnectionFactory {
+    cms::ConnectionFactory* factory;
+};
+
+/**
+ * Structure used to Wrap the CMS Connection type.
+ */
+struct CMS_Connection {
+    cms::Connection* connection;
+};
+
+/**
+ * Structure used to Wrap the CMS Session type.
+ */
+struct CMS_Session {
+    cms::Session* session;
+};
+
+/**
+ * Structure used to Wrap the CMS Consumer type.
+ */
+struct CMS_MessageConsumer {
+    cms::MessageConsumer* consumer;
+};
+
+/**
+ * Structure used to Wrap the CMS Producer type.
+ */
+struct CMS_MessageProducer {
+    cms::MessageProducer* producer;
+};
+
+/**
+ * Structure used to Wrap the CMS Message type.
+ */
+struct CMS_Message {
+    cms::Message* message;
+    MESSAGE_TYPE type;
+};
+
+/**
+ * Structure used to Wrap the CMS Destination type.
+ */
+struct CMS_Destination {
+    cms::Destination* destination;
+    DESTINATION_TYPE type;
+};
+
+#endif /* _CMS_TYPES_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/types/CMS_Types.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message