add a restcpp API backend

This commit offers an alternative to the dbus client to communicate with
a headless daemon. It uses restbed, a cpp framework for RESTful services.

This commits wraps up:
- The source of the restbed implementation (in bin/restcpp)
- The integration of the target to the configure.ac
- documentation
- Add external restbed library to contrib:
  - rules.mak file, to download the version 4.0, and compile it
  - Patch for ASIO, a dependency of restbed
  - Patch for the CMakeLists.txt file, to correct the installation path

[guillaume.roguez@savoirfairelinux.com: merged with Simon Zeni patch to support restbed into contrib]
[guillaume.roguez@savoirfairelinux.com: add tuleap ticket number]
[guillaume.roguez@savoirfairelinux.com: fixed configure.ac --without-restbed behavior]

Change-Id: Id49a1a04b05aac1e803981833abe5564785fb801
Tuleap: #498
Reviewed-by: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
This commit is contained in:
Guillaume Roguez
2016-08-25 22:14:32 -04:00
parent 15f6d17399
commit 09d7b43f79
14 changed files with 2671 additions and 30 deletions

View File

@ -286,12 +286,12 @@ if test "${SYS}" = "linux"; then
dnl Check for alsa development package - name: libasound2-dev
ALSA_MIN_VERSION=1.0
AC_ARG_WITH([alsa],
[AS_HELP_STRING([--without-alsa], [disable support for alsa])],
[],
[with_alsa=yes])
[AS_HELP_STRING([--without-alsa], [disable support for alsa])],
[],
[with_alsa=yes])
AS_IF([test "x$with_alsa" = "xyes"], [
PKG_CHECK_MODULES(ALSA, alsa >= ${ALSA_MIN_VERSION},, AC_MSG_ERROR([Missing alsa development files]))
]);
]);
AC_DEFINE_UNQUOTED([HAVE_ALSA], `if test "x$with_alsa" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have alsa])
fi
@ -386,6 +386,20 @@ AS_IF([test "x$with_dbus" = "xyes"], [
AM_CONDITIONAL(RING_DBUS, true)],
AM_CONDITIONAL(RING_DBUS, false));
# Rest C++ with restbed
AC_ARG_WITH([restcpp],
AS_HELP_STRING([--with-restcpp], [enable rest support with C++]))
AS_IF([test "x$with_restcpp" = "xyes"], [
PKG_CHECK_MODULES(RESTBED, librestbed,, AC_MSG_WARN([Missing restbed files]))
AS_AC_EXPAND(SBINDIR, $sbindir)
AC_SUBST(SBINDIR)
AC_CONFIG_FILES([bin/restcpp/Makefile])
AM_CONDITIONAL(RING_RESTCPP, true)],
AM_CONDITIONAL(RING_RESTCPP, false));
dnl Check for libav
PKG_CHECK_MODULES(LIBAVCODEC, libavcodec >= 53.5.0,, AC_MSG_ERROR([Missing libavcodec development files]))
@ -548,7 +562,7 @@ AS_IF([test "x$with_natpmp" != xno],
AC_DEFINE_UNQUOTED([HAVE_LIBNATPMP], `if test "x$with_natpmp" != xno; then echo 1; else echo 0; fi`, [Define if you have libnatpmp])
AC_DEFINE_UNQUOTED([HAVE_SHM], `if test -z "${HAVE_LINUX_TRUE}" && test -z "${HAVE_ANDROID_FALSE}" ; then echo 1; else echo 0; fi`,
[Define if you have shared memory support])
[Define if you have shared memory support])
# DOXYGEN
# required dependency(ies): doxygen