Skip to content

Commit 5a18977

Browse files
author
Peter Spiess-Knafl
committed
Merge branch 'release/v0.4.2'
2 parents 4e677b4 + b3cbab1 commit 5a18977

26 files changed

+76
-50
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
Changes in v0.4.2
2+
- Fix of spelling mistakes.
3+
- Use CMAKE versioning in manpage.
4+
- Improving include scheme of jsoncpp.
5+
- Bugfix in HttpServer with Threading option in SSL startup.
6+
17
Changes in v0.4.1
28
-----------------
39
- Added coverity scan support
4-
- [Added API compatiblity report](http://upstream.rosalinux.ru/versions/libjson-rpc-cpp.html)
10+
- [Added API compatibility report](http://upstream.rosalinux.ru/versions/libjson-rpc-cpp.html)
511
- Improved manpage
612
- Extended Stubgenerator for protocol switches (JSON-RPC 1.0 & 2.0)
713

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wnon-virtua
1111

1212
SET(MAJOR_VERSION 0)
1313
SET(MINOR_VERSION 4)
14-
SET(PATCH_VERSION 1)
14+
SET(PATCH_VERSION 2)
1515
SET(SO_VERSION 0)
1616

1717
#possible modules that can be enabled/disabled
@@ -31,6 +31,10 @@ ENDIF()
3131
#the core framework
3232
add_subdirectory(src/jsonrpccpp)
3333

34+
include_directories("${PROJECT_SOURCE_DIR}/src/")
35+
include_directories("${PROJECT_BINARY_DIR}/gen/")
36+
include_directories("${PROJECT_BINARY_DIR}/gen/jsonrpccpp/common")
37+
3438
#the stubgenerator
3539
IF(COMPILE_STUBGEN)
3640
add_subdirectory(src/stubgenerator)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ References
218218
- [LaseShark 3D Printer](https://github.com/macpod/lasershark_3dp): used to control the firmware of the 3D printer.
219219
- [cpp-ethereum](https://github.com/ethereum/cpp-ethereum): a distributed computing framework.
220220
- [mage-sdk-cpp](https://github.com/mage/mage-sdk-cpp): a game engine.
221-
- [bitcodin](http://www.bitmovin.net): a scaleable cloud based video transcoding platform.
221+
- [bitcodin](http://www.bitmovin.net): a scalable cloud based video transcoding platform.
222222
- [wgslib](http://wgslib.com/): A web geostatistics library.
223223
- [bitcoin-api-cpp](https://github.com/minium/bitcoin-api-cpp): a C++ interface to bitcoin.
224224
- [NIT DASH Content Server](http://www.nit.eu/offer/research-projects-products/334-http2dash): Dynamic Adaptive Streaming over HTTP server.
@@ -239,7 +239,7 @@ Changelogs
239239
----------
240240
Changelogs can be found [here](https://github.com/cinemast/libjson-rpc-cpp/blob/master/CHANGELOG.md).
241241

242-
API compatiblity
242+
API compatibility
243243
----------------
244244
Can be found [here](http://upstream.rosalinux.ru/versions/libjson-rpc-cpp.html)
245245

cmake/FindJSONCPP.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ IF(JSONCPP_INCLUDE_DIRS AND JSONCPP_LIBRARIES)
2525
ENDIF(JSONCPP_INCLUDE_DIRS AND JSONCPP_LIBRARIES)
2626

2727
IF(JSONCPP_FOUND)
28-
IF(NOT JSONCPP_FIND_QUIETLY)
29-
MESSAGE(STATUS "Found libjsoncpp: ${JSONCPP_LIBRARIES}")
30-
ENDIF(NOT JSONCPP_FIND_QUIETLY)
28+
if(EXISTS "${JSONCPP_INCLUDE_DIRS}/version.h")
29+
MESSAGE(STATUS "Found New libjsoncpp: ${JSONCPP_LIBRARIES}")
30+
set(JSONCPP_INCLUDE_PREFIX "json")
31+
else()
32+
MESSAGE(STATUS "Found old libjsoncpp: ${JSONCPP_LIBRARIES}")
33+
set(JSONCPP_INCLUDE_PREFIX "jsoncpp/json")
34+
endif()
3135
ELSE(JSONCPP_FOUND)
3236
IF(JSONCPP_FIND_REQUIRED)
3337
MESSAGE(FATAL_ERROR "Could not find libjsoncpp")

doc/manpage renamed to doc/manpage.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Manpage for jsonrpcstub.
22
.\" Contact [email protected] to correct errors or typos.
3-
.TH man 1 "22 November 2014" "0.4.1" "jsonrpcstub man page"
3+
.TH man 1 "22 November 2014" "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@" "jsonrpcstub man page"
44
.SH NAME
55
jsonrpcstub \- genearate stubs for the libjson\-rpc\-cpp framework.
66
.SH SYNOPSIS
@@ -67,16 +67,16 @@ Defines the filename to use when generating the JavaScrip client class.
6767
Generate C++ Stubs for Server and Client, the classes will be named AbstractStubServer and StubClient:
6868
.P P
6969
.B
70-
\& jsonrpcstub spec.json --cpp--server=AbstractStubServer --cpp-client=StubClient
70+
\& jsonrpcstub spec.json \-\-cpp\-server=AbstractStubServer \-\-cpp\-client=StubClient
7171
.B
7272
.PP
7373
Generate JavaScript Client class MyRpcClient into file someclient.js:
7474
.PP
7575
.B
76-
\& jsonrpcstub spec.json --js--client=MyRpcClient --js-client-file=someclient.js
76+
\& jsonrpcstub spec.json \-\-js\-client=MyRpcClient \-\-js\-client\-file=someclient.js
7777
.B
7878
.SH EXIT STATUS
79-
This command returns 0 if no error occured. In any other case, it returns 1.
79+
This command returns 0 if no error occurred. In any other case, it returns 1.
8080
.SH SEE ALSO
8181
https://github.com/cinemast/libjson\-rpc\-cpp
8282
.SH BUGS

src/examples/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ add_custom_command(OUTPUT xbmcremote.h
2121
COMMENT "Generating Client XBMC Stubfile"
2222
VERBATIM)
2323

24-
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
2524
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
2625

2726
IF(HTTP_SERVER AND HTTP_CLIENT)

src/jsonrpccpp/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ set(server_connector_source "")
2929
set(server_connector_header "")
3030
set(server_connector_libs "")
3131

32-
include_directories("${PROJECT_SOURCE_DIR}/src/")
3332

3433
# configure a header file to pass some of the CMake settings
3534
# to the source code
36-
configure_file (
37-
"${PROJECT_SOURCE_DIR}/src/jsonrpccpp/version.h.in"
38-
"${PROJECT_BINARY_DIR}/version.h"
39-
)
40-
install(FILES ${PROJECT_BINARY_DIR}/version.h DESTINATION include/jsonrpccpp)
35+
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/gen/jsonrpccpp/common")
36+
configure_file("${PROJECT_SOURCE_DIR}/src/jsonrpccpp/version.h.in" "${PROJECT_BINARY_DIR}/gen/jsonrpccpp/version.h")
37+
configure_file("${PROJECT_SOURCE_DIR}/src/jsonrpccpp/common/jsonparser.h.in" "${PROJECT_BINARY_DIR}/gen/jsonrpccpp/common/jsonparser.h")
4138

39+
install(FILES "${PROJECT_BINARY_DIR}/gen/jsonrpccpp/version.h" DESTINATION include/jsonrpccpp)
40+
install(FILES "${PROJECT_BINARY_DIR}/gen/jsonrpccpp/common/jsonparser.h" DESTINATION include/jsonrpccpp/common)
41+
42+
include_directories("${PROJECT_SOURCE_DIR}/src/")
43+
include_directories("${PROJECT_BINARY_DIR}/gen/")
44+
include_directories("${PROJECT_BINARY_DIR}/gen/jsonrpccpp/common")
4245

4346
IF(HTTP_CLIENT)
4447
find_package(CURL REQUIRED)

src/jsonrpccpp/client/batchcall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef JSONRPC_CPP_BATCHCALL_H
1111
#define JSONRPC_CPP_BATCHCALL_H
1212

13-
#include <jsoncpp/json/json.h>
13+
#include <jsonrpccpp/common/jsonparser.h>
1414

1515
namespace jsonrpc
1616
{

src/jsonrpccpp/client/batchresponse.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define JSONRPC_BATCHRESPONSE_H
1212

1313
#include <map>
14-
#include <jsoncpp/json/json.h>
14+
#include <jsonrpccpp/common/jsonparser.h>
1515

1616
namespace jsonrpc {
1717

@@ -43,7 +43,7 @@ namespace jsonrpc {
4343
void getResult(int id, Json::Value &result);
4444

4545
/**
46-
* @brief getErrorCode method checks if for a given id, an error occured in the batch request.
46+
* @brief getErrorCode method checks if for a given id, an error occurred in the batch request.
4747
* @param id
4848
*/
4949
int getErrorCode(int id);

src/jsonrpccpp/client/client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Client::~Client()
2323
delete this->protocol;
2424
}
2525

26-
void Client::CallMethod(const std::string &name, const Json::Value &paramter, Json::Value& result) throw(JsonRpcException)
26+
void Client::CallMethod(const std::string &name, const Json::Value &parameter, Json::Value& result) throw(JsonRpcException)
2727
{
2828
std::string request, response;
29-
protocol->BuildRequest(name, paramter, request, false);
29+
protocol->BuildRequest(name, parameter, request, false);
3030
connector.SendRPCMessage(request, response);
3131
protocol->HandleResponse(response, result);
3232
}

0 commit comments

Comments
 (0)