Commit 893aadae authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh

Add 'cameo-api-cpp/' from commit '2525b652'

git-subtree-dir: cameo-api-cpp
git-subtree-mainline: cf55f805
git-subtree-split: 2525b652
parents cf55f805 2525b652
This diff is collapsed.
/autom4te.cache/
/build/
/config/
/aclocal.m4
/configure
/INSTALL
/Makefile.in
/.settings/
/Debug/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>cameo-api-cpp</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/NomadModulesTest/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jaylib.plugins.cppchecker.cppCheckerBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.jaylib.plugins.cppchecker.cppCheckerNature</nature>
</natures>
</projectDescription>
This diff is collapsed.
0.3.0
-----
* Implemented timeout in Request. Refined the timeout possibilities in RequestSocketImpl.
0.2.2
-----
* Only one EventStreamSocket is created for a Server. An EventThread is forwarding the Event objects to the EventListener objects.
* The zmq sockets are kept alive and not created for each request.
0.2.1
-----
* Added access to the output stream of an application.
* Added Instance.getLastState() and Instance.getActualState() functions.
0.2.0
-----
* Migration to C++11.
0.1.4
-----
* Adapted to gcc 6.3.0.
0.1.3
-----
0.1.2
-----
* Enabled to define more than one requester on the same responder in one Application instance.
* Removed zmq.hpp as it should be installed.
* Corrected some memory leaks by changing the return type of tryRequestWithOnePartReply.
* Better follow the unmanaged applications.
0.1.0
-----
* Corrected Server::isAvailable implementation when timeout is set.
* Implemented connection checker by creating a ConnectionChecker class.
* Removed StateException, setRunning now returns a boolean.
* Added InvalidArgumentException to replace invalid_argument exception.
* Added SocketException thrown when the Server connect fails.
* Renamed ERROR into FAILURE.
* Implementation of unmanaged applications.
* Implemented This static instance without pointer so that it is not necessary to call This::terminate() except if the destruction of the static instance is not automatic.
* Added two binary parts message for publisher/subscriber and requester/responder.
* Refined internal requester port name by adding the responder id.
* Added connectToRequester function to Request.
\ No newline at end of file
This diff is collapsed.
SUBDIRS = src
PROTO_PATH=$(top_srcdir)/src/proto
proto:
protoc -I=$(PROTO_PATH) --cpp_out=$(PROTO_PATH) $(PROTO_PATH)/Messages.proto
Please read the README.md file.
\ No newline at end of file
#!/bin/sh
if [ ! -d config ]
then
mkdir config;
fi
libtoolize --force
aclocal -I config -I m4 --install
autoconf
automake --gnu --add-missing
if [ ! -d build ]
then
mkdir build;
fi
# -----------------------------------------------------------------------------
#
# Autoconf
#
# -----------------------------------------------------------------------------
AC_INIT(cameo-api-cpp, 0.3.0)
LIBRARY_VERSION=0:3:0
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/cameo/Application.cpp)
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CXX
AC_LANG(C++)
AM_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(LIBRARY_VERSION)
AX_CXX_COMPILE_STDCXX_11
AC_ZMQ
AC_PROTOBUF_LITE
CAMEO_CXXFLAGS="$ZMQ_CFLAGS \
$PROTOBUF_CFLAGS"
CAMEO_LDFLAGS="$ZMQ_LDFLAGS \
$PROTOBUF_LDFLAGS"
CAMEO_LIBS="$ZMQ_LIB \
$PROTOBUF_LIB"
AC_SUBST(CAMEO_CXXFLAGS)
AC_SUBST(CAMEO_LDFLAGS)
AC_SUBST(CAMEO_LIBS)
top_srcdir=.
AC_OUTPUT([
Makefile
src/Makefile
])
dnl
dnl AC_CXX_CLEAN_TEMPLATE_REPOSITORY
dnl
dnl Description
dnl
dnl Sometime failed C++ compiles can leave trash in the template repository.
dnl Just clean them all away.
dnl
dnl Copyright (C) 2003, Alex Tingle <alex.autoconf@firetree.net>
dnl
dnl License:
dnl GNU General Public License
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING.html]
dnl with this special exception
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING-Exception.html].
dnl
AC_DEFUN([AC_CXX_CLEAN_TEMPLATE_REPOSITORY],[
# Sometime failed C++ compiles can leave trash in the template repository.
# Just clean them all away.
rm -rf ./SunWS_cache # Solaris/CC
rm -rf ./.cxx_repository # Tru64/cxx
# ...add more here.
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
#
# DESCRIPTION
#
# Look for OpenSSL in a number of default spots, or in a user-selected
# spot (via --with-openssl). Sets
#
# OPENSSL_INCLUDES to the include directives required
# OPENSSL_LIBS to the -l directives required
# OPENSSL_LDFLAGS to the -L or -R flags required
#
# and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
#
# This macro sets OPENSSL_INCLUDES such that source files should use the
# openssl/ directory in include directives:
#
# #include <openssl/hmac.h>
#
# LICENSE
#
# Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
# Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
AC_DEFUN([AX_CHECK_OPENSSL], [
found=false
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl=DIR],
[root of the OpenSSL directory])],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([Invalid --with-openssl value])
;;
*) ssldirs="$withval"
;;
esac
], [
# if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
if test x"$PKG_CONFIG" != x""; then
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
if test $? = 0; then
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
found=true
fi
fi
# no such luck; use some default ssldirs
if ! $found; then
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
fi
]
)
# note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
# an 'openssl' subdirectory
if ! $found; then
OPENSSL_INCLUDES=
for ssldir in $ssldirs; do
AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L$ssldir/lib"
OPENSSL_LIBS="-lssl -lcrypto"
found=true
AC_MSG_RESULT([yes])
break
else
AC_MSG_RESULT([no])
fi
done
# if the file wasn't found, well, go ahead and try the link anyway -- maybe
# it will just work!
fi
# try the preprocessor and linker with our new flags,
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
save_CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
LIBS="$OPENSSL_LIBS $LIBS"
CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
[
AC_MSG_RESULT([yes])
$1
], [
AC_MSG_RESULT([no])
$2
])
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
AC_SUBST([OPENSSL_INCLUDES])
AC_SUBST([OPENSSL_LIBS])
AC_SUBST([OPENSSL_LDFLAGS])
])
This diff is collapsed.
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 18
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
This diff is collapsed.
###############################################################################
# Version 29/04/2019
# defines CAMEO_CFLAGS, CAMEO_LDFLAGS, CAMEO_LIBS
#
AC_DEFUN([AC_CAMEO],
[
AC_ARG_WITH([cameo],
AS_HELP_STRING([--with-cameo=PREFIX],[Specify cameo library location]),
[],
[with_cameo=yes])
AC_LIBZMQ
AC_LIBPROTOBUF_LITE
CAMEO_CFLAGS=
CAMEO_LIBS=
if test $with_cameo != no; then
if test $with_cameo != yes; then
cameo_possible_path="$with_cameo"
else
cameo_possible_path="/usr/local /usr /opt /var"
fi
AC_MSG_CHECKING([for cameo headers])
cameo_save_CXXFLAGS="$CXXFLAGS"
cameo_found=no
for cameo_path_tmp in $cameo_possible_path ; do
# test include
CXXFLAGS="$CXXFLAGS -I$cameo_path_tmp/include"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cameo/cameo.h>]],[[]])],
[CAMEO_CFLAGS="-I$cameo_path_tmp/include"
CAMEO_LIBS="-L$cameo_path_tmp/lib"
cameo_found=yes]
[])
CXXFLAGS="$cameo_save_CXXFLAGS"
if test $cameo_found = yes; then
break;
fi
done
AC_MSG_RESULT($cameo_found)
if test $cameo_found = yes; then
AC_MSG_CHECKING([for cameo -lcameo])
cameo_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $CAMEO_CFLAGS"
# search for library
LIBS="$LIBS $CAMEO_LIBS $LIBZMQ_LDFLAGS $LIBPROTOBUF_LDFLAGS $LIBZMQ_LIB $LIBPROTOBUF_LIB -lcameo"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[]])],
[ cameo_found=yes],
[ cameo_found=no])
CXXFLAGS="$cameo_save_CXXFLAGS"
LIBS="$cameo_save_LIBS"
if test $cameo_found = yes; then
HAVE_CAMEO=1
LIBS="$cameo_save_LIBS"
CAMEO_LDFLAGS="$LIBZMQ_LDFLAGS $LIBPROTOBUF_LDFLAGS $CAMEO_LIBS"
CAMEO_LIBS="-lcameo $LIBZMQ_LIB $LIBPROTOBUF_LIB -pthread"
fi
if test $cameo_found = yes; then
AC_MSG_RESULT(yes)
AC_SUBST(CAMEO_CFLAGS)
AC_SUBST(CAMEO_LDFLAGS)
AC_SUBST(CAMEO_LIBS)
else
AC_MSG_RESULT(no)
fi
fi
fi
])
###############################################################################
# Version 01/07/2015
# defines LIBPROTOBUF_LDFLAGS, LIBPROTOBUF_LIB
#
AC_DEFUN([AC_LIBPROTOBUF_LITE],
[
AC_ARG_WITH([protobuf],
AS_HELP_STRING([--with-protobuf=PREFIX],[Specify protobuf library location]),
[],
[with_protobuf=yes])
PROTOBUF_LIBS=
protobuf_save_LIBS="$LIBS"
if test $with_protobuf != no; then
if test $with_protobuf != yes; then
protobuf_possible_path="$with_protobuf"
else
protobuf_possible_path="/usr/local /usr /opt /var"
fi
AC_MSG_CHECKING([for protobuf -lprotobuf-lite])
protobuf_found=no
for protobuf_path_tmp in $protobuf_possible_path ; do
LIBS="$LIBS $PROTOBUF_LIBS -lprotobuf-lite"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[PROTOBUF_LIBS="-L$protobuf_path_tmp/lib"
protobuf_found=yes]
[])
if test $protobuf_found = yes; then
break;
fi
done
if test $protobuf_found = yes; then
LIBPROTOBUF_LDFLAGS="$PROTOBUF_LIBS"
LIBPROTOBUF_LIB="-lprotobuf-lite"
AC_MSG_RESULT(yes)
AC_SUBST(LIBPROTOBUF_LDFLAGS)
AC_SUBST(LIBPROTOBUF_LIB)
else
AC_MSG_RESULT(no)
fi
fi
LIBS="$protobuf_save_LIBS"
])
/usr/share/aclocal/libtool.m4
\ No newline at end of file
###############################################################################
# Version 01/07/2015
# defines LIBZMQ_LDFLAGS, LIBZMQ_LIB
#
AC_DEFUN([AC_LIBZMQ],
[
AC_ARG_WITH([zmq],
AS_HELP_STRING([--with-zmq=PREFIX],[Specify zeromq library location]),
[],
[with_zmq=yes])
ZEROMQ_LIBS=
zmq_save_LIBS="$LIBS"
if test $with_zmq != no; then
if test $with_zmq != yes; then
zeromq_possible_path="$with_zmq"
else
zeromq_possible_path="/usr/local /usr /opt /var"
fi
AC_MSG_CHECKING([for zeromq -lzmq])
zeromq_found=no
for zeromq_path_tmp in $zeromq_possible_path ; do
LIBS="$LIBS $ZEROMQ_LIBS -lzmq"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[ZEROMQ_LIBS="-L$zeromq_path_tmp/lib"
zeromq_found=yes]
[])
if test $zeromq_found = yes; then
break;
fi
done
if test $zeromq_found = yes; then
LIBZMQ_LDFLAGS="$ZEROMQ_LIBS"
LIBZMQ_LIB="-lzmq"
AC_MSG_RESULT(yes)
AC_SUBST(LIBZMQ_LDFLAGS)
AC_SUBST(LIBZMQ_LIB)
else
AC_MSG_RESULT(no)
fi
fi
LIBS="$zmq_save_LIBS"
])
/usr/share/aclocal/ltoptions.m4
\ No newline at end of file
/usr/share/aclocal/ltsugar.m4
\ No newline at end of file
/usr/share/aclocal/ltversion.m4
\ No newline at end of file
/usr/share/aclocal/lt~obsolete.m4
\ No newline at end of file
###############################################################################
# Version 01/07/2015
# defines PROTOBUF_CFLAGS, PROTOBUF_LDFLAGS, PROTOBUF_LIB
#
AC_DEFUN([AC_PROTOBUF_LITE],
[ AC_ARG_WITH([protobuf],