├── .gitignore ├── .travis.yml ├── AUTHORS ├── CMakeLists.txt ├── Findczmq.cmake ├── Findlibsodium.cmake ├── Findlibzmq.cmake ├── INSTALL ├── LICENSE ├── Makefile.am ├── README.md ├── autogen.sh ├── bindings └── ruby │ ├── Rakefile │ ├── lib │ └── filemq │ │ ├── ffi.rb │ │ └── ffi │ │ └── version.rb │ └── spec │ ├── ffi_spec.rb │ └── spec_helper.rb ├── builds ├── android │ ├── Android.mk │ ├── android_build_helper.sh │ ├── build.sh │ └── ci_build.sh ├── cygwin │ └── Makefile.cygwin ├── mingw32 │ └── Makefile.mingw32 └── msvc │ ├── .gitignore │ ├── platform.h │ ├── properties │ ├── Common.props │ ├── DLL.props │ ├── Debug.props │ ├── DebugDEXE.props │ ├── DebugDLL.props │ ├── DebugLEXE.props │ ├── DebugLIB.props │ ├── DebugLTCG.props │ ├── DebugSEXE.props │ ├── EXE.props │ ├── LIB.props │ ├── LTCG.props │ ├── Link.props │ ├── Messages.props │ ├── Output.props │ ├── Release.props │ ├── ReleaseDEXE.props │ ├── ReleaseDLL.props │ ├── ReleaseLEXE.props │ ├── ReleaseLIB.props │ ├── ReleaseLTCG.props │ ├── ReleaseSEXE.props │ ├── Win32.props │ └── x64.props │ ├── resource.h │ ├── resource.rc │ ├── vs2008 │ └── filemq │ │ ├── filemq.sln │ │ └── filemq.vcproj │ ├── vs2010 │ ├── build.bat │ ├── czmq.import.props │ ├── filemq.import.props │ ├── filemq.sln │ ├── filemq │ │ ├── filemq.vcxproj │ │ └── filemq.vcxproj.filters │ ├── filemq_client │ │ ├── filemq_client.props │ │ └── filemq_client.vcxproj │ ├── filemq_selftest │ │ ├── filemq_selftest.props │ │ └── filemq_selftest.vcxproj │ ├── filemq_server │ │ ├── filemq_server.props │ │ └── filemq_server.vcxproj │ ├── libfilemq │ │ ├── libfilemq.import.xml │ │ ├── libfilemq.props │ │ ├── libfilemq.vcxproj │ │ └── libfilemq.vcxproj.filters │ └── libzmq.import.props │ ├── vs2012 │ ├── build.bat │ ├── czmq.import.props │ ├── filemq.import.props │ ├── filemq.sln │ ├── filemq │ │ ├── filemq.vcxproj │ │ └── filemq.vcxproj.filters │ ├── filemq_client │ │ ├── filemq_client.props │ │ └── filemq_client.vcxproj │ ├── filemq_selftest │ │ ├── filemq_selftest.props │ │ └── filemq_selftest.vcxproj │ ├── filemq_server │ │ ├── filemq_server.props │ │ └── filemq_server.vcxproj │ ├── libfilemq │ │ ├── libfilemq.import.xml │ │ ├── libfilemq.props │ │ ├── libfilemq.vcxproj │ │ └── libfilemq.vcxproj.filters │ └── libzmq.import.props │ ├── vs2013 │ ├── build.bat │ ├── czmq.import.props │ ├── filemq.import.props │ ├── filemq.sln │ ├── filemq │ │ ├── filemq.vcxproj │ │ └── filemq.vcxproj.filters │ ├── filemq_client │ │ ├── filemq_client.props │ │ └── filemq_client.vcxproj │ ├── filemq_selftest │ │ ├── filemq_selftest.props │ │ └── filemq_selftest.vcxproj │ ├── filemq_server │ │ ├── filemq_server.props │ │ └── filemq_server.vcxproj │ ├── libfilemq │ │ ├── libfilemq.import.xml │ │ ├── libfilemq.props │ │ ├── libfilemq.vcxproj │ │ └── libfilemq.vcxproj.filters │ └── libzmq.import.props │ └── vs2015 │ ├── build.bat │ ├── czmq.import.props │ ├── filemq.import.props │ ├── filemq.sln │ ├── filemq_client │ ├── filemq_client.props │ └── filemq_client.vcxproj │ ├── filemq_selftest │ ├── filemq_selftest.props │ └── filemq_selftest.vcxproj │ ├── filemq_server │ ├── filemq_server.props │ └── filemq_server.vcxproj │ ├── libfilemq │ ├── libfilemq.import.xml │ ├── libfilemq.props │ ├── libfilemq.vcxproj │ └── libfilemq.vcxproj.filters │ └── libzmq.import.props ├── ci_build.sh ├── configure.ac ├── doc ├── Makefile.am ├── asciidoc.conf ├── filemq.txt ├── filemq_client.doc ├── filemq_client.txt ├── filemq_server.doc ├── filemq_server.txt ├── fmq_client.doc ├── fmq_client.txt ├── fmq_msg.doc ├── fmq_msg.txt ├── fmq_server.doc ├── fmq_server.txt └── mkman ├── generate.sh ├── include ├── filemq.h ├── filemq_library.h ├── fmq_client.h ├── fmq_msg.h └── fmq_server.h ├── java ├── README.md ├── gen-filemq-jeromq.sh ├── model │ ├── fmq_client.xml │ ├── fmq_client_sub.xml │ ├── fmq_server.xml │ ├── fmq_server_mount.xml │ ├── fmq_server_selftest.xml │ ├── fmq_server_sub.xml │ ├── generate │ └── license.xml ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── filemq │ │ ├── Filemq.java │ │ ├── FmqChunk.java │ │ ├── FmqClient.java │ │ ├── FmqConfig.java │ │ ├── FmqDir.java │ │ ├── FmqFile.java │ │ ├── FmqHash.java │ │ ├── FmqMsg.java │ │ ├── FmqPatch.java │ │ ├── FmqSasl.java │ │ └── FmqServer.java │ └── test │ ├── java │ └── org │ │ └── filemq │ │ ├── TestFmqChunk.java │ │ ├── TestFmqClient.java │ │ ├── TestFmqConfig.java │ │ ├── TestFmqDir.java │ │ ├── TestFmqFile.java │ │ ├── TestFmqHash.java │ │ ├── TestFmqMsg.java │ │ ├── TestFmqSasl.java │ │ └── TestFmqServer.java │ └── resources │ ├── anonymous.cfg │ ├── client_test.cfg │ └── server_test.cfg ├── license.xml ├── packaging ├── debian │ ├── compat │ ├── control │ ├── filemq-dev.install │ ├── filemq.dsc │ ├── filemq.install │ ├── libfilemq2.install │ └── rules └── redhat │ └── filemq.spec ├── project.xml ├── src ├── .gitignore ├── .valgrind.supp ├── Makemodule.am ├── anonymous.cfg ├── client_test.cfg ├── filemq_classes.h ├── filemq_client.c ├── filemq_selftest.c ├── filemq_server.c ├── fmq_client.c ├── fmq_client.xml ├── fmq_client_engine.inc ├── fmq_msg.bnf ├── fmq_msg.c ├── fmq_msg.xml ├── fmq_server.c ├── fmq_server.xml ├── fmq_server_engine.inc ├── fmqroot │ └── README └── libfilemq.pc.in └── version.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Own created files 2 | src/.cache 3 | src/filemq.lst 4 | src/fmq_selftest 5 | src/fmq_sha.lst 6 | src/mymusic 7 | src/testit 8 | src/track 9 | 10 | # Object files 11 | *.o 12 | *.so 13 | *.ko 14 | *.pyc 15 | 16 | # Libraries 17 | *.lib 18 | *.a 19 | *.la 20 | *.pc 21 | *.dll.a 22 | 23 | # Shared objects (inc. Windows DLLs) 24 | *.dll 25 | *.so.* 26 | *.dylib 27 | *.lo 28 | 29 | # Executables 30 | src/filemq_selftest 31 | src/filemq_server 32 | src/filemq_client 33 | src/filemq_selftest 34 | *.exe 35 | *.out 36 | *.app 37 | core 38 | 39 | # Man pages 40 | doc/*.1 41 | doc/*.3 42 | doc/*.7 43 | 44 | # autoconf files 45 | .deps 46 | .libs 47 | *.log 48 | *.trs 49 | Makefile 50 | Makefile.in 51 | !builds/openwrt/Makefile 52 | aclocal.m4 53 | autom4te.cache/ 54 | config.log 55 | config.status 56 | config/ 57 | configure 58 | libtool 59 | src/platform.h 60 | src/platform.h.in 61 | src/platform.h.in~ 62 | src/stamp-h1 63 | src/test-suite.log 64 | src/.dirstamp 65 | 66 | # CMake cache 67 | CMakeCache.txt 68 | CMakeFiles/ 69 | CTestTestfile.cmake 70 | cmake_install.cmake 71 | install_manifest.txt 72 | Testing/ 73 | 74 | # Android build results 75 | builds/android/prefix 76 | 77 | # Android - generated directories 78 | src/app/bin/ 79 | src/app/gen/ 80 | src/app/obj/ 81 | src/app/local.properties 82 | 83 | # Android -dependencies 84 | src/app/jni/output 85 | 86 | # Temporary files 87 | *.swp 88 | *~ 89 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Travis CI script 2 | language: c 3 | 4 | env: 5 | - BUILD_TYPE=default 6 | - BUILD_TYPE=qt-android 7 | 8 | # Build and check this project according to the BUILD_TYPE 9 | script: ./ci_build.sh 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Maintainer 2 | ========== 3 | 4 | Pieter Hintjens 5 | -------------------------------------------------------------------------------- /Findczmq.cmake: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | if (NOT MSVC) 7 | include(FindPkgConfig) 8 | pkg_check_modules(PC_CZMQ "libczmq") 9 | if (NOT PC_CZMQ_FOUND) 10 | pkg_check_modules(PC_CZMQ "libczmq") 11 | endif (NOT PC_CZMQ_FOUND) 12 | if (PC_CZMQ_FOUND) 13 | # some libraries install the headers is a subdirectory of the include dir 14 | # returned by pkg-config, so use a wildcard match to improve chances of finding 15 | # headers and SOs. 16 | set(PC_CZMQ_INCLUDE_HINTS ${PC_CZMQ_INCLUDE_DIRS} ${PC_CZMQ_INCLUDE_DIRS}/*) 17 | set(PC_CZMQ_LIBRARY_HINTS ${PC_CZMQ_LIBRARY_DIRS} ${PC_CZMQ_LIBRARY_DIRS}/*) 18 | endif(PC_CZMQ_FOUND) 19 | endif (NOT MSVC) 20 | 21 | find_path ( 22 | CZMQ_INCLUDE_DIRS 23 | NAMES czmq.h 24 | HINTS ${PC_CZMQ_INCLUDE_HINTS} 25 | ) 26 | 27 | find_library ( 28 | CZMQ_LIBRARIES 29 | NAMES czmq 30 | HINTS ${PC_CZMQ_LIBRARY_HINTS} 31 | ) 32 | 33 | include(FindPackageHandleStandardArgs) 34 | 35 | find_package_handle_standard_args( 36 | CZMQ 37 | REQUIRED_VARS CZMQ_LIBRARIES CZMQ_INCLUDE_DIRS 38 | ) 39 | mark_as_advanced( 40 | CZMQ_FOUND 41 | CZMQ_LIBRARIES CZMQ_INCLUDE_DIRS 42 | ) 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /Findlibsodium.cmake: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | if (NOT MSVC) 7 | include(FindPkgConfig) 8 | pkg_check_modules(PC_LIBSODIUM "libsodium") 9 | if (NOT PC_LIBSODIUM_FOUND) 10 | pkg_check_modules(PC_LIBSODIUM "libsodium") 11 | endif (NOT PC_LIBSODIUM_FOUND) 12 | if (PC_LIBSODIUM_FOUND) 13 | # some libraries install the headers is a subdirectory of the include dir 14 | # returned by pkg-config, so use a wildcard match to improve chances of finding 15 | # headers and SOs. 16 | set(PC_LIBSODIUM_INCLUDE_HINTS ${PC_LIBSODIUM_INCLUDE_DIRS} ${PC_LIBSODIUM_INCLUDE_DIRS}/*) 17 | set(PC_LIBSODIUM_LIBRARY_HINTS ${PC_LIBSODIUM_LIBRARY_DIRS} ${PC_LIBSODIUM_LIBRARY_DIRS}/*) 18 | endif(PC_LIBSODIUM_FOUND) 19 | endif (NOT MSVC) 20 | 21 | find_path ( 22 | LIBSODIUM_INCLUDE_DIRS 23 | NAMES sodium.h 24 | HINTS ${PC_LIBSODIUM_INCLUDE_HINTS} 25 | ) 26 | 27 | find_library ( 28 | LIBSODIUM_LIBRARIES 29 | NAMES sodium 30 | HINTS ${PC_LIBSODIUM_LIBRARY_HINTS} 31 | ) 32 | 33 | include(FindPackageHandleStandardArgs) 34 | 35 | find_package_handle_standard_args( 36 | LIBSODIUM 37 | REQUIRED_VARS LIBSODIUM_LIBRARIES LIBSODIUM_INCLUDE_DIRS 38 | ) 39 | mark_as_advanced( 40 | LIBSODIUM_FOUND 41 | LIBSODIUM_LIBRARIES LIBSODIUM_INCLUDE_DIRS 42 | ) 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /Findlibzmq.cmake: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | if (NOT MSVC) 7 | include(FindPkgConfig) 8 | pkg_check_modules(PC_LIBZMQ "libzmq") 9 | if (NOT PC_LIBZMQ_FOUND) 10 | pkg_check_modules(PC_LIBZMQ "libzmq") 11 | endif (NOT PC_LIBZMQ_FOUND) 12 | if (PC_LIBZMQ_FOUND) 13 | # some libraries install the headers is a subdirectory of the include dir 14 | # returned by pkg-config, so use a wildcard match to improve chances of finding 15 | # headers and SOs. 16 | set(PC_LIBZMQ_INCLUDE_HINTS ${PC_LIBZMQ_INCLUDE_DIRS} ${PC_LIBZMQ_INCLUDE_DIRS}/*) 17 | set(PC_LIBZMQ_LIBRARY_HINTS ${PC_LIBZMQ_LIBRARY_DIRS} ${PC_LIBZMQ_LIBRARY_DIRS}/*) 18 | endif(PC_LIBZMQ_FOUND) 19 | endif (NOT MSVC) 20 | 21 | find_path ( 22 | LIBZMQ_INCLUDE_DIRS 23 | NAMES zmq.h 24 | HINTS ${PC_LIBZMQ_INCLUDE_HINTS} 25 | ) 26 | 27 | find_library ( 28 | LIBZMQ_LIBRARIES 29 | NAMES zmq 30 | HINTS ${PC_LIBZMQ_LIBRARY_HINTS} 31 | ) 32 | 33 | include(FindPackageHandleStandardArgs) 34 | 35 | find_package_handle_standard_args( 36 | LIBZMQ 37 | REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS 38 | ) 39 | mark_as_advanced( 40 | LIBZMQ_FOUND 41 | LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS 42 | ) 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | ACLOCAL_AMFLAGS = -I config 7 | 8 | AM_CFLAGS = \ 9 | -Werror=format-security 10 | 11 | 12 | AM_CPPFLAGS = \ 13 | ${libsodium_CFLAGS} \ 14 | ${libzmq_CFLAGS} \ 15 | ${czmq_CFLAGS} \ 16 | -I$(srcdir)/include 17 | 18 | project_libs = ${libsodium_LIBS} ${libzmq_LIBS} ${czmq_LIBS} 19 | 20 | SUBDIRS = doc 21 | DIST_SUBDIRS = doc 22 | lib_LTLIBRARIES = 23 | bin_PROGRAMS = 24 | noinst_PROGRAMS = 25 | check_PROGRAMS = 26 | noinst_LTLIBRARIES = 27 | TESTS = 28 | 29 | EXTRA_DIST = \ 30 | src/filemq_classes.h \ 31 | LICENSE \ 32 | README.md \ 33 | version.sh 34 | 35 | include $(srcdir)/src/Makemodule.am 36 | 37 | ################################################################################ 38 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 39 | # Please refer to the README for information about making permanent changes. # 40 | ################################################################################ 41 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | ################################################################################ 3 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4 | # Please refer to the README for information about making permanent changes. # 5 | ################################################################################ 6 | 7 | # Script to generate all required files from fresh git checkout. 8 | 9 | # Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize. 10 | command -v libtoolize >/dev/null 2>&1 11 | if [ $? -ne 0 ]; then 12 | command -v libtool >/dev/null 2>&1 13 | if [ $? -ne 0 ]; then 14 | echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 15 | exit 1 16 | fi 17 | fi 18 | 19 | command -v autoreconf >/dev/null 2>&1 20 | if [ $? -ne 0 ]; then 21 | echo "autogen.sh: error: could not find autoreconf. autoconf and automake are required to run autogen.sh." 1>&2 22 | exit 1 23 | fi 24 | 25 | command -v pkg-config >/dev/null 2>&1 26 | if [ $? -ne 0 ]; then 27 | echo "autogen.sh: error: could not find pkg-config. pkg-config is required to run autogen.sh." 1>&2 28 | exit 1 29 | fi 30 | 31 | mkdir -p ./config 32 | if [ $? -ne 0 ]; then 33 | echo "autogen.sh: error: could not create directory: ./config." 1>&2 34 | exit 1 35 | fi 36 | 37 | autoreconf --install --force --verbose -I config 38 | status=$? 39 | if [ $status -ne 0 ]; then 40 | echo "autogen.sh: error: autoreconf exited with status $status" 1>&2 41 | exit 1 42 | fi 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /bindings/ruby/Rakefile: -------------------------------------------------------------------------------- 1 | 2 | require 'rspec/core/rake_task' 3 | 4 | task :default => :test 5 | 6 | # Run tests. 7 | RSpec::Core::RakeTask.new :test do |c| 8 | end 9 | -------------------------------------------------------------------------------- /bindings/ruby/lib/filemq/ffi.rb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | require 'ffi' 7 | require_relative 'ffi/version' 8 | 9 | module Filemq 10 | module FFI 11 | module LibC 12 | extend ::FFI::Library 13 | ffi_lib ::FFI::Platform::LIBC 14 | attach_function :free, [ :pointer ], :void, blocking: true 15 | end 16 | 17 | extend ::FFI::Library 18 | 19 | def self.available? 20 | @available 21 | end 22 | 23 | begin 24 | lib_name = 'libfilemq' 25 | lib_paths = ['/usr/local/lib', '/opt/local/lib', '/usr/lib64'] 26 | .map { |path| "#{path}/#{lib_name}.#{::FFI::Platform::LIBSUFFIX}" } 27 | ffi_lib lib_paths + [lib_name] 28 | @available = true 29 | rescue LoadError 30 | warn "" 31 | warn "WARNING: ::Filemq::FFI is not available without libfilemq." 32 | warn "" 33 | @available = false 34 | end 35 | 36 | if available? 37 | opts = { 38 | blocking: true # only necessary on MRI to deal with the GIL. 39 | } 40 | end 41 | end 42 | end 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /bindings/ruby/lib/filemq/ffi/version.rb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | module Filemq 7 | module FFI 8 | VERSION = '2.0.0' 9 | end 10 | end 11 | 12 | ################################################################################ 13 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 14 | # Please refer to the README for information about making permanent changes. # 15 | ################################################################################ 16 | -------------------------------------------------------------------------------- /bindings/ruby/spec/ffi_spec.rb: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | require 'spec_helper' 7 | 8 | describe ::Filemq::FFI do 9 | it { should be } 10 | end 11 | 12 | ################################################################################ 13 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 14 | # Please refer to the README for information about making permanent changes. # 15 | ################################################################################ 16 | -------------------------------------------------------------------------------- /bindings/ruby/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | require 'filemq/ffi' 3 | 4 | RSpec.configure do |c| 5 | # Enable 'should' syntax 6 | c.expect_with(:rspec) { |c| c.syntax = [:should, :expect] } 7 | c.mock_with(:rspec) { |c| c.syntax = [:should, :expect] } 8 | end 9 | -------------------------------------------------------------------------------- /builds/android/Android.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | BASE_PATH := $(call my-dir) 7 | APP_PLATFORM = android-10 8 | 9 | LOCAL_PATH := $(BASE_PATH) 10 | 11 | # Info for libzmq 12 | 13 | include $(CLEAR_VARS) 14 | LOCAL_MODULE := zmq 15 | LOCAL_SRC_FILES := libzmq.so 16 | include $(PREBUILT_SHARED_LIBRARY) 17 | 18 | # Build filemq 19 | 20 | include $(CLEAR_VARS) 21 | LOCAL_MODULE := filemq 22 | LOCAL_C_INCLUDES := ../../include $(LIBZMQ)/include 23 | LOCAL_SRC_FILES := fmq_msg.c fmq_server.c fmq_client.c 24 | LOCAL_SHARED_LIBRARIES := zmq 25 | include $(BUILD_SHARED_LIBRARY) 26 | 27 | ################################################################################ 28 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 29 | # Please refer to the README for information about making permanent changes. # 30 | ################################################################################ 31 | -------------------------------------------------------------------------------- /builds/android/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ################################################################################ 3 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4 | # Please refer to the README for information about making permanent changes. # 5 | ################################################################################ 6 | 7 | # Use directory of current script as the build directory and working directory 8 | cd "$( dirname "${BASH_SOURCE[0]}" )" 9 | ANDROID_BUILD_DIR="$(pwd)" 10 | 11 | # Get access to android_build functions and variables 12 | source ${ANDROID_BUILD_DIR}/android_build_helper.sh 13 | 14 | # Choose a C++ standard library implementation from the ndk 15 | ANDROID_BUILD_CXXSTL="gnustl_shared_48" 16 | 17 | # Set up android build environment and set ANDROID_BUILD_OPTS array 18 | android_build_env 19 | android_build_opts 20 | 21 | # Use a temporary build directory 22 | cache="/tmp/android_build/${TOOLCHAIN_NAME}" 23 | rm -rf "${cache}" 24 | mkdir -p "${cache}" 25 | 26 | # Check for environment variable to clear the prefix and do a clean build 27 | if [[ $ANDROID_BUILD_CLEAN ]]; then 28 | echo "Doing a clean build (removing previous build and depedencies)..." 29 | rm -rf "${ANDROID_BUILD_PREFIX}"/* 30 | fi 31 | 32 | ## 33 | # Make sure czmq is built and copy the prefix 34 | 35 | (android_build_verify_so "libczmq.so" &> /dev/null) || { 36 | # Use a default value assuming the czmq project sits alongside this one 37 | test -z "$CZMQ_ROOT" && CZMQ_ROOT="$(cd ../../../czmq && pwd)" 38 | 39 | if [ ! -d "$CZMQ_ROOT" ]; then 40 | echo "The CZMQ_ROOT directory does not exist" 41 | echo " ${CZMQ_ROOT}" 42 | exit 1 43 | fi 44 | 45 | (bash ${CZMQ_ROOT}/builds/android/build.sh) || exit 1 46 | UPSTREAM_PREFIX=${CZMQ_ROOT}/builds/android/prefix/${TOOLCHAIN_NAME} 47 | cp -r ${UPSTREAM_PREFIX}/* ${ANDROID_BUILD_PREFIX} 48 | } 49 | 50 | ## 51 | # Build filemq from local source 52 | 53 | (android_build_verify_so "libfilemq.so" "libczmq.so" &> /dev/null) || { 54 | rm -rf "${cache}/filemq" 55 | (cp -r ../.. "${cache}/filemq" && cd "${cache}/filemq" \ 56 | && make clean && rm -f configure config.status) 57 | 58 | export LIBTOOL_EXTRA_LDFLAGS='-avoid-version' 59 | 60 | (cd "${cache}/filemq" && ./autogen.sh \ 61 | && ./configure "${ANDROID_BUILD_OPTS[@]}" --without-documentation \ 62 | && make -j 4 \ 63 | && make install) || exit 1 64 | } 65 | 66 | ## 67 | # Verify shared libraries in prefix 68 | 69 | android_build_verify_so "libczmq.so" 70 | android_build_verify_so "libfilemq.so" "libczmq.so" 71 | echo "Android build successful" 72 | ################################################################################ 73 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 74 | # Please refer to the README for information about making permanent changes. # 75 | ################################################################################ 76 | -------------------------------------------------------------------------------- /builds/android/ci_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ################################################################################ 3 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4 | # Please refer to the README for information about making permanent changes. # 5 | ################################################################################ 6 | 7 | NDK_VER=android-ndk-r10e 8 | NDK_ABI_VER=4.9 9 | 10 | if [ $TRAVIS_OS_NAME == "linux" ]; then 11 | NDK_PLATFORM=linux-x86_64 12 | elif [ $TRAVIS_OS_NAME == "osx" ]; then 13 | NDK_PLATFORM=darwin-x86_64 14 | else 15 | echo "Unsupported platform $TRAVIS_OS_NAME" 16 | exit 1 17 | fi 18 | 19 | export FILENAME=$NDK_VER-$NDK_PLATFORM.bin 20 | 21 | (cd '/tmp' \ 22 | && wget http://dl.google.com/android/ndk/$FILENAME \ 23 | && chmod a+x $FILENAME \ 24 | && ./$FILENAME &> /dev/null ) || exit 1 25 | unset FILENAME 26 | 27 | export ANDROID_NDK_ROOT="/tmp/$NDK_VER" 28 | export TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$NDK_ABI_VER/prebuilt/$NDK_PLATFORM/bin" 29 | export TOOLCHAIN_NAME="arm-linux-androideabi-$NDK_ABI_VER" 30 | export TOOLCHAIN_HOST="arm-linux-androideabi" 31 | export TOOLCHAIN_ARCH="arm" 32 | 33 | export LIBSODIUM_ROOT="/tmp/libsodium" 34 | git clone --depth 1 https://github.com/jedisct1/libsodium $LIBSODIUM_ROOT 35 | 36 | export LIBZMQ_ROOT="/tmp/libzmq" 37 | git clone --depth 1 https://github.com/zeromq/libzmq $LIBZMQ_ROOT 38 | 39 | export CZMQ_ROOT="/tmp/czmq" 40 | git clone --depth 1 https://github.com/zeromq/czmq $CZMQ_ROOT 41 | 42 | source ./build.sh 43 | 44 | ################################################################################ 45 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 46 | # Please refer to the README for information about making permanent changes. # 47 | ################################################################################ 48 | -------------------------------------------------------------------------------- /builds/cygwin/Makefile.cygwin: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | CC=gcc 7 | # replace the following with wherever you have installed libzmq 8 | PREFIX=/usr/local 9 | INCDIR=-I$(PREFIX)/include -I. 10 | LIBDIR=-L$(PREFIX)/lib 11 | CFLAGS=-Wall -Os -g -DLIBFILEMQ_EXPORTS $(INCDIR) 12 | 13 | OBJS = fmq_msg.o fmq_server.o fmq_client.o 14 | %.o: ../../src/%.c 15 | $(CC) -c -o $@ $< $(CFLAGS) 16 | 17 | all: libfilemq.dll filemq_selftest.exe 18 | 19 | libfilemq.dll: $(OBJS) 20 | $(CC) -shared -o $@ $(OBJS) -Wl,--out-implib,$@.a $(LIBDIR) -lzmq -luuid 21 | 22 | # the test functions are not exported into the DLL 23 | filemq_selftest.exe: filemq_selftest.o $(OBJS) 24 | $(CC) -o $@ $^ $(LIBDIR) -lzmq -luuid 25 | clean: 26 | del *.o *.a *.dll *.exe 27 | 28 | ################################################################################ 29 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 30 | # Please refer to the README for information about making permanent changes. # 31 | ################################################################################ 32 | -------------------------------------------------------------------------------- /builds/mingw32/Makefile.mingw32: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | CC=gcc 7 | # replace the following with wherever you have installed libzmq 8 | PREFIX=c:/mingw/msys/1.0/local 9 | INCDIR=-I$(PREFIX)/include -I. 10 | LIBDIR=-L$(PREFIX)/lib 11 | CFLAGS=-Wall -Os -g -DLIBFILEMQ_EXPORTS $(INCDIR) 12 | 13 | OBJS = fmq_msg.o fmq_server.o fmq_client.o 14 | %.o: ../../src/%.c 15 | $(CC) -c -o $@ $< $(CFLAGS) 16 | 17 | all: libfilemq.dll filemq_selftest.exe 18 | 19 | libfilemq.dll: $(OBJS) 20 | $(CC) -shared -o $@ $(OBJS) -Wl,--out-implib,$@.a $(LIBDIR) -lzmq -lws2_32 -liphlpapi -lrpcrt4 21 | 22 | # the test functions are not exported into the DLL 23 | filemq_selftest.exe: filemq_selftest.o $(OBJS) 24 | $(CC) -o $@ $^ $(LIBDIR) -lzmq -lws2_32 -liphlpapi -lrpcrt4 25 | 26 | clean: 27 | del *.o *.a *.dll *.exe 28 | 29 | ################################################################################ 30 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 31 | # Please refer to the README for information about making permanent changes. # 32 | ################################################################################ 33 | -------------------------------------------------------------------------------- /builds/msvc/.gitignore: -------------------------------------------------------------------------------- 1 | *.opensdf 2 | *.suo 3 | *.sdf 4 | *.user 5 | *.aps 6 | *.log 7 | ipch/ 8 | -------------------------------------------------------------------------------- /builds/msvc/platform.h: -------------------------------------------------------------------------------- 1 | 2 | /* ========================================================================= 3 | platform.h 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 | ################################################################################ 9 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 10 | # Please refer to the README for information about making permanent changes. # 11 | ################################################################################ 12 | ========================================================================= 13 | */ 14 | 15 | #ifndef __PLATFORM_H_INCLUDED__ 16 | #define __PLATFORM_H_INCLUDED__ 17 | 18 | #define FILEMQ_HAVE_WINDOWS 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Common.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Common Settings 6 | Unicode 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | true 16 | UNICODE;_UNICODE;%(PreprocessorDefinitions) 17 | Level3 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /builds/msvc/properties/DLL.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Dynamic Library 6 | dynamic 7 | .dll 8 | 9 | 10 | 11 | 12 | _DLL;_WINDLL;%(PreprocessorDefinitions) 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /builds/msvc/properties/Debug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Debug Settings 10 | Debug 11 | 12 | 13 | 14 | 15 | EnableFastChecks 16 | ProgramDatabase 17 | true 18 | Disabled 19 | _DEBUG;%(PreprocessorDefinitions) 20 | 21 | 22 | _DEBUG;%(PreprocessorDefinitions) 23 | 24 | 25 | true 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugDEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebugDLL 17 | true 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugDLL.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Dynamic Debug Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | MultiThreadedDebugDLL 16 | true 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugLEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugLIB.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Static Debug Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | OldStyle 16 | MultiThreadedDebug 17 | true 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugLTCG.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Static Debug Link Time Code Generation Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | OldStyle 16 | MultiThreadedDebug 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugSEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | true 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /builds/msvc/properties/EXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Application 6 | true 7 | 8 | 9 | 10 | 11 | _CONSOLE;%(PreprocessorDefinitions) 12 | 13 | 14 | Console 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /builds/msvc/properties/LIB.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Static Library 6 | static 7 | .lib 8 | 9 | 10 | 11 | 12 | _LIB;%(PreprocessorDefinitions) 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /builds/msvc/properties/LTCG.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Link Time Code Generation Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /builds/msvc/properties/Link.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Link Time Code Generation Settings 6 | ltcg 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | UseLinkTimeCodeGeneration 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /builds/msvc/properties/Messages.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Build Messages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /builds/msvc/properties/Output.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Output Settings 6 | 7 | $(ProjectDir)..\..\ 8 | $(ProjectDir)..\..\..\..\ 9 | $(ProjectDir)..\..\..\..\..\ 10 | $(ProjectDir)..\..\..\..\bin\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 11 | $(ProjectDir)..\..\..\..\obj\$(TargetName)\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 12 | $(OutDir) 13 | $(TargetName) 14 | $(TargetDir)$(TargetName)$(TargetExt) 15 | 16 | 17 | 18 | 19 | $(OutDir)$(TargetName).lib 20 | 21 | 22 | $(OutDir)$(TargetName).log 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /builds/msvc/properties/Release.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Release Settings 10 | Release 11 | false 12 | 13 | 14 | 15 | 16 | /Oy- %(AdditionalOptions) 17 | 18 | true 19 | true 20 | OnlyExplicitInline 21 | false 22 | MaxSpeed 23 | NDEBUG;%(PreprocessorDefinitions) 24 | 25 | 26 | NDEBUG;%(PreprocessorDefinitions) 27 | 28 | 29 | true 30 | 31 | true 32 | 33 | 34 | 35 | 36 | 37 | StreamingSIMDExtensions2 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseDEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDLL 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseDLL.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Dynamic Release Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | MultiThreadedDLL 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseLEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseLIB.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Static Release Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | MultiThreaded 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseLTCG.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Static Release Link Time Code Generation Library 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | MultiThreaded 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseSEXE.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Win32.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x86 Settings 6 | 7 | 8 | 9 | 10 | WIN32;_WIN32;%(PreprocessorDefinitions) 11 | 12 | 13 | MachineX86 14 | 15 | 16 | /MACHINE:X86 %(AdditionalOptions) 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/x64.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x64 Settings 6 | 7 | 8 | 9 | 10 | 13 | WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) 14 | 15 | 16 | MachineX64 17 | 18 | 19 | /MACHINE:X64 %(AdditionalOptions) 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /builds/msvc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /builds/msvc/resource.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "winres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (United States) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 20 | 21 | #ifdef APSTUDIO_INVOKED 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // 24 | // TEXTINCLUDE 25 | // 26 | 27 | 1 TEXTINCLUDE 28 | BEGIN 29 | "resource.h\0" 30 | END 31 | 32 | 2 TEXTINCLUDE 33 | BEGIN 34 | "#include ""winres.h""\r\n" 35 | "\0" 36 | END 37 | 38 | 3 TEXTINCLUDE 39 | BEGIN 40 | "\r\n" 41 | "\0" 42 | END 43 | 44 | #endif // APSTUDIO_INVOKED 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // 48 | // Version 49 | // 50 | 51 | VS_VERSION_INFO VERSIONINFO 52 | FILEVERSION 2,0,0,0 53 | PRODUCTVERSION 2,0,0,0 54 | FILEFLAGSMASK 0x3fL 55 | #ifdef _DEBUG 56 | FILEFLAGS 0x1L 57 | #else 58 | FILEFLAGS 0x0L 59 | #endif 60 | FILEOS 0x40004L 61 | FILETYPE 0x7L 62 | FILESUBTYPE 0x0L 63 | BEGIN 64 | BLOCK "StringFileInfo" 65 | BEGIN 66 | BLOCK "040904b0" 67 | BEGIN 68 | VALUE "CompanyName", "The AUTHORS" 69 | VALUE "FileDescription", "A FileMQ server and client" 70 | VALUE "FileVersion", "2.0.0.0" 71 | VALUE "InternalName", "filemq" 72 | VALUE "LegalCopyright", "Copyright (c) the Authors" 73 | VALUE "OriginalFilename", "libfilemq.dll" 74 | VALUE "ProductName", "filemq" 75 | VALUE "ProductVersion", "2.0.0.0" 76 | END 77 | END 78 | BLOCK "VarFileInfo" 79 | BEGIN 80 | VALUE "Translation", 0x409, 1200 81 | END 82 | END 83 | 84 | #endif // English (United States) resources 85 | ///////////////////////////////////////////////////////////////////////////// 86 | 87 | #ifndef APSTUDIO_INVOKED 88 | ///////////////////////////////////////////////////////////////////////////// 89 | // 90 | // Generated from the TEXTINCLUDE 3 resource. 91 | // 92 | 93 | ///////////////////////////////////////////////////////////////////////////// 94 | #endif // not APSTUDIO_INVOKED 95 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SET solution=filemq.sln 3 | SET version=10 4 | SET log=build.log 5 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 6 | SET environment="%programfiles(x86)%\%tools%" 7 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 8 | IF NOT EXIST %environment% GOTO no_tools 9 | 10 | ECHO Building %solution%... 11 | 12 | CALL %environment% x86 > nul 13 | ECHO Platform=x86 14 | 15 | ECHO Configuration=DynDebug 16 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log% 17 | IF errorlevel 1 GOTO error 18 | ECHO Configuration=DynRelease 19 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log% 20 | IF errorlevel 1 GOTO error 21 | ECHO Configuration=LtcgDebug 22 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log% 23 | IF errorlevel 1 GOTO error 24 | ECHO Configuration=LtcgRelease 25 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log% 26 | IF errorlevel 1 GOTO error 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | CALL %environment% x86_amd64 > nul 35 | ECHO Platform=x64 36 | 37 | ECHO Configuration=DynDebug 38 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% > %log% 39 | IF errorlevel 1 GOTO error 40 | ECHO Configuration=DynRelease 41 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log% 42 | IF errorlevel 1 GOTO error 43 | ECHO Configuration=LtcgDebug 44 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log% 45 | IF errorlevel 1 GOTO error 46 | ECHO Configuration=LtcgRelease 47 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log% 48 | IF errorlevel 1 GOTO error 49 | ECHO Configuration=StaticDebug 50 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 51 | IF errorlevel 1 GOTO error 52 | ECHO Configuration=StaticRelease 53 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 54 | IF errorlevel 1 GOTO error 55 | 56 | ECHO Complete: %solution% 57 | GOTO end 58 | 59 | :error 60 | ECHO *** ERROR, build terminated early: see %log% 61 | GOTO end 62 | 63 | :no_tools 64 | ECHO *** ERROR, build tools not found: %tools% 65 | 66 | :end 67 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/czmq.import.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>CZMQ Import Settings 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | $(ProjectDir)..\..\..\..\..\czmq\include\;%(AdditionalIncludeDirectories) 25 | LIBCZMQ_STATIC;%(PreprocessorDefinitions) 26 | 27 | 28 | libczmq.lib;%(AdditionalDependencies) 29 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 30 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 31 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/filemq/filemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | packaging 75 | 76 | 77 | packaging 78 | 79 | 80 | 86 | 87 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/filemq_client/filemq_client.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/filemq_selftest/filemq_selftest.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/filemq_server/filemq_server.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/libfilemq/libfilemq.import.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/libfilemq/libfilemq.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | 20 | copy $(BuildRoot)platform.h $(RepoRoot)include\ 21 | 22 | 23 | $(RepoRoot)include\;%(AdditionalIncludeDirectories) 24 | CompileAsCpp 25 | %(DisableSpecificWarnings) 26 | false 27 | _CRT_SECURE_NO_WARNINGS;BASE_THREADSAFE;%(PreprocessorDefinitions) 28 | LIBFILEMQ_STATIC;%(PreprocessorDefinitions) 29 | LIBFILEMQ_EXPORTS;%(PreprocessorDefinitions) 30 | 31 | 32 | Rpcrt4.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | dynamic 45 | dynamic 46 | 47 | 48 | ltcg 49 | ltcg 50 | 51 | 52 | static 53 | static 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/libfilemq/libfilemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | 80 | 81 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SET solution=filemq.sln 3 | SET version=11 4 | SET log=build.log 5 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 6 | SET environment="%programfiles(x86)%\%tools%" 7 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 8 | IF NOT EXIST %environment% GOTO no_tools 9 | 10 | ECHO Building %solution%... 11 | 12 | CALL %environment% x86 > nul 13 | ECHO Platform=x86 14 | 15 | ECHO Configuration=DynDebug 16 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log% 17 | IF errorlevel 1 GOTO error 18 | ECHO Configuration=DynRelease 19 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log% 20 | IF errorlevel 1 GOTO error 21 | ECHO Configuration=LtcgDebug 22 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log% 23 | IF errorlevel 1 GOTO error 24 | ECHO Configuration=LtcgRelease 25 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log% 26 | IF errorlevel 1 GOTO error 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | CALL %environment% x86_amd64 > nul 35 | ECHO Platform=x64 36 | 37 | ECHO Configuration=DynDebug 38 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% > %log% 39 | IF errorlevel 1 GOTO error 40 | ECHO Configuration=DynRelease 41 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log% 42 | IF errorlevel 1 GOTO error 43 | ECHO Configuration=LtcgDebug 44 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log% 45 | IF errorlevel 1 GOTO error 46 | ECHO Configuration=LtcgRelease 47 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log% 48 | IF errorlevel 1 GOTO error 49 | ECHO Configuration=StaticDebug 50 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 51 | IF errorlevel 1 GOTO error 52 | ECHO Configuration=StaticRelease 53 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 54 | IF errorlevel 1 GOTO error 55 | 56 | ECHO Complete: %solution% 57 | GOTO end 58 | 59 | :error 60 | ECHO *** ERROR, build terminated early: see %log% 61 | GOTO end 62 | 63 | :no_tools 64 | ECHO *** ERROR, build tools not found: %tools% 65 | 66 | :end 67 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/czmq.import.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>CZMQ Import Settings 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | $(ProjectDir)..\..\..\..\..\czmq\include\;%(AdditionalIncludeDirectories) 25 | LIBCZMQ_STATIC;%(PreprocessorDefinitions) 26 | 27 | 28 | libczmq.lib;%(AdditionalDependencies) 29 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 30 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 31 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/filemq/filemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | packaging 75 | 76 | 77 | packaging 78 | 79 | 80 | 86 | 87 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/filemq_client/filemq_client.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/filemq_selftest/filemq_selftest.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/filemq_server/filemq_server.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/libfilemq/libfilemq.import.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/libfilemq/libfilemq.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | 20 | copy $(BuildRoot)platform.h $(RepoRoot)include\ 21 | 22 | 23 | $(RepoRoot)include\;%(AdditionalIncludeDirectories) 24 | CompileAsCpp 25 | %(DisableSpecificWarnings) 26 | false 27 | _CRT_SECURE_NO_WARNINGS;BASE_THREADSAFE;%(PreprocessorDefinitions) 28 | LIBFILEMQ_STATIC;%(PreprocessorDefinitions) 29 | LIBFILEMQ_EXPORTS;%(PreprocessorDefinitions) 30 | 31 | 32 | Rpcrt4.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | dynamic 45 | dynamic 46 | 47 | 48 | ltcg 49 | ltcg 50 | 51 | 52 | static 53 | static 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/libfilemq/libfilemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | 80 | 81 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SET solution=filemq.sln 3 | SET version=12 4 | SET log=build.log 5 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 6 | SET environment="%programfiles(x86)%\%tools%" 7 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 8 | IF NOT EXIST %environment% GOTO no_tools 9 | 10 | ECHO Building %solution%... 11 | 12 | CALL %environment% x86 > nul 13 | ECHO Platform=x86 14 | 15 | ECHO Configuration=DynDebug 16 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log% 17 | IF errorlevel 1 GOTO error 18 | ECHO Configuration=DynRelease 19 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log% 20 | IF errorlevel 1 GOTO error 21 | ECHO Configuration=LtcgDebug 22 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log% 23 | IF errorlevel 1 GOTO error 24 | ECHO Configuration=LtcgRelease 25 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log% 26 | IF errorlevel 1 GOTO error 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | CALL %environment% x86_amd64 > nul 35 | ECHO Platform=x64 36 | 37 | ECHO Configuration=DynDebug 38 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% > %log% 39 | IF errorlevel 1 GOTO error 40 | ECHO Configuration=DynRelease 41 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log% 42 | IF errorlevel 1 GOTO error 43 | ECHO Configuration=LtcgDebug 44 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log% 45 | IF errorlevel 1 GOTO error 46 | ECHO Configuration=LtcgRelease 47 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log% 48 | IF errorlevel 1 GOTO error 49 | ECHO Configuration=StaticDebug 50 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 51 | IF errorlevel 1 GOTO error 52 | ECHO Configuration=StaticRelease 53 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 54 | IF errorlevel 1 GOTO error 55 | 56 | ECHO Complete: %solution% 57 | GOTO end 58 | 59 | :error 60 | ECHO *** ERROR, build terminated early: see %log% 61 | GOTO end 62 | 63 | :no_tools 64 | ECHO *** ERROR, build tools not found: %tools% 65 | 66 | :end 67 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/czmq.import.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>CZMQ Import Settings 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | $(ProjectDir)..\..\..\..\..\czmq\include\;%(AdditionalIncludeDirectories) 25 | LIBCZMQ_STATIC;%(PreprocessorDefinitions) 26 | 27 | 28 | libczmq.lib;%(AdditionalDependencies) 29 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 30 | $(ProjectDir)..\..\..\..\..\czmq\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-czmq)\;%(AdditionalLibraryDirectories) 31 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/filemq/filemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | packaging 75 | 76 | 77 | packaging 78 | 79 | 80 | 86 | 87 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/filemq_client/filemq_client.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/filemq_selftest/filemq_selftest.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/filemq_server/filemq_server.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/libfilemq/libfilemq.import.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/libfilemq/libfilemq.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | 20 | copy $(BuildRoot)platform.h $(RepoRoot)include\ 21 | 22 | 23 | $(RepoRoot)include\;%(AdditionalIncludeDirectories) 24 | CompileAsCpp 25 | %(DisableSpecificWarnings) 26 | false 27 | _CRT_SECURE_NO_WARNINGS;BASE_THREADSAFE;%(PreprocessorDefinitions) 28 | LIBFILEMQ_STATIC;%(PreprocessorDefinitions) 29 | LIBFILEMQ_EXPORTS;%(PreprocessorDefinitions) 30 | 31 | 32 | Rpcrt4.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | dynamic 45 | dynamic 46 | 47 | 48 | ltcg 49 | ltcg 50 | 51 | 52 | static 53 | static 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | -------------------------------------------------------------------------------- /builds/msvc/vs2013/libfilemq/libfilemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | 80 | 81 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SET solution=filemq.sln 3 | SET version=14 4 | SET log=build.log 5 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 6 | SET environment="%programfiles(x86)%\%tools%" 7 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 8 | IF NOT EXIST %environment% GOTO no_tools 9 | 10 | ECHO Building %solution%... 11 | 12 | CALL %environment% x86 > nul 13 | ECHO Platform=x86 14 | 15 | ECHO Configuration=DynDebug 16 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log% 17 | IF errorlevel 1 GOTO error 18 | ECHO Configuration=DynRelease 19 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log% 20 | IF errorlevel 1 GOTO error 21 | ECHO Configuration=LtcgDebug 22 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log% 23 | IF errorlevel 1 GOTO error 24 | ECHO Configuration=LtcgRelease 25 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log% 26 | IF errorlevel 1 GOTO error 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | CALL %environment% x86_amd64 > nul 35 | ECHO Platform=x64 36 | 37 | ECHO Configuration=DynDebug 38 | msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% > %log% 39 | IF errorlevel 1 GOTO error 40 | ECHO Configuration=DynRelease 41 | msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log% 42 | IF errorlevel 1 GOTO error 43 | ECHO Configuration=LtcgDebug 44 | msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log% 45 | IF errorlevel 1 GOTO error 46 | ECHO Configuration=LtcgRelease 47 | msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log% 48 | IF errorlevel 1 GOTO error 49 | ECHO Configuration=StaticDebug 50 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 51 | IF errorlevel 1 GOTO error 52 | ECHO Configuration=StaticRelease 53 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 54 | IF errorlevel 1 GOTO error 55 | 56 | ECHO Complete: %solution% 57 | GOTO end 58 | 59 | :error 60 | ECHO *** ERROR, build terminated early: see %log% 61 | GOTO end 62 | 63 | :no_tools 64 | ECHO *** ERROR, build tools not found: %tools% 65 | 66 | :end 67 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/filemq_client/filemq_client.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/filemq_selftest/filemq_selftest.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/filemq_server/filemq_server.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Self Test Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | %(DisableSpecificWarnings) 20 | false 21 | %(PreprocessorDefinitions) 22 | 23 | 24 | Iphlpapi.lib;Rpcrt4.lib;Ws2_32.lib;%(AdditionalDependencies) 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | dynamic 37 | dynamic 38 | dynamic 39 | 40 | 41 | ltcg 42 | ltcg 43 | ltcg 44 | 45 | 46 | static 47 | static 48 | static 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/libfilemq/libfilemq.import.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/libfilemq/libfilemq.props: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | <_PropertySheetDisplayName>filemq Common Settings 12 | AllRules.ruleset 13 | false 14 | 15 | 16 | 17 | 18 | 19 | 20 | copy $(BuildRoot)platform.h $(RepoRoot)include\ 21 | 22 | 23 | $(RepoRoot)include\;%(AdditionalIncludeDirectories) 24 | CompileAsCpp 25 | %(DisableSpecificWarnings) 26 | false 27 | _CRT_SECURE_NO_WARNINGS;BASE_THREADSAFE;%(PreprocessorDefinitions) 28 | LIBFILEMQ_STATIC;%(PreprocessorDefinitions) 29 | LIBFILEMQ_EXPORTS;%(PreprocessorDefinitions) 30 | 31 | 32 | Rpcrt4.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | dynamic 45 | dynamic 46 | 47 | 48 | ltcg 49 | ltcg 50 | 51 | 52 | static 53 | static 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | -------------------------------------------------------------------------------- /builds/msvc/vs2015/libfilemq/libfilemq.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | src 12 | 13 | 14 | src 15 | 16 | 17 | src 18 | 19 | 20 | 21 | 22 | include 23 | 24 | 25 | include 26 | 27 | 28 | 29 | 30 | src\include 31 | 32 | 33 | 34 | 35 | resource 36 | 37 | 38 | 39 | 40 | resource 41 | 42 | 43 | 44 | 45 | {48f852d3-9723-4499-bf1a-35c0234b8ba9} 46 | 47 | 48 | {95e5d24a-57a2-429a-a1f1-304165f2e3da} 49 | 50 | 51 | {d0c837b5-cb58-4b82-b9bf-38727c7b25bd} 52 | 53 | 54 | {48e93f8c-156c-4379-a901-4b5ad39a4eac} 55 | 56 | 57 | {04a473ca-1d88-4e12-9190-8d9cc20efd74} 58 | 59 | 60 | 61 | 62 | packaging 63 | 64 | 65 | packaging 66 | 67 | 68 | packaging 69 | 70 | 71 | packaging 72 | 73 | 74 | 80 | 81 | -------------------------------------------------------------------------------- /ci_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | if [ $BUILD_TYPE == "default" ]; then 6 | mkdir tmp 7 | BUILD_PREFIX=$PWD/tmp 8 | 9 | CONFIG_OPTS=() 10 | CONFIG_OPTS+=("CFLAGS=-I${BUILD_PREFIX}/include") 11 | CONFIG_OPTS+=("CPPFLAGS=-I${BUILD_PREFIX}/include") 12 | CONFIG_OPTS+=("CXXFLAGS=-I${BUILD_PREFIX}/include") 13 | CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib") 14 | CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig") 15 | CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}") 16 | 17 | # Clone and build dependencies 18 | git clone --depth 1 https://github.com/jedisct1/libsodium libsodium 19 | ( cd libsodium && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make check && make install ) || exit 1 20 | 21 | git clone --depth 1 https://github.com/zeromq/libzmq libzmq 22 | ( cd libzmq && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make check && make install ) || exit 1 23 | 24 | git clone --depth 1 https://github.com/zeromq/czmq czmq 25 | ( cd czmq && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make check && make install ) || exit 1 26 | 27 | # Build and check this project 28 | ( ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make check && make memcheck && make install ) || exit 1 29 | else 30 | cd ./builds/${BUILD_TYPE} && ./ci_build.sh 31 | fi 32 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | MAN1 = filemq_server.1 filemq_client.1 6 | MAN3 = fmq_msg.3 fmq_server.3 fmq_client.3 7 | MAN7 = filemq.7 8 | MAN_DOC = $(MAN1) $(MAN3) $(MAN7) 9 | 10 | MAN_TXT = $(MAN1:%.1=%.txt) 11 | MAN_TXT += $(MAN3:%.3=%.txt) 12 | MAN_TXT += $(MAN7:%.7=%.txt) 13 | 14 | EXTRA_DIST = asciidoc.conf $(MAN_TXT) 15 | 16 | if INSTALL_MAN 17 | dist_man_MANS = $(MAN_DOC) 18 | endif 19 | 20 | if BUILD_DOC 21 | MAINTAINERCLEANFILES = $(MAN_DOC) 22 | 23 | dist-hook : $(MAN_DOC) 24 | 25 | SUFFIXES=.txt .xml .1 .3 .7 26 | 27 | .txt.xml: 28 | asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \ 29 | -afilemq_version=@PACKAGE_VERSION@ -o$@ $< 30 | .xml.1: 31 | xmlto man $< 32 | .xml.3: 33 | xmlto man $< 34 | .xml.7: 35 | xmlto man $< 36 | 37 | fmq_msg.txt: 38 | ./mkman $@ 39 | fmq_server.txt: 40 | ./mkman $@ 41 | fmq_client.txt: 42 | ./mkman $@ 43 | filemq_server.txt: 44 | ./mkman $@ 45 | filemq_client.txt: 46 | ./mkman $@ 47 | clean: 48 | rm -f *.1 *.3 49 | ./mkman fmq_msg fmq_server fmq_client filemq_server filemq_client 50 | endif 51 | ################################################################################ 52 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 53 | # Please refer to the README for information about making permanent changes. # 54 | ################################################################################ 55 | -------------------------------------------------------------------------------- /doc/asciidoc.conf: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | [paradef-default] 6 | literal-style=template="literalparagraph" 7 | 8 | [macros] 9 | (?su)[\\]?(?Plinkfilemq):(?P\S*?)\[(?P.*?)\]= 10 | 11 | ifdef::backend-docbook[] 12 | [linkfilemq-inlinemacro] 13 | {0%{target}} 14 | {0#} 15 | {0#{target}{0}} 16 | {0#} 17 | endif::backend-docbook[] 18 | 19 | ifdef::backend-xhtml11[] 20 | [linkfilemq-inlinemacro] 21 | {target}{0?({0})} 22 | endif::backend-xhtml11[] 23 | 24 | ifdef::doctype-manpage[] 25 | ifdef::backend-docbook[] 26 | [header] 27 | template::[header-declarations] 28 | 29 | 30 | {mantitle} 31 | {manvolnum} 32 | Filemq 33 | {filemq_version} 34 | Filemq Manual 35 | 36 | 37 | {manname} 38 | {manpurpose} 39 | 40 | [footer] 41 | 42 | AUTHORS 43 | The filemq manual was written by the authors in the AUTHORS file. 44 | 45 | 46 | RESOURCES 47 | Main web site: 48 | Report bugs to the email <email@hostname.com> 49 | 50 | 51 | COPYRIGHT 52 | 53 | Copyright (c) the Contributors as noted in the AUTHORS file. 54 | This file is part of FileMQ, a C implemenation of the protocol: 55 | https://github.com/danriegsecker/filemq2. 56 | 57 | This Source Code Form is subject to the terms of the Mozilla Public 58 | License, v. 2.0. If a copy of the MPL was not distributed with this 59 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 60 | LICENSE included with the filemq distribution. 61 | 62 | 63 | endif::backend-docbook[] 64 | endif::doctype-manpage[] 65 | -------------------------------------------------------------------------------- /doc/filemq.txt: -------------------------------------------------------------------------------- 1 | Name(7) 2 | ======= 3 | 4 | 5 | NAME 6 | ---- 7 | filemq - An updated attempt at FileMQ. 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | ---- 13 | #include 14 | 15 | cc ['flags'] 'files' -lfilemq ['libraries'] 16 | ---- 17 | 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | Classes 23 | ~~~~~~~ 24 | 25 | Something. 26 | -------------------------------------------------------------------------------- /doc/filemq_client.doc: -------------------------------------------------------------------------------- 1 | #### filemq_client - no title found 2 | 3 | Please add @header section in ../src/filemq_client.c. 4 | 5 | Please add @discuss section in ../src/filemq_client.c. 6 | 7 | This is the class interface: 8 | 9 | Please add @interface section in ../src/filemq_client.c. 10 | 11 | This is the class self test code: 12 | 13 | Please add @selftest section in ../src/filemq_client.c. 14 | 15 | -------------------------------------------------------------------------------- /doc/filemq_client.txt: -------------------------------------------------------------------------------- 1 | filemq_client(1) 2 | ================ 3 | 4 | NAME 5 | ---- 6 | filemq_client - no title found 7 | 8 | SYNOPSIS 9 | -------- 10 | ---- 11 | Please add @interface section in ../src/filemq_client.c. 12 | ---- 13 | 14 | DESCRIPTION 15 | ----------- 16 | 17 | Please add @header section in ../src/filemq_client.c. 18 | 19 | Please add @discuss section in ../src/filemq_client.c. 20 | 21 | EXAMPLE 22 | ------- 23 | .From filemq_client_test method 24 | ---- 25 | Please add @selftest section in ../src/filemq_client.c. 26 | ---- 27 | -------------------------------------------------------------------------------- /doc/filemq_server.doc: -------------------------------------------------------------------------------- 1 | #### filemq_server - no title found 2 | 3 | Please add @header section in ../src/filemq_server.c. 4 | 5 | Please add @discuss section in ../src/filemq_server.c. 6 | 7 | This is the class interface: 8 | 9 | Please add @interface section in ../src/filemq_server.c. 10 | 11 | This is the class self test code: 12 | 13 | Please add @selftest section in ../src/filemq_server.c. 14 | 15 | -------------------------------------------------------------------------------- /doc/filemq_server.txt: -------------------------------------------------------------------------------- 1 | filemq_server(1) 2 | ================ 3 | 4 | NAME 5 | ---- 6 | filemq_server - no title found 7 | 8 | SYNOPSIS 9 | -------- 10 | ---- 11 | Please add @interface section in ../src/filemq_server.c. 12 | ---- 13 | 14 | DESCRIPTION 15 | ----------- 16 | 17 | Please add @header section in ../src/filemq_server.c. 18 | 19 | Please add @discuss section in ../src/filemq_server.c. 20 | 21 | EXAMPLE 22 | ------- 23 | .From filemq_server_test method 24 | ---- 25 | Please add @selftest section in ../src/filemq_server.c. 26 | ---- 27 | -------------------------------------------------------------------------------- /doc/fmq_server.doc: -------------------------------------------------------------------------------- 1 | #### fmq_server - fmq_server 2 | 3 | Server class implementation of FileMQ. 4 | 5 | This is the server side implementation of the FileMQ protocol. 6 | 7 | This is the class interface: 8 | 9 | // To work with fmq_server, use the CZMQ zactor API: 10 | // 11 | // Create new fmq_server instance, passing logging prefix: 12 | // 13 | // zactor_t *fmq_server = zactor_new (fmq_server, "myname"); 14 | // 15 | // Destroy fmq_server instance 16 | // 17 | // zactor_destroy (&fmq_server); 18 | // 19 | // Enable verbose logging of commands and activity: 20 | // 21 | // zstr_send (fmq_server, "VERBOSE"); 22 | // 23 | // Bind fmq_server to specified endpoint. TCP endpoints may specify 24 | // the port number as "*" to aquire an ephemeral port: 25 | // 26 | // zstr_sendx (fmq_server, "BIND", endpoint, NULL); 27 | // 28 | // Return assigned port number, specifically when BIND was done using an 29 | // an ephemeral port: 30 | // 31 | // zstr_sendx (fmq_server, "PORT", NULL); 32 | // char *command, *port_str; 33 | // zstr_recvx (fmq_server, &command, &port_str, NULL); 34 | // assert (streq (command, "PORT")); 35 | // 36 | // Specify configuration file to load, overwriting any previous loaded 37 | // configuration file or options: 38 | // 39 | // zstr_sendx (fmq_server, "CONFIGURE", filename, NULL); 40 | // 41 | // Set configuration path value: 42 | // 43 | // zstr_sendx (fmq_server, "SET", path, value, NULL); 44 | // 45 | // Send zmsg_t instance to fmq_server: 46 | // 47 | // zactor_send (fmq_server, &msg); 48 | // 49 | // Receive zmsg_t instance from fmq_server: 50 | // 51 | // zmsg_t *msg = zactor_recv (fmq_server); 52 | // 53 | // This is the fmq_server constructor as a zactor_fn: 54 | // 55 | void 56 | fmq_server (zsock_t *pipe, void *args); 57 | 58 | // Self test of this class 59 | void 60 | fmq_server_test (bool verbose); 61 | 62 | This is the class self test code: 63 | 64 | zactor_t *server = zactor_new (fmq_server, "server"); 65 | if (verbose) 66 | zstr_send (server, "VERBOSE"); 67 | zstr_sendx (server, "BIND", "ipc://@/fmq_server", NULL); 68 | 69 | zsock_t *client = zsock_new (ZMQ_DEALER); 70 | assert (client); 71 | zsock_set_rcvtimeo (client, 2000); 72 | zsock_connect (client, "ipc://@/fmq_server"); 73 | 74 | // TODO: fill this out 75 | fmq_msg_t *message = fmq_msg_new (); 76 | fmq_msg_set_id (message, FMQ_MSG_OHAI); 77 | fmq_msg_send (message, client); 78 | fmq_msg_recv (message, client); 79 | assert (fmq_msg_id (message) == FMQ_MSG_OHAI_OK); 80 | fmq_msg_set_id (message, FMQ_MSG_KTHXBAI); 81 | fmq_msg_send (message, client); 82 | fmq_msg_destroy (&message); 83 | 84 | zsock_destroy (&client); 85 | zactor_destroy (&server); 86 | 87 | -------------------------------------------------------------------------------- /doc/fmq_server.txt: -------------------------------------------------------------------------------- 1 | fmq_server(3) 2 | ============= 3 | 4 | NAME 5 | ---- 6 | fmq_server - fmq_server 7 | 8 | SYNOPSIS 9 | -------- 10 | ---- 11 | // To work with fmq_server, use the CZMQ zactor API: 12 | // 13 | // Create new fmq_server instance, passing logging prefix: 14 | // 15 | // zactor_t *fmq_server = zactor_new (fmq_server, "myname"); 16 | // 17 | // Destroy fmq_server instance 18 | // 19 | // zactor_destroy (&fmq_server); 20 | // 21 | // Enable verbose logging of commands and activity: 22 | // 23 | // zstr_send (fmq_server, "VERBOSE"); 24 | // 25 | // Bind fmq_server to specified endpoint. TCP endpoints may specify 26 | // the port number as "*" to aquire an ephemeral port: 27 | // 28 | // zstr_sendx (fmq_server, "BIND", endpoint, NULL); 29 | // 30 | // Return assigned port number, specifically when BIND was done using an 31 | // an ephemeral port: 32 | // 33 | // zstr_sendx (fmq_server, "PORT", NULL); 34 | // char *command, *port_str; 35 | // zstr_recvx (fmq_server, &command, &port_str, NULL); 36 | // assert (streq (command, "PORT")); 37 | // 38 | // Specify configuration file to load, overwriting any previous loaded 39 | // configuration file or options: 40 | // 41 | // zstr_sendx (fmq_server, "CONFIGURE", filename, NULL); 42 | // 43 | // Set configuration path value: 44 | // 45 | // zstr_sendx (fmq_server, "SET", path, value, NULL); 46 | // 47 | // Send zmsg_t instance to fmq_server: 48 | // 49 | // zactor_send (fmq_server, &msg); 50 | // 51 | // Receive zmsg_t instance from fmq_server: 52 | // 53 | // zmsg_t *msg = zactor_recv (fmq_server); 54 | // 55 | // This is the fmq_server constructor as a zactor_fn: 56 | // 57 | void 58 | fmq_server (zsock_t *pipe, void *args); 59 | 60 | // Self test of this class 61 | void 62 | fmq_server_test (bool verbose); 63 | ---- 64 | 65 | DESCRIPTION 66 | ----------- 67 | 68 | Server class implementation of FileMQ. 69 | 70 | This is the server side implementation of the FileMQ protocol. 71 | 72 | EXAMPLE 73 | ------- 74 | .From fmq_server_test method 75 | ---- 76 | zactor_t *server = zactor_new (fmq_server, "server"); 77 | if (verbose) 78 | zstr_send (server, "VERBOSE"); 79 | zstr_sendx (server, "BIND", "ipc://@/fmq_server", NULL); 80 | 81 | zsock_t *client = zsock_new (ZMQ_DEALER); 82 | assert (client); 83 | zsock_set_rcvtimeo (client, 2000); 84 | zsock_connect (client, "ipc://@/fmq_server"); 85 | 86 | // TODO: fill this out 87 | fmq_msg_t *message = fmq_msg_new (); 88 | fmq_msg_set_id (message, FMQ_MSG_OHAI); 89 | fmq_msg_send (message, client); 90 | fmq_msg_recv (message, client); 91 | assert (fmq_msg_id (message) == FMQ_MSG_OHAI_OK); 92 | fmq_msg_set_id (message, FMQ_MSG_KTHXBAI); 93 | fmq_msg_send (message, client); 94 | fmq_msg_destroy (&message); 95 | 96 | zsock_destroy (&client); 97 | zactor_destroy (&server); 98 | ---- 99 | -------------------------------------------------------------------------------- /generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | gsl project.xml 4 | 5 | chmod +x autogen.sh version.sh 6 | -------------------------------------------------------------------------------- /include/filemq.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | filemq - An updated attempt at FileMQ. 3 | 4 | Copyright (c) the Contributors as noted in the AUTHORS file. 5 | This file is part of FileMQ, a C implemenation of the protocol: 6 | https://github.com/danriegsecker/filemq2. 7 | 8 | This Source Code Form is subject to the terms of the Mozilla Public 9 | License, v. 2.0. If a copy of the MPL was not distributed with this 10 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | ========================================================================= 12 | */ 13 | 14 | #ifndef __FILEMQ_H_INCLUDED__ 15 | #define __FILEMQ_H_INCLUDED__ 16 | 17 | // Include the project library file 18 | #include "filemq_library.h" 19 | 20 | // Add your own public definitions here, if you need them 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/filemq_library.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | filemq - generated layer of public API 3 | 4 | Copyright (c) the Contributors as noted in the AUTHORS file. 5 | This file is part of FileMQ, a C implemenation of the protocol: 6 | https://github.com/danriegsecker/filemq2. 7 | 8 | This Source Code Form is subject to the terms of the Mozilla Public 9 | License, v. 2.0. If a copy of the MPL was not distributed with this 10 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | 12 | ################################################################################ 13 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 14 | # Please refer to the README for information about making permanent changes. # 15 | ################################################################################ 16 | ========================================================================= 17 | */ 18 | 19 | #ifndef FILEMQ_LIBRARY_H_INCLUDED 20 | #define FILEMQ_LIBRARY_H_INCLUDED 21 | 22 | // Set up environment for the application 23 | 24 | // External dependencies 25 | #include 26 | 27 | // FILEMQ version macros for compile-time API detection 28 | 29 | #define FILEMQ_VERSION_MAJOR 2 30 | #define FILEMQ_VERSION_MINOR 0 31 | #define FILEMQ_VERSION_PATCH 0 32 | 33 | #define FILEMQ_MAKE_VERSION(major, minor, patch) \ 34 | ((major) * 10000 + (minor) * 100 + (patch)) 35 | #define FILEMQ_VERSION \ 36 | FILEMQ_MAKE_VERSION(FILEMQ_VERSION_MAJOR, FILEMQ_VERSION_MINOR, FILEMQ_VERSION_PATCH) 37 | 38 | #if defined (__WINDOWS__) 39 | # if defined LIBFILEMQ_STATIC 40 | # define FILEMQ_EXPORT 41 | # elif defined LIBFILEMQ_EXPORTS 42 | # define FILEMQ_EXPORT __declspec(dllexport) 43 | # else 44 | # define FILEMQ_EXPORT __declspec(dllimport) 45 | # endif 46 | #else 47 | # define FILEMQ_EXPORT 48 | #endif 49 | 50 | // Opaque class structures to allow forward references 51 | 52 | // Draft APIs, excluded by default in stable releases 53 | //#define WITH_DRAFTS 54 | #ifdef WITH_DRAFTS 55 | typedef struct _fmq_msg_t fmq_msg_t; 56 | #define FMQ_MSG_T_DEFINED 57 | typedef struct _fmq_server_t fmq_server_t; 58 | #define FMQ_SERVER_T_DEFINED 59 | typedef struct _fmq_client_t fmq_client_t; 60 | #define FMQ_CLIENT_T_DEFINED 61 | #endif // WITH_DRAFTS 62 | 63 | // Public API classes 64 | 65 | // Draft APIs, excluded by default in stable releases 66 | #ifdef WITH_DRAFTS 67 | #include "fmq_msg.h" 68 | #include "fmq_server.h" 69 | #include "fmq_client.h" 70 | #endif // WITH_DRAFTS 71 | 72 | #endif 73 | /* 74 | ################################################################################ 75 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 76 | # Please refer to the README for information about making permanent changes. # 77 | ################################################################################ 78 | */ 79 | -------------------------------------------------------------------------------- /include/fmq_server.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | fmq_server - FileMQ Server 3 | 4 | ** WARNING ************************************************************* 5 | THIS SOURCE FILE IS 100% GENERATED. If you edit this file, you will lose 6 | your changes at the next build cycle. This is great for temporary printf 7 | statements. DO NOT MAKE ANY CHANGES YOU WISH TO KEEP. The correct places 8 | for commits are: 9 | 10 | * The XML model used for this code generation: fmq_server.xml, or 11 | * The code generation script that built this file: zproto_server_c 12 | ************************************************************************ 13 | Copyright (c) the Contributors as noted in the AUTHORS file. 14 | This file is part of FileMQ, a C implemenation of the protocol: 15 | https://github.com/danriegsecker/filemq2. 16 | 17 | This Source Code Form is subject to the terms of the Mozilla Public 18 | License, v. 2.0. If a copy of the MPL was not distributed with this 19 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 20 | ========================================================================= 21 | */ 22 | 23 | #ifndef FMQ_SERVER_H_INCLUDED 24 | #define FMQ_SERVER_H_INCLUDED 25 | 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | // @interface 33 | // To work with fmq_server, use the CZMQ zactor API: 34 | // 35 | // Create new fmq_server instance, passing logging prefix: 36 | // 37 | // zactor_t *fmq_server = zactor_new (fmq_server, "myname"); 38 | // 39 | // Destroy fmq_server instance 40 | // 41 | // zactor_destroy (&fmq_server); 42 | // 43 | // Enable verbose logging of commands and activity: 44 | // 45 | // zstr_send (fmq_server, "VERBOSE"); 46 | // 47 | // Bind fmq_server to specified endpoint. TCP endpoints may specify 48 | // the port number as "*" to aquire an ephemeral port: 49 | // 50 | // zstr_sendx (fmq_server, "BIND", endpoint, NULL); 51 | // 52 | // Return assigned port number, specifically when BIND was done using an 53 | // an ephemeral port: 54 | // 55 | // zstr_sendx (fmq_server, "PORT", NULL); 56 | // char *command, *port_str; 57 | // zstr_recvx (fmq_server, &command, &port_str, NULL); 58 | // assert (streq (command, "PORT")); 59 | // 60 | // Specify configuration file to load, overwriting any previous loaded 61 | // configuration file or options: 62 | // 63 | // zstr_sendx (fmq_server, "LOAD", filename, NULL); 64 | // 65 | // Set configuration path value: 66 | // 67 | // zstr_sendx (fmq_server, "SET", path, value, NULL); 68 | // 69 | // Save configuration data to config file on disk: 70 | // 71 | // zstr_sendx (fmq_server, "SAVE", filename, NULL); 72 | // 73 | // Send zmsg_t instance to fmq_server: 74 | // 75 | // zactor_send (fmq_server, &msg); 76 | // 77 | // Receive zmsg_t instance from fmq_server: 78 | // 79 | // zmsg_t *msg = zactor_recv (fmq_server); 80 | // 81 | // This is the fmq_server constructor as a zactor_fn: 82 | // 83 | FILEMQ_EXPORT void 84 | fmq_server (zsock_t *pipe, void *args); 85 | 86 | // Self test of this class 87 | FILEMQ_EXPORT void 88 | fmq_server_test (bool verbose); 89 | // @end 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /java/README.md: -------------------------------------------------------------------------------- 1 | # FileMQ implementation in Java 2 | 3 | ## How to use 4 | 5 | Add it to your Maven project's `pom.xml`: 6 | 7 | 8 | 9 | org.filemq 10 | filemq 11 | 0.1.0-SNAPSHOT 12 | 13 | 14 | 15 | 16 | org.filemq 17 | filemq-jeromq 18 | 0.1.0-SNAPSHOT 19 | 20 | -------------------------------------------------------------------------------- /java/gen-filemq-jeromq.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Generate FileMQ codes use JeroMQ" 4 | 5 | TARGET="jeromq" 6 | JZMQ_VERSION="1.1.0-SNAPSHOT" 7 | JEROMQ_VERSION="0.2.0" 8 | 9 | if [ ! -d $TARGET ]; then 10 | mkdir $TARGET 11 | fi 12 | 13 | if [ ! -d $TARGET/src/test/resources ]; then 14 | mkdir -p $TARGET/src/test/resources 15 | fi 16 | 17 | cp -f src/test/resources/* $TARGET/src/test/resources 18 | 19 | sed -e ' 20 | s/filemq<\/artifactId>/filemq-jeromq<\/artifactId>/ 21 | s/filemq<\/name>/filemq-jeromq<\/name>/ 22 | //,/<\/depencency>/ { 23 | /org.zeromq<\/groupId>/,/${JZMQ_VERSION}<\/version>/ { 24 | s/zeromq/jeromq/ 25 | s/jzmq/jeromq/ 26 | s/'"${JZMQ_VERSION}"'/'"${JEROMQ_VERSION}"'/ 27 | } 28 | }' pom.xml > $TARGET/pom.xml 29 | 30 | for j in `find ./src -name "*.java"`; do 31 | BASE=${j:2} 32 | FILE=${j##.*/} 33 | BASE=$TARGET/${BASE%/$FILE} 34 | mkdir -p $BASE 35 | sed -e ' 36 | s/org.zeromq.ZMQ/org.jeromq.ZMQ/g 37 | s/org.zeromq.ZContext/org.jeromq.ZContext/g 38 | s/org.zeromq.ZFrame/org.jeromq.ZFrame/g 39 | s/org.zeromq.ZMsg/org.jeromq.ZMsg/g 40 | s/org.zeromq.ZThread/org.jeromq.ZThread/g 41 | ' $j > $BASE/$FILE 42 | done 43 | 44 | echo "Done" 45 | -------------------------------------------------------------------------------- /java/model/fmq_client_sub.xml: -------------------------------------------------------------------------------- 1 | 2 | // Subscription in memory 3 | private static class Sub { 4 | private Client client; // Pointer to parent client 5 | private String inbox; // Inbox location 6 | private String path; // Path we subscribe to 7 | 8 | private Sub (Client client, String inbox, String path) 9 | { 10 | this.client = client; 11 | this.inbox = inbox; 12 | this.path = path; 13 | } 14 | 15 | private void destroy () 16 | { 17 | } 18 | 19 | // Return new cache object for subscription path 20 | 21 | private Map <String, String> cache () 22 | { 23 | // Get directory cache for this path 24 | FmqDir dir = FmqDir.newFmqDir (path.substring(1), inbox); 25 | if (dir != null) { 26 | Map <String, String> cache = dir.cache (); 27 | dir.destroy (); 28 | return cache; 29 | } 30 | return null; 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /java/model/fmq_server_selftest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | int port = self.bind ("tcp://*:5670"); 4 | assertEquals (port, 5670); 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | port = self.bind ("tcp://*:5670"); 15 | assertEquals (port, 5670); 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | port = self.bind ("tcp://*:5670"); 26 | assertEquals (port, 5670); 27 | 28 | 29 | 30 | request.setMechanism ("PLAIN"); 31 | request.setResponse (FmqSasl.plainEncode ("guest", "guest")); 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /java/model/fmq_server_sub.xml: -------------------------------------------------------------------------------- 1 | 2 | // -------------------------------------------------------------------------- 3 | // Subscription object 4 | 5 | private static class Sub { 6 | private Client client; // Always refers to live client 7 | private String path; // Path client is subscribed to 8 | private Map <String, String> cache; // Client's cache list 9 | 10 | // -------------------------------------------------------------------------- 11 | // Constructor 12 | 13 | private Sub (Client client, String path, Map <String, String> cache) 14 | { 15 | this.client = client; 16 | this.path = path; 17 | this.cache = new HashMap <String, String> (cache); 18 | resolveCachePath (this.cache, this); 19 | } 20 | 21 | // Cached filenames may be local, in which case prefix them with 22 | // the subscription path so we can do a consistent match. 23 | 24 | private static void resolveCachePath (Map <String, String> cache, Sub self) 25 | { 26 | for (String key : cache.keySet ()) { 27 | if (!key.startsWith ("/")) { 28 | String new_key = String.format ("%s/%s", self.path, key); 29 | cache.put (new_key, cache.remove (key)); 30 | } 31 | } 32 | } 33 | 34 | 35 | // -------------------------------------------------------------------------- 36 | // Destructor 37 | 38 | private void destroy () 39 | { 40 | } 41 | 42 | 43 | // -------------------------------------------------------------------------- 44 | // Add patch to sub client patches list 45 | 46 | private void addPatch (FmqPatch patch) 47 | { 48 | // Skip file creation if client already has identical file 49 | patch.setDigest (); 50 | if (patch.op () == FmqPatch.OP.patch_create) { 51 | String digest = cache.get (patch.virtual ()); 52 | if (digest != null && digest.compareToIgnoreCase (patch.digest ()) == 0) 53 | return; // Just skip patch for this client 54 | } 55 | // Remove any previous patches for the same file 56 | Iterator <FmqPatch> it = client.patches.iterator (); 57 | while (it.hasNext ()) { 58 | FmqPatch existing = it.next (); 59 | if (patch.virtual ().equals (existing.virtual ())) { 60 | it.remove (); 61 | existing.destroy (); 62 | break; 63 | } 64 | } 65 | // Track that we've queued patch for client, so we don't do it twice 66 | cache.put (patch.digest (), patch.virtual ()); 67 | client.patches.add (patch.dup ()); 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /java/model/generate: -------------------------------------------------------------------------------- 1 | export PATH=../../scripts:$PATH 2 | gsl -q -script:codec_java -package:filemq ../../model/fmq_msg.xml 3 | gsl -q -script:server_java -package:filemq -trace:0 -animate:0 fmq_server.xml 4 | gsl -q -script:client_java -package:filemq -trace:0 -animate:0 fmq_client.xml 5 | -------------------------------------------------------------------------------- /java/model/license.xml: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com 3 | Copyright other contributors as noted in the AUTHORS file. 4 | 5 | This file is part of FILEMQ, see http://filemq.org. 6 | 7 | This is free software; you can redistribute it and/or modify it under 8 | the terms of the GNU Lesser General Public License as published by the 9 | Free Software Foundation; either version 3 of the License, or (at your 10 | option) any later version. 11 | 12 | This software is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA- 14 | BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 15 | Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public License 18 | along with this program. If not, see http://www.gnu.org/licenses/. 19 | 20 | -------------------------------------------------------------------------------- /java/src/main/java/org/filemq/Filemq.java: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | filemq - FileMQ command-line service 3 | 4 | This version works just like the track command. I'll improve filemq to 5 | be a more general service over time. 6 | 7 | ------------------------------------------------------------------------- 8 | Copyright (c) 1991-2012 iMatix Corporation 9 | Copyright other contributors as noted in the AUTHORS file. 10 | 11 | This file is part of FILEMQ, see http://filemq.org. 12 | 13 | This is free software; you can redistribute it and/or modify it under 14 | the terms of the GNU Lesser General Public License as published by the 15 | Free Software Foundation; either version 3 of the License, or (at your 16 | option) any later version. 17 | 18 | This software is distributed in the hope that it will be useful, but 19 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA- 20 | BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 21 | Public License for more details. 22 | 23 | You should have received a copy of the GNU Lesser General Public License 24 | along with this program. If not, see . 25 | ========================================================================= 26 | */ 27 | 28 | package org.filemq; 29 | 30 | public class Filemq 31 | { 32 | private static final String PRODUCT = "FileMQ service/1.0a1"; 33 | private static final String COPYRIGHT = "Copyright (c) 2012 iMatix Corporation"; 34 | private static final String NOWARRANTY = 35 | "This is free software; see the source for copying conditions. There is NO\n" 36 | + "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" ; 37 | 38 | public static void main (String[] args) throws Exception 39 | { 40 | System.out.println (PRODUCT); 41 | System.out.println (COPYRIGHT); 42 | System.out.println (NOWARRANTY); 43 | 44 | if (args.length < 2) { 45 | System.out.println ("usage: filemq publish-from subscribe-into"); 46 | return; 47 | } 48 | FmqServer server = new FmqServer (); 49 | server.configure ("src/test/resources/anonymous.cfg"); 50 | server.publish (args [0], "/"); 51 | server.setAnonymous (1); 52 | server.bind ("tcp://*:5670"); 53 | 54 | FmqClient client = new FmqClient (); 55 | client.connect ("tcp://localhost:5670"); 56 | client.setInbox (args [1]); 57 | client.subscribe ("/"); 58 | 59 | while (!Thread.currentThread ().isInterrupted ()) 60 | Thread.sleep (1000); 61 | System.out.println ("interrupted"); 62 | 63 | server.destroy (); 64 | client.destroy (); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /java/src/main/java/org/filemq/FmqHash.java: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | fmq_hash - provides hashing functions (SHA-1 at present) 3 | 4 | ------------------------------------------------------------------------- 5 | Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com 6 | Copyright other contributors as noted in the AUTHORS file. 7 | 8 | This file is part of FILEMQ, see http://filemq.org. 9 | 10 | This is free software; you can redistribute it and/or modify it under 11 | the terms of the GNU Lesser General Public License as published by the 12 | Free Software Foundation; either version 3 of the License, or (at your 13 | option) any later version. 14 | 15 | This software is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA- 17 | BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 18 | Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with this program. If not, see http://www.gnu.org/licenses/. 22 | ========================================================================= 23 | */ 24 | 25 | package org.filemq; 26 | 27 | import java.security.MessageDigest; 28 | import java.security.NoSuchAlgorithmException; 29 | 30 | public class FmqHash 31 | { 32 | private MessageDigest digest; 33 | 34 | // -------------------------------------------------------------------------- 35 | // Constructor 36 | // Create new SHA object 37 | public FmqHash () 38 | { 39 | try { 40 | digest = MessageDigest.getInstance ("SHA-1"); 41 | } 42 | catch(NoSuchAlgorithmException e) { 43 | digest = null; 44 | } 45 | } 46 | 47 | // -------------------------------------------------------------------------- 48 | // Destroy a SHA object 49 | public void destroy () 50 | { 51 | } 52 | 53 | // -------------------------------------------------------------------------- 54 | // Add buffer into SHA calculation 55 | public void update (byte [] data, int size) 56 | { 57 | digest.update (data, 0, size); 58 | } 59 | 60 | // -------------------------------------------------------------------------- 61 | // Return final SHA hash data 62 | public byte [] data () 63 | { 64 | return digest.digest (); 65 | } 66 | 67 | // -------------------------------------------------------------------------- 68 | // Return final SHA hash size 69 | public int size () 70 | { 71 | return digest.getDigestLength (); 72 | } 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /java/src/main/java/org/filemq/FmqSasl.java: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | FmqSasl - work with SASL mechanisms 3 | 4 | ------------------------------------------------------------------------- 5 | Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com 6 | Copyright other contributors as noted in the AUTHORS file. 7 | 8 | This file is part of FILEMQ, see http://filemq.org. 9 | 10 | This is free software; you can redistribute it and/or modify it under 11 | the terms of the GNU Lesser General Public License as published by the 12 | Free Software Foundation; either version 3 of the License, or (at your 13 | option) any later version. 14 | 15 | This software is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA- 17 | BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 18 | Public License for more details. 19 | 20 | You should have received a copy of the GNU Lesser General Public License 21 | along with this program. If not, see http://www.gnu.org/licenses/. 22 | ========================================================================= 23 | */ 24 | package org.filemq; 25 | 26 | import org.zeromq.ZFrame; 27 | 28 | public class FmqSasl 29 | { 30 | 31 | // -------------------------------------------------------------------------- 32 | // Encode login and password as PLAIN response 33 | // 34 | // Formats a new authentication challenge for a PLAIN login. The protocol 35 | // uses a SASL-style binary data block for authentication. This method is 36 | // a simple way of turning a name and password into such a block. Note 37 | // that plain authentication data is not encrypted and does not provide 38 | // any degree of confidentiality. The SASL PLAIN mechanism is defined here: 39 | // http://www.ietf.org/internet-drafts/draft-ietf-sasl-plain-08.txt. 40 | public static ZFrame plainEncode (String login, String password) 41 | { 42 | // PLAIN format is [null]login[null]password 43 | ZFrame frame = new ZFrame (new byte [login.length () + password.length () + 2]); 44 | byte [] data = frame.getData (); 45 | int pos = 0; 46 | data [pos++] = 0; 47 | System.arraycopy (login.getBytes (), 0, data, pos, login.length ()); 48 | pos += login.length (); 49 | data [pos++] = 0; 50 | System.arraycopy (password.getBytes (), 0, data, pos, password.length ()); 51 | 52 | return frame; 53 | } 54 | 55 | // -------------------------------------------------------------------------- 56 | // Decode PLAIN response into new login and password 57 | 58 | public static boolean plainDecode (ZFrame frame, String [] idpw) 59 | { 60 | int size = frame.size (); 61 | byte [] data = frame.getData (); 62 | if (size < 2 || data [0] != 0 || idpw == null || idpw.length < 2) 63 | return false; 64 | 65 | int pos = 1; 66 | for (;pos < size; pos++) 67 | { 68 | if (data [pos] == 0) 69 | break; 70 | } 71 | if (pos < size) { 72 | byte [] login = new byte [pos - 1]; 73 | byte [] password = new byte [size - pos - 1]; 74 | System.arraycopy (data, 1, login, 0, login.length); 75 | System.arraycopy (data, pos + 1, password, 0, password.length); 76 | 77 | idpw [0] = new String (login); 78 | idpw [1] = new String (password); 79 | 80 | return true; 81 | } 82 | else 83 | return false; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqChunk.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import static org.junit.Assert.*; 4 | import org.junit.Test; 5 | 6 | public class TestFmqChunk 7 | { 8 | @Test 9 | public void testFmqChunk () 10 | { 11 | System.out.printf (" * fmq_chunk: "); 12 | 13 | FmqChunk chunk = new FmqChunk ("1234567890".getBytes (), 10); 14 | assertEquals (chunk.size (), 10); 15 | assertEquals (new String (chunk.data ()), "1234567890"); 16 | chunk.destroy (); 17 | 18 | System.out.printf ("OK\n"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqClient.java: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | TestFmqClient.java 3 | 4 | Generated class for FmqClient protocol client 5 | ------------------------------------------------------------------------- 6 | Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com 7 | Copyright other contributors as noted in the AUTHORS file. 8 | 9 | This file is part of FILEMQ, see http://filemq.org. 10 | 11 | This is free software; you can redistribute it and/or modify it under 12 | the terms of the GNU Lesser General Public License as published by the 13 | Free Software Foundation; either version 3 of the License, or (at your 14 | option) any later version. 15 | 16 | This software is distributed in the hope that it will be useful, but 17 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA- 18 | BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 19 | Public License for more details. 20 | 21 | You should have received a copy of the GNU Lesser General Public License 22 | along with this program. If not, see http://www.gnu.org/licenses/. 23 | ========================================================================= 24 | */ 25 | 26 | // -------------------------------------------------------------------------- 27 | // Selftest 28 | 29 | package org.filemq; 30 | 31 | import org.junit.Test; 32 | 33 | public class TestFmqClient 34 | { 35 | @Test 36 | public void testFmqClient () 37 | { 38 | System.out.printf (" * FmqClient: "); 39 | 40 | FmqClient self; 41 | // Run selftest using 'client_test.cfg' configuration 42 | self = new FmqClient (); 43 | assert (self != null); 44 | self.configure ("src/test/resources/client_test.cfg"); 45 | self.connect ("tcp://localhost:6001"); 46 | try { Thread.sleep (1000); } catch (Exception e) {} 47 | self.destroy (); 48 | 49 | System.out.printf ("OK\n"); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqConfig.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | public class TestFmqConfig 8 | { 9 | @Test 10 | public void testConfig () { 11 | System.out.printf (" * fmq_config: "); 12 | 13 | // @selftest 14 | // We create a config of this structure: 15 | // 16 | // root 17 | // type = zqueue 18 | // frontend 19 | // option 20 | // swap = 25000000 # 25MB 21 | // subscribe = #2 22 | // hwm = 1000 23 | // bind = tcp://*:5555 24 | // backend 25 | // bind = tcp://*:5556 26 | // 27 | FmqConfig 28 | root, 29 | type, 30 | frontend, 31 | option, 32 | hwm, 33 | swap, 34 | subscribe, 35 | bind, 36 | backend; 37 | 38 | // Left is first child, next is next sibling 39 | root = new FmqConfig ("root", null); 40 | type = new FmqConfig ("type", root); 41 | type.setValue ("zqueue"); 42 | frontend = new FmqConfig ("frontend", root); 43 | option = new FmqConfig ("option", frontend); 44 | swap = new FmqConfig ("swap", option); 45 | swap.setValue ("25000000"); 46 | subscribe = new FmqConfig ("subscribe", option); 47 | subscribe.formatValue ("#%d", 2); 48 | hwm = new FmqConfig ("hwm", option); 49 | hwm.setValue ("1000"); 50 | bind = new FmqConfig ("bind", frontend); 51 | bind.setValue ("tcp://*:5555"); 52 | backend = new FmqConfig ("backend", root); 53 | bind = new FmqConfig ("bind", backend); 54 | bind.setValue ("tcp://*:5556"); 55 | 56 | assertEquals (1000, Integer.parseInt (root.resolve ("frontend/option/hwm", "0"))); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqDir.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import static org.junit.Assert.*; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.junit.Test; 8 | 9 | public class TestFmqDir 10 | { 11 | @Test 12 | public void testFmqDir () 13 | { 14 | boolean verbose = false; 15 | System.out.printf (" * fmq_dir: "); 16 | 17 | FmqDir older = FmqDir.newFmqDir (".", null); 18 | assertNotNull (older); 19 | if (verbose) { 20 | System.out.printf ("\n"); 21 | older.dump (0); 22 | } 23 | FmqDir newer = FmqDir.newFmqDir ("..", null); 24 | List patches = FmqDir.diff (older, newer, "/"); 25 | assertNotNull (patches); 26 | for (FmqPatch patch : patches) { 27 | patch.destroy (); 28 | } 29 | older.destroy (); 30 | newer.destroy (); 31 | 32 | // Test directory cache calculation 33 | FmqDir here = FmqDir.newFmqDir (".", null); 34 | Map cache = here.cache (); 35 | assertNotNull (cache); 36 | here.destroy (); 37 | 38 | FmqDir nosuch = FmqDir.newFmqDir ("does-not-exist", null); 39 | assertNull (nosuch); 40 | 41 | System.out.printf ("OK\n"); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqFile.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import java.nio.ByteBuffer; 6 | 7 | import org.junit.Test; 8 | 9 | public class TestFmqFile 10 | { 11 | @Test 12 | public void testFmqFile () throws Exception 13 | { 14 | System.out.printf (" * fmq_file: "); 15 | 16 | FmqFile file = new FmqFile (".", "bilbo"); 17 | assertEquals (file.name ("."), "bilbo"); 18 | assertEquals (file.exists (), false); 19 | file.destroy (); 20 | 21 | // Create a test file in some random subdirectory 22 | file = new FmqFile ("./this/is/a/test", "bilbo"); 23 | boolean rc = file.output (); 24 | assertEquals (rc, true); 25 | FmqChunk chunk = new FmqChunk (null, 100); 26 | chunk.fill ((byte) 0, 100); 27 | // Write 100 bytes at position 1,000,000 in the file 28 | rc = file.write (chunk, 1000000); 29 | assertEquals (rc, true); 30 | file.close (); 31 | assertEquals (file.exists (), true); 32 | assertEquals (file.size (), 1000100); 33 | assertEquals (file.stable (), false); 34 | chunk.destroy (); 35 | Thread.sleep (1001); 36 | file.restat (); 37 | assertEquals (file.stable (), true); 38 | 39 | // Check we can read from file 40 | rc = file.input (); 41 | assertEquals (rc, true); 42 | chunk = file.read (1000100, 0); 43 | assertNotNull (chunk); 44 | 45 | assertEquals (chunk.size (), 1000100); 46 | chunk.destroy (); 47 | 48 | // Try some fun with symbolic links 49 | FmqFile link = new FmqFile ("./this/is/a/test", "bilbo.ln"); 50 | rc = link.output (); 51 | assertEquals (rc, true); 52 | link.handle ().write (ByteBuffer.wrap ("./this/is/a/test/bilbo\n".getBytes ())); 53 | link.destroy (); 54 | 55 | link = new FmqFile ("./this/is/a/test", "bilbo.ln"); 56 | rc = link.input (); 57 | assertEquals (rc, true); 58 | chunk = file.read (1000100, 0); 59 | assertNotNull (chunk); 60 | assertEquals (chunk.size (), 1000100); 61 | chunk.destroy (); 62 | link.destroy (); 63 | 64 | // Remove file and directory 65 | FmqDir dir = FmqDir.newFmqDir ("./this", null); 66 | assertEquals (dir.size (), 2000200); 67 | dir.remove (true); 68 | assertEquals (dir.size (), 0); 69 | dir.destroy (); 70 | 71 | // Check we can no longer read from file 72 | assertEquals (file.exists (), true); 73 | file.restat (); 74 | assertEquals (file.exists (), false); 75 | rc = file.input (); 76 | assertEquals (rc, false); 77 | file.destroy (); 78 | 79 | System.out.printf ("OK\n"); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqHash.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import java.util.Arrays; 4 | 5 | import org.junit.Test; 6 | import static org.junit.Assert.*; 7 | 8 | public class TestFmqHash 9 | { 10 | @Test 11 | public void testFmqHash () 12 | { 13 | System.out.printf (" * fmq_hash: "); 14 | 15 | byte [] buffer = new byte [1024]; 16 | Arrays.fill (buffer, (byte) 0xAA); 17 | 18 | FmqHash hash = new FmqHash (); 19 | hash.update (buffer, 1024); 20 | byte [] data = hash.data (); 21 | int size = hash.size (); 22 | assertEquals (size, 20); 23 | assertEquals (data [0], (byte) 0xDE); 24 | assertEquals (data [1], (byte) 0xB2); 25 | assertEquals (data [2], (byte) 0x38); 26 | assertEquals (data [3], (byte) 0x07); 27 | hash.destroy (); 28 | 29 | System.out.printf ("OK\n"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /java/src/test/java/org/filemq/TestFmqSasl.java: -------------------------------------------------------------------------------- 1 | package org.filemq; 2 | 3 | import static org.junit.Assert.*; 4 | import org.junit.Test; 5 | import org.zeromq.ZFrame; 6 | 7 | public class TestFmqSasl 8 | { 9 | @Test 10 | public void testFmqSasl () 11 | { 12 | System.out.printf (" * fmq_sasl: "); 13 | 14 | ZFrame frame = FmqSasl.plainEncode ("Happy", "Harry"); 15 | String [] result = new String [2]; 16 | String login, password; 17 | boolean rc = FmqSasl.plainDecode (frame, result); 18 | login = result [0]; 19 | password = result [1]; 20 | 21 | assertTrue (rc); 22 | assertEquals (login, "Happy"); 23 | assertEquals (password, "Harry"); 24 | frame.destroy (); 25 | 26 | System.out.printf ("OK\n"); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /java/src/test/resources/anonymous.cfg: -------------------------------------------------------------------------------- 1 | # Configure server to allow anonymous access 2 | # 3 | security 4 | echo = I: server accepts anonymous access 5 | anonymous = 1 6 | -------------------------------------------------------------------------------- /java/src/test/resources/client_test.cfg: -------------------------------------------------------------------------------- 1 | # Configure server for plain access 2 | # 3 | client 4 | heartbeat = 1 # Interval in seconds 5 | inbox = ./fmqroot/recv 6 | resync = 1 7 | 8 | # inbox 9 | # path = ./some/directory 10 | # subscribe 11 | # path = /logs 12 | 13 | security 14 | plain 15 | login = guest 16 | password = guest 17 | -------------------------------------------------------------------------------- /java/src/test/resources/server_test.cfg: -------------------------------------------------------------------------------- 1 | # Configure server for plain access 2 | # 3 | server 4 | monitor = 1 # Check mount points 5 | heartbeat = 1 # Heartbeat to clients 6 | 7 | # publish 8 | # location = physicalpath 9 | # virtual = virtualpath 10 | # publish 11 | # location = physicalpath 12 | # virtual = virtualpath 13 | 14 | security 15 | echo = I: use guest/guest to login to server 16 | # These are SASL mechanisms we accept 17 | anonymous = 0 18 | plain = 1 19 | account 20 | login = guest 21 | password = guest 22 | group = guest 23 | account 24 | login = super 25 | password = secret 26 | group = admin 27 | -------------------------------------------------------------------------------- /license.xml: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) the Contributors as noted in the AUTHORS file. 3 | This file is part of FileMQ, a C implemenation of the protocol: 4 | https://github.com/danriegsecker/filemq2. 5 | 6 | This Source Code Form is subject to the terms of the Mozilla Public 7 | License, v. 2.0. If a copy of the MPL was not distributed with this 8 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | -------------------------------------------------------------------------------- /packaging/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /packaging/debian/control: -------------------------------------------------------------------------------- 1 | # 2 | # filemq - A FileMQ server and client 3 | # 4 | # Copyright (c) the Contributors as noted in the AUTHORS file. 5 | # This file is part of FileMQ, a C implemenation of the protocol: 6 | # https://github.com/danriegsecker/filemq2. 7 | # 8 | # This Source Code Form is subject to the terms of the Mozilla Public 9 | # License, v. 2.0. If a copy of the MPL was not distributed with this 10 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | 12 | Source: filemq 13 | Section: net 14 | Priority: optional 15 | Maintainer: John Doe 16 | Uploaders: John Doe 17 | Standards-Version: 3.9.5 18 | Build-Depends: bison, debhelper (>= 8), 19 | pkg-config, 20 | automake, 21 | autoconf, 22 | libtool, 23 | libsodium-dev, 24 | libzmq4-dev, 25 | libczmq-dev, 26 | dh-autoreconf, 27 | systemd 28 | 29 | Package: libfilemq2 30 | Architecture: any 31 | Depends: ${shlibs:Depends}, ${misc:Depends} 32 | Description: filemq 33 | This package contains shared library for filemq: a filemq server and client 34 | 35 | Package: filemq-dev 36 | Architecture: all 37 | Section: libdevel 38 | Depends: 39 | libsodium-dev, 40 | libzmq4-dev, 41 | libczmq-dev, 42 | libfilemq2 (= ${binary:Version}) 43 | Description: development files for filemq 44 | This package contains development files for filemq: a filemq server and client 45 | 46 | Package: filemq 47 | Architecture: any 48 | Depends: ${misc:Depends}, ${shlibs:Depends} 49 | Description: a filemq server and client 50 | Main package for filemq: a filemq server and client 51 | 52 | Package: filemq-dbg 53 | Architecture: any 54 | Section: debug 55 | Priority: extra 56 | Depends: 57 | filemq (= ${binary:Version}), 58 | ${misc:Depends} 59 | Description: debugging symbols for filemq 60 | This package contains the debugging symbols for filemq : a filemq server and client. 61 | 62 | -------------------------------------------------------------------------------- /packaging/debian/filemq-dev.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/include/* 2 | debian/tmp/usr/lib/*/libfilemq.so 3 | debian/tmp/usr/lib/*/pkgconfig/libfilemq.pc 4 | -------------------------------------------------------------------------------- /packaging/debian/filemq.dsc: -------------------------------------------------------------------------------- 1 | Format: 1.0 2 | Source: filemq 3 | Version: 2.0.0-1 4 | Binary: libfilemq2, filemq-dev 5 | Architecture: any all 6 | Maintainer: John Doe 7 | Standards-Version: 3.9.5 8 | Build-Depends: bison, debhelper (>= 8), 9 | pkg-config, 10 | automake, 11 | autoconf, 12 | libtool, 13 | libsodium-dev, 14 | libzmq4-dev, 15 | libczmq-dev, 16 | dh-autoreconf 17 | 18 | Package-List: 19 | libfilemq2 deb net optional arch=any 20 | filemq-dev deb libdevel optional arch=any 21 | 22 | -------------------------------------------------------------------------------- /packaging/debian/filemq.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/bin/filemq_server 2 | debian/tmp/usr/bin/filemq_client 3 | 4 | 5 | -------------------------------------------------------------------------------- /packaging/debian/libfilemq2.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/lib/*/libfilemq.so.* 2 | -------------------------------------------------------------------------------- /packaging/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | override_dh_strip: 5 | dh_strip --dbg-package=filemq-dbg 6 | 7 | override_dh_auto_test: 8 | echo "Skipped for now" 9 | 10 | override_dh_auto_configure: 11 | dh_auto_configure -- --with-systemd 12 | 13 | %: 14 | dh $@ --with=autoreconf 15 | 16 | .PHONY: override_dh_strip override_dh_auto_test override_dh_auto_configure 17 | 18 | -------------------------------------------------------------------------------- /packaging/redhat/filemq.spec: -------------------------------------------------------------------------------- 1 | # 2 | # filemq - A FileMQ server and client 3 | # 4 | # Copyright (c) the Contributors as noted in the AUTHORS file. 5 | # This file is part of FileMQ, a C implemenation of the protocol: 6 | # https://github.com/danriegsecker/filemq2. 7 | # 8 | # This Source Code Form is subject to the terms of the Mozilla Public 9 | # License, v. 2.0. If a copy of the MPL was not distributed with this 10 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | # 12 | 13 | Name: filemq 14 | Version: 2.0.0 15 | Release: 1 16 | Summary: a filemq server and client 17 | License: MIT 18 | URL: http://example.com/ 19 | Source0: %{name}-%{version}.tar.gz 20 | Group: System/Libraries 21 | BuildRequires: automake 22 | BuildRequires: autoconf 23 | BuildRequires: libtool 24 | BuildRequires: pkg-config 25 | BuildRequires: systemd-devel 26 | BuildRequires: libsodium-devel 27 | BuildRequires: zeromq-devel 28 | BuildRequires: czmq-devel 29 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 30 | 31 | %description 32 | filemq a filemq server and client. 33 | 34 | %package -n libfilemq2 35 | Group: System/Libraries 36 | Summary: a filemq server and client 37 | 38 | %description -n libfilemq2 39 | filemq a filemq server and client. 40 | This package contains shared library. 41 | 42 | %post -n libfilemq2 -p /sbin/ldconfig 43 | %postun -n libfilemq2 -p /sbin/ldconfig 44 | 45 | %files -n libfilemq2 46 | %defattr(-,root,root) 47 | %doc COPYING 48 | %{_libdir}/libfilemq.so.* 49 | 50 | %package devel 51 | Summary: a filemq server and client 52 | Group: System/Libraries 53 | Requires: libfilemq2 = %{version} 54 | Requires: libsodium-devel 55 | Requires: zeromq-devel 56 | Requires: czmq-devel 57 | 58 | %description devel 59 | filemq a filemq server and client. 60 | This package contains development files. 61 | 62 | %files devel 63 | %defattr(-,root,root) 64 | %{_includedir}/* 65 | %{_libdir}/libfilemq.so 66 | %{_libdir}/pkgconfig/libfilemq.pc 67 | 68 | %prep 69 | %setup -q 70 | 71 | %build 72 | sh autogen.sh 73 | %{configure} --with-systemd 74 | make %{_smp_mflags} 75 | 76 | %install 77 | make install DESTDIR=%{buildroot} %{?_smp_mflags} 78 | 79 | # remove static libraries 80 | find %{buildroot} -name '*.a' | xargs rm -f 81 | find %{buildroot} -name '*.la' | xargs rm -f 82 | 83 | %files 84 | %defattr(-,root,root) 85 | %doc README.md 86 | %doc COPYING 87 | %{_bindir}/filemq_server 88 | %{_bindir}/filemq_client 89 | 90 | 91 | %changelog 92 | -------------------------------------------------------------------------------- /project.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | FileMQ Codec 14 | FileMQ Server 15 | FileMQ Client 16 | 17 |
Very simple server
18 |
Very simple client
19 | 20 | 21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | filemq 2 | -------------------------------------------------------------------------------- /src/.valgrind.supp: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Param 4 | socketcall.sendto(msg) 5 | fun:send 6 | ... 7 | } 8 | { 9 | 10 | Memcheck:Param 11 | socketcall.send(msg) 12 | fun:send 13 | ... 14 | } 15 | -------------------------------------------------------------------------------- /src/anonymous.cfg: -------------------------------------------------------------------------------- 1 | # Configure server to allow anonymous access 2 | # 3 | security 4 | echo = I: server accepts anonymous access 5 | anonymous = 1 6 | -------------------------------------------------------------------------------- /src/client_test.cfg: -------------------------------------------------------------------------------- 1 | # Configure server for plain access 2 | # 3 | client 4 | heartbeat = 1 # Interval in seconds 5 | inbox = ./fmqroot/recv 6 | resync = 1 7 | 8 | # inbox 9 | # path = ./some/directory 10 | # subscribe 11 | # path = /logs 12 | 13 | security 14 | plain 15 | login = guest 16 | password = guest 17 | -------------------------------------------------------------------------------- /src/filemq_classes.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | filemq_classes - private header file 3 | 4 | Copyright (c) the Contributors as noted in the AUTHORS file. 5 | This file is part of FileMQ, a C implemenation of the protocol: 6 | https://github.com/danriegsecker/filemq2. 7 | 8 | This Source Code Form is subject to the terms of the Mozilla Public 9 | License, v. 2.0. If a copy of the MPL was not distributed with this 10 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | ################################################################################ 12 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 13 | # Please refer to the README for information about making permanent changes. # 14 | ################################################################################ 15 | ========================================================================= 16 | */ 17 | 18 | #ifndef FILEMQ_CLASSES_H_INCLUDED 19 | #define FILEMQ_CLASSES_H_INCLUDED 20 | 21 | // Platform definitions, must come first 22 | #include "platform.h" 23 | 24 | // External API 25 | #include "../include/filemq.h" 26 | 27 | // Internal API 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/filemq_client.c: -------------------------------------------------------------------------------- 1 | 2 | #include "filemq_classes.h" 3 | 4 | int main (int argc, char *argv []) 5 | { 6 | fmq_client_t *client; 7 | int rc; 8 | zsock_t *msgpipe; 9 | zpoller_t *poller; 10 | 11 | if (argc < 2) { 12 | puts ("usage: filemq_client inbox-dir"); 13 | return 0; 14 | } 15 | 16 | // Create the client 17 | client = fmq_client_new (); 18 | assert (client); 19 | fmq_client_verbose = 1; 20 | 21 | rc = fmq_client_connect (client, "tcp://localhost:5670", 1000); 22 | assert (rc == 0); 23 | 24 | // Set the clients storage location 25 | rc = fmq_client_set_inbox (client, argv [1]); 26 | assert (rc >= 0); 27 | 28 | // Subscribe to the server's root 29 | rc = fmq_client_subscribe (client, "/"); 30 | assert (rc >= 0); 31 | 32 | // Get a reference to the msgpipe 33 | msgpipe = fmq_client_msgpipe (client); 34 | assert (msgpipe); 35 | 36 | // Setup a poller 37 | poller = zpoller_new ( (void *) msgpipe, NULL); 38 | assert (poller); 39 | 40 | while (!zsys_interrupted) { 41 | void *sock = zpoller_wait (poller, 100); 42 | 43 | if (sock == msgpipe) { 44 | zmsg_t *msg = zmsg_recv ( (void *) msgpipe); 45 | zmsg_print (msg); 46 | zmsg_destroy (&msg); 47 | } 48 | else 49 | if (zpoller_terminated (poller)) { 50 | puts ("the poller terminated"); 51 | break; 52 | } 53 | } 54 | puts ("interrupted"); 55 | 56 | zpoller_destroy (&poller); 57 | fmq_client_destroy (&client); 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /src/filemq_server.c: -------------------------------------------------------------------------------- 1 | 2 | #include "filemq_classes.h" 3 | 4 | int main (int argc, char *argv []) 5 | { 6 | zactor_t *server; 7 | if (argc < 2) { 8 | puts ("usage: filemq_server publish-from"); 9 | return 0; 10 | } 11 | server = zactor_new (fmq_server, "filemq_server"); 12 | 13 | //zstr_send (server, "VERBOSE"); 14 | zstr_sendx (server, "PUBLISH", argv [1], "/", NULL); 15 | zstr_sendx (server, "BIND", "tcp://*:5670", NULL); 16 | 17 | while (!zsys_interrupted) 18 | zclock_sleep (1000); 19 | puts ("interrupted"); 20 | 21 | zactor_destroy (&server); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /src/fmq_msg.bnf: -------------------------------------------------------------------------------- 1 | The following ABNF grammar defines the The FileMQ Protocol: 2 | 3 | fmq_msg = *( OHAI | OHAI-OK | ICANHAZ | ICANHAZ-OK | NOM | CHEEZBURGER | HUGZ | HUGZ-OK | KTHXBAI | SRSLY | RTFM ) 4 | 5 | ; Client opens peering 6 | 7 | OHAI = signature %d1 protocol version 8 | signature = %xAA %xA3 ; two octets 9 | protocol = string ; Constant "FILEMQ" 10 | version = number-2 ; Protocol version 2 11 | 12 | ; Server grants the client access 13 | 14 | OHAI-OK = signature %d4 15 | 16 | ; Client subscribes to a path 17 | 18 | ICANHAZ = signature %d5 path options cache 19 | path = longstr ; Full path or path prefix 20 | options = hash ; Subscription options 21 | cache = hash ; File SHA-1 signatures 22 | 23 | ; Server confirms the subscription 24 | 25 | ICANHAZ-OK = signature %d6 26 | 27 | ; Client sends credit to the server 28 | 29 | NOM = signature %d7 credit sequence 30 | credit = number-8 ; Credit, in bytes 31 | sequence = number-8 ; Chunk sequence, 0 and up 32 | 33 | ; The server sends a file chunk 34 | 35 | CHEEZBURGER = signature %d8 sequence operation filename offset eof headers chunk 36 | sequence = number-8 ; File offset in bytes 37 | operation = number-1 ; Create=%d1 delete=%d2 38 | filename = longstr ; Relative name of file 39 | offset = number-8 ; File offset in bytes 40 | eof = number-1 ; Last chunk in file? 41 | headers = hash ; File properties 42 | chunk = chunk ; Data chunk 43 | 44 | ; Client sends a heartbeat 45 | 46 | HUGZ = signature %d9 47 | 48 | ; Server answers a heartbeat 49 | 50 | HUGZ-OK = signature %d10 51 | 52 | ; Client closes the peering 53 | 54 | KTHXBAI = signature %d11 55 | 56 | ; Server refuses client due to access rights 57 | 58 | SRSLY = signature %d128 reason 59 | reason = string ; Printable explanation, 255 characters 60 | 61 | ; Server tells client it sent an invalid message 62 | 63 | RTFM = signature %d129 reason 64 | reason = string ; Printable explanation, 255 characters 65 | 66 | ; A list of name/value pairs 67 | hash = hash-count *( hash-name hash-value ) 68 | hash-count = number-4 69 | hash-value = longstr 70 | hash-name = string 71 | 72 | ; A chunk has 4-octet length + binary contents 73 | chunk = number-4 *OCTET 74 | 75 | ; Strings are always length + text contents 76 | string = number-1 *VCHAR 77 | longstr = number-4 *VCHAR 78 | 79 | ; Numbers are unsigned integers in network byte order 80 | number-1 = 1OCTET 81 | number-2 = 2OCTET 82 | number-4 = 4OCTET 83 | number-8 = 8OCTET 84 | -------------------------------------------------------------------------------- /src/fmqroot/README: -------------------------------------------------------------------------------- 1 | This is the directory used for testing. It has two folder; one 'send' for 2 | files the server will send, and one 'recv' for files received by the client. 3 | -------------------------------------------------------------------------------- /src/libfilemq.pc.in: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 3 | # Please refer to the README for information about making permanent changes. # 4 | ################################################################################ 5 | 6 | prefix=@prefix@ 7 | exec_prefix=@exec_prefix@ 8 | libdir=@libdir@ 9 | includedir=@includedir@ 10 | 11 | Name: libfilemq 12 | Description: A FileMQ server and client 13 | Version: @VERSION@ 14 | 15 | Requires:libzmq libczmq 16 | 17 | Libs: -L${libdir} -lfilemq 18 | Cflags: -I${includedir} @pkg_config_defines@ 19 | 20 | ################################################################################ 21 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 22 | # Please refer to the README for information about making permanent changes. # 23 | ################################################################################ 24 | -------------------------------------------------------------------------------- /version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | ################################################################################ 3 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4 | # Please refer to the README for information about making permanent changes. # 5 | ################################################################################ 6 | # 7 | # This script extracts the version from the project header file 8 | # 9 | project=$1 10 | appendix="_library" 11 | if [ ! -f include/$project$appendix.h ]; then 12 | echo 2.0.0 | tr -d '\n' 13 | exit 0 14 | fi 15 | MAJOR=`egrep '^#define .*_VERSION_MAJOR +[0-9]+$' include/$project$appendix.h` 16 | MINOR=`egrep '^#define .*_VERSION_MINOR +[0-9]+$' include/$project$appendix.h` 17 | PATCH=`egrep '^#define .*_VERSION_PATCH +[0-9]+$' include/$project$appendix.h` 18 | if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then 19 | echo "version.sh: error: could not extract version from include/$project$appendix.h" 1>&2 20 | exit 1 21 | fi 22 | MAJOR=`echo $MAJOR | awk '{ print $3 }'` 23 | MINOR=`echo $MINOR | awk '{ print $3 }'` 24 | PATCH=`echo $PATCH | awk '{ print $3 }'` 25 | echo $MAJOR.$MINOR.$PATCH | tr -d '\n' 26 | 27 | ################################################################################ 28 | # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 29 | # Please refer to the README for information about making permanent changes. # 30 | ################################################################################ 31 | --------------------------------------------------------------------------------