Permalink
Browse files

Issue #58: FileMQ uses deprecated CZMQ API's

Problem: FileMQ is way out of date and is using a lot of deprecated
CZMQ API's. The original FileMQ was also the basis for the zproto
and zproject projects.

Solution: Recreate FileMQ based on the zproto and zproject.
  • Loading branch information...
danriegsecker committed Dec 10, 2014
1 parent 482797b commit e483aeb63cce0188071ba4f7f7eff50302acbc55
Showing with 7,972 additions and 9,432 deletions.
  1. +68 −25 .gitignore
  2. +6 −33 .travis.yml
  3. +157 −0 CMakeLists.txt
  4. +363 −0 LICENSE
  5. +35 −3 Makefile.am
  6. +16 −17 autogen.sh
  7. +30 −0 builds/android/Android.mk
  8. +32 −0 builds/mingw32/Makefile.mingw32
  9. +314 −0 builds/msvc/vs2008/filemq/filemq.vcproj
  10. +112 −0 builds/msvc/vs2010/filemq/filemq.vcxproj
  11. +86 −0 builds/msvc/vs2010/filemq/filemq.vcxproj.filters
  12. +112 −0 builds/msvc/vs2012/filemq/filemq.vcxproj
  13. +86 −0 builds/msvc/vs2012/filemq/filemq.vcxproj.filters
  14. +112 −0 builds/msvc/vs2013/filemq/filemq.vcxproj
  15. +86 −0 builds/msvc/vs2013/filemq/filemq.vcxproj.filters
  16. +288 −0 builds/qt-android/android_build_helper.sh
  17. +70 −0 builds/qt-android/build.sh
  18. +30 −0 builds/qt-android/ci_build.sh
  19. +15 −0 ci_build.sh
  20. +142 −97 configure.ac
  21. +17 −9 doc/Makefile.am
  22. +22 −15 doc/asciidoc.conf
  23. +8 −6 doc/filemq.txt
  24. +14 −0 doc/filemq_client.doc
  25. +26 −0 doc/filemq_client.txt
  26. +14 −0 doc/filemq_server.doc
  27. +26 −0 doc/filemq_server.txt
  28. +175 −0 doc/fmq_client.doc
  29. +150 −42 doc/fmq_client.txt
  30. +292 −0 doc/fmq_msg.doc
  31. +189 −246 doc/fmq_msg.txt
  32. +86 −0 doc/fmq_server.doc
  33. +71 −31 doc/fmq_server.txt
  34. +0 −128 doc/fmq_server_protocol.txt
  35. +0 −100 doc/mkman
  36. +5 −0 generate.sh
  37. +22 −0 include/filemq.h
  38. +68 −0 include/filemq_library.h
  39. +0 −55 include/fmq.h
  40. +55 −49 include/fmq_client.h
  41. +42 −244 include/fmq_msg.h
  42. +63 −48 include/fmq_server.h
  43. +9 −0 license.xml
  44. +78 −0 project.xml
  45. 0 src/{valgrind.supp → .valgrind.supp}
  46. +0 −35 src/Makefile.am
  47. +96 −0 src/Makemodule.am
  48. +0 −770 src/client_c.gsl
  49. +0 −657 src/client_java.gsl
  50. +0 −937 src/codec_java.gsl
  51. +0 −65 src/filemq.c
  52. +26 −0 src/filemq_classes.h
  53. +51 −0 src/filemq_client.c
  54. +47 −0 src/filemq_selftest.c
  55. +22 −0 src/filemq_server.c
  56. +447 −746 src/fmq_client.c
  57. +209 −204 src/fmq_client.xml
  58. +1,568 −0 src/fmq_client_engine.inc
  59. +0 −56 src/fmq_client_fsm.xml
  60. +0 −47 src/fmq_client_sub.xml
  61. +45 −46 src/fmq_msg.bnf
  62. +202 −1,022 src/fmq_msg.c
  63. +49 −36 src/fmq_msg.xml
  64. +0 −89 src/fmq_selftest.c
  65. +395 −864 src/fmq_server.c
  66. +113 −212 src/fmq_server.xml
  67. +1,070 −0 src/fmq_server_engine.inc
  68. +0 −59 src/fmq_server_fsm.xml
  69. +0 −165 src/fmq_server_mount.xml
  70. +0 −31 src/fmq_server_selftest.xml
  71. +0 −96 src/fmq_server_sub.xml
  72. +0 −21 src/graphs.gsl
  73. +23 −0 src/libfilemq.pc.in
  74. +0 −11 src/libfmq.pc.in
  75. +0 −22 src/library.gsl
  76. +0 −19 src/license.xml
  77. +0 −72 src/selftest
  78. +0 −793 src/server_c.gsl
  79. +0 −741 src/server_java.gsl
  80. +0 −26 src/server_test.cfg
  81. +0 −80 src/track.c
  82. +17 −8 version.sh
  83. +0 −11 win32/README
  84. +0 −26 win32/filemq.sln
  85. +0 −133 win32/filemq.vcxproj
  86. +0 −75 win32/filemq.vcxproj.filters
  87. +0 −109 win32/filemq_selftest.vcxproj
View
@@ -1,4 +1,47 @@
INSTALL
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
*.pc
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
filemq_selftest
filemq_server
filemq_client
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Man pages
doc/*.1
doc/*.3
doc/*.7
# autoconf files
.deps
.libs
*.log
*.trs
Makefile
Makefile.in
aclocal.m4
@@ -7,34 +50,34 @@ config.log
config.status
config/
configure
doc/Makefile
doc/Makefile.in
doc/filemq.1
doc/*.3
libtool
src/.deps/
src/Makefile
src/Makefile.in
src/libfmq.pc
src/platform.h
src/platform.h.in
src/platform.h.in~
src/stamp-h1
.libs/
*.o
*.lo
*.la
*.lst
track
core
fmq_selftest
src/fmqroot/send/*
src/fmqroot/recv/*
src/fmqroot/logs/*
.cache
mymusic
testit
src/fmq_selftest.log
src/fmq_selftest.trs
src/test-suite.log
src/.dirstamp
# qt-android build results
builds/qt-android/prefix
# Android - generated directories
src/app/bin/
src/app/gen/
src/app/obj/
src/app/local.properties
# Android -dependencies
builds/android/libsodium
builds/android/libzmq
builds/android/czmq
builds/android/e2fsprogs
builds/android/zyre
src/app/jni/output
# Additionals
*.swp
*.dirstamp
*.xml.swp
*.c.swp
*.h.swp
View
@@ -1,36 +1,9 @@
# FileMQ
# Travis CI script
language: c
# Build required ZeroMQ projects first
before_script:
# libsodium
- git clone git://github.com/jedisct1/libsodium.git
- cd libsodium
- ./autogen.sh
- ./configure && make check
- sudo make install
- sudo ldconfig
- cd ..
# libzmq
- git clone git://github.com/zeromq/libzmq.git
- cd libzmq
- ./autogen.sh
- ./configure && make check
- sudo make install
- sudo ldconfig
- cd ..
# CZMQ
- git clone git://github.com/zeromq/czmq.git
- cd czmq
- ./autogen.sh
- ./configure && make check
- sudo make install
- sudo ldconfig
- cd ..
env:
- BUILD_TYPE=default
- BUILD_TYPE=qt-android
# Build and check libfmq
script: ./autogen.sh && ./configure && make && make check
# Build and check this project according to the BUILD_TYPE
script: ./ci_build.sh
View
@@ -0,0 +1,157 @@
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
########################################################################
# Project setup
########################################################################
cmake_minimum_required(VERSION 2.8)
project(filemq)
enable_language(C)
enable_testing()
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
########################################################################
# determine version
########################################################################
foreach(which MAJOR MINOR PATCH)
file(STRINGS "${SOURCE_DIR}/include/filemq_library.h" FILEMQ_VERSION_STRING REGEX "#define FILEMQ_VERSION_${which}")
string(REGEX MATCH "#define FILEMQ_VERSION_${which} ([0-9_]+)" FILEMQ_REGEX_MATCH "${FILEMQ_VERSION_STRING}")
if (NOT FILEMQ_REGEX_MATCH)
message(FATAL_ERROR "failed to parse FILEMQ_VERSION_${which} from filemq.h")
endif()
set(FILEMQ_${which}_VERSION ${CMAKE_MATCH_1})
endforeach(which)
set(FILEMQ_VERSION ${FILEMQ_MAJOR_VERSION}.${FILEMQ_MINOR_VERSION}.${FILEMQ_PATCH_VERSION})
########################################################################
# platform.h
########################################################################
include(CheckIncludeFile)
CHECK_INCLUDE_FILE("linux/wireless.h" HAVE_LINUX_WIRELESS_H)
CHECK_INCLUDE_FILE("net/if_media.h" HAVE_NET_IF_MEDIA_H)
include(CheckFunctionExists)
CHECK_FUNCTION_EXISTS("getifaddrs" HAVE_GETIFADDRS)
CHECK_FUNCTION_EXISTS("freeifaddrs" HAVE_FREEIFADDRS)
include(CheckIncludeFiles)
check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H)
if (NOT HAVE_NET_IF_H)
CHECK_INCLUDE_FILE("net/if.h" HAVE_NET_IF_H)
endif()
file(WRITE ${BINARY_DIR}/platform.h.in "
#cmakedefine HAVE_LINUX_WIRELESS_H
#cmakedefine HAVE_NET_IF_H
#cmakedefine HAVE_NET_IF_MEDIA_H
#cmakedefine HAVE_GETIFADDRS
#cmakedefine HAVE_FREEIFADDRS
")
configure_file(${BINARY_DIR}/platform.h.in ${BINARY_DIR}/platform.h)
#The MSVC C compiler is too out of date,
#so the sources have to be compiled as c++
if (MSVC)
enable_language(CXX)
file(GLOB sources ${SOURCE_DIR}/src/*.c)
set_source_files_properties(${sources} PROPERTIES LANGUAGE CXX)
set(MORE_LIBRARIES ws2_32 Rpcrt4 Iphlpapi)
endif()
# required libraries for mingw
if (MINGW)
set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi)
endif()
list(APPEND CMAKE_MODULE_PATH ${SOURCE_DIR})
########################################################################
# ZMQ dependency
########################################################################
find_package(ZeroMQ REQUIRED)
include_directories(${ZEROMQ_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${ZEROMQ_LIBRARIES})
########################################################################
# CZMQ dependency
########################################################################
find_package(CZMQ REQUIRED)
include_directories(${CZMQ_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${CZMQ_LIBRARIES})
########################################################################
# includes
########################################################################
set (filemq_headers
include/filemq_library.h
include/filemq.h
include/fmq_msg.h
include/fmq_server.h
include/fmq_client.h
)
source_group ("Header Files" FILES ${filemq_headers})
install(FILES ${filemq_headers} DESTINATION include)
########################################################################
# library
########################################################################
include_directories(${BINARY_DIR})
include_directories(${SOURCE_DIR}/include)
set (filemq_sources
src/fmq_msg.c
src/fmq_server.c
src/fmq_client.c
)
source_group ("Source Files" FILES ${filemq_sources})
add_library(filemq SHARED ${filemq_sources})
set_target_properties(filemq PROPERTIES DEFINE_SYMBOL "LIBFILEMQ_EXPORTS")
target_link_libraries(filemq ${ZEROMQ_LIBRARIES} ${MORE_LIBRARIES})
install(TARGETS filemq
LIBRARY DESTINATION lib${LIB_SUFFIX} # .so file
ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
RUNTIME DESTINATION bin # .dll file
)
########################################################################
# pkgconfig
########################################################################
set(VERSION "${FILEMQ_VERSION}")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/lib${LIB_SUFFIX}")
set(includedir "\${prefix}/include")
configure_file(
${SOURCE_DIR}/src/libfilemq.pc.in
${BINARY_DIR}/libfilemq.pc
@ONLY)
install(
FILES ${BINARY_DIR}/libfilemq.pc
DESTINATION lib${LIB_SUFFIX}/pkgconfig
)
########################################################################
# tests
########################################################################
add_executable(filemq_selftest ${SOURCE_DIR}/src/filemq_selftest.c)
target_link_libraries(filemq_selftest filemq ${ZEROMQ_LIBRARIES})
add_test(filemq_selftest filemq_selftest)
########################################################################
# summary
########################################################################
message(STATUS "version: ${FILEMQ_VERSION}")
message(STATUS "install: ${CMAKE_INSTALL_PREFIX}")
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Please refer to the README for information about making permanent changes. #
################################################################################
Oops, something went wrong.

0 comments on commit e483aeb

Please sign in to comment.