diff --git a/.travis.yml b/.travis.yml index c68fa16..1032464 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_script: # - rm ndk.tar # - cd .. - cd build - - cmake -DCMAKE_INSTALL_PREFIX:PATH=~/fayecpp-install-dir -DCMAKE_BUILD_TYPE=Release -DFAYECPP_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER .. + - cmake -DCMAKE_INSTALL_PREFIX:PATH=~/fayecpp-install-dir -DCMAKE_BUILD_TYPE=Release -DLWS_WITH_SSL:BOOL=OFF -DFAYECPP_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER .. - cd .. script: diff --git a/CHANGELOG b/CHANGELOG index d714729..1c2c459 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ -Changes on version 1.2.0 (current): +Changes on version 1.2.1 (current): +- Update Libwebsockets to version 2.1.1. +- Update jansson to version 2.10. + +Changes on version 1.2.0: - Update Libwebsockets to version 2.0.0. - Update jansson to version 2.8. - Update client info message. diff --git a/CMakeLists.txt b/CMakeLists.txt index d2b2655..813108c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ set(CPACK_PACKAGE_VERSION_MINOR "2") set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") set(CPACK_PACKAGE_VENDOR "info@resident.name") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE} ${PACKAGE_VERSION}") -set(SOVERSION "1.2.0") +set(SOVERSION "1.2.1") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") set(VERSION "${CPACK_PACKAGE_VERSION}") diff --git a/FayeCpp.podspec b/FayeCpp.podspec index a1ec8bf..5d2f296 100644 --- a/FayeCpp.podspec +++ b/FayeCpp.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| # Common settings s.name = "FayeCpp" - s.version = "1.2.0" + s.version = "1.2.1" s.summary = "Faye C++ lightweight, cross-platform client with Objective-C client wrapper." s.description = <<-DESC Faye C++ lightweight, cross-platform client with Objective-C client wrapper. diff --git a/LICENSE b/LICENSE index d9ef1ff..6cc7b5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 - 2016 Kulykov Oleh +Copyright (c) 2014 - 2017 Kulykov Oleh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d3cbfee..7729bea 100644 --- a/README.md +++ b/README.md @@ -206,45 +206,39 @@ using namespace FayeCpp; ### Client delegate ```cpp -class FayeDelegate : public FayeCpp::Delegate -{ +class FayeDelegate : public FayeCpp::Delegate { public: // override all FayeCpp::Delegate methods. - virtual void onFayeTransportConnected(FayeCpp::Client * client) - { + virtual void onFayeTransportConnected(FayeCpp::Client * client) { // .... - } - - virtual void onFayeClientReceivedMessageFromChannel(FayeCpp::Client * client, - const FayeCpp::REVariantMap & message, - const FayeCpp::REString & channel) - { - + } + + virtual void onFayeClientReceivedMessageFromChannel(FayeCpp::Client * client, + const FayeCpp::REVariantMap & message, + const FayeCpp::REString & channel) { + // Print channel which received message - RELog::log("Received message from channel: \"%s\"", channel.UTF8String()); - - // Iterate all message (VariantMap) pairs - REVariantMap::Iterator iterator = message.iterator(); - while (iterator.next()) - { - iterator.key(); // get key - iterator.value(); // get value for key - } - - // ..... - } - + RELog::log("Received message from channel: \"%s\"", channel.UTF8String()); + + // Iterate all message (VariantMap) pairs + REVariantMap::Iterator iterator = message.iterator(); + while (iterator.next()) { + iterator.key(); // get key + iterator.value(); // get value for key + } + + // ..... + } + // overide other methods - - FayeDelegate() - { + + FayeDelegate() { // ..... } - virtual ~FayeDelegate() - { + virtual ~FayeDelegate() { // ...... - } + } }; ``` @@ -347,16 +341,14 @@ self.client = [[FayeCppClient alloc] init]; ```objective-c #pragma mark - FayeCpp client delegate -- (void) onFayeClientConnected:(FayeCppClient *) client -{ - NSLog(@"On faye client connected"); +- (void) onFayeClientConnected:(FayeCppClient *) client { + NSLog(@"On faye client connected"); } - (void) onFayeClient:(FayeCppClient *) client - receivedMessage:(NSDictionary *) message - fromChannel:(NSString *) channel -{ - NSLog(@"On faye client received message: \n%@ \nfrom channel: %@", message, channel); + receivedMessage:(NSDictionary *) message + fromChannel:(NSString *) channel { + NSLog(@"On faye client received message: \n%@ \nfrom channel: %@", message, channel); } // implement other delegate messages if needed ... ``` @@ -380,7 +372,7 @@ self.client = [[FayeCppClient alloc] init]; ```objective-c [_client sendMessage:@{@"text" : @"Hello world", @"other_params" : @[]} - toChannel:@"/faye_channel_1"]; + toChannel:@"/faye_channel_1"]; ``` diff --git a/appveyor.yml b/appveyor.yml index 4905466..f4ebe69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 1.2.0.{build} +version: 1.2.1.{build} os: Visual Studio 2015 diff --git a/fayecpp.h b/fayecpp.h index 2bffa93..ce6058a 100644 --- a/fayecpp.h +++ b/fayecpp.h @@ -29,6 +29,10 @@ * Faye C++ client main and one header file. * All class interfaces added to namespace, preventing include files mess(yes, this is unusual structure, but lightweight). * + * Changes on version 1.2.1 (current): + * - Update Libwebsockets to version 2.1.1. + * - Update jansson to version 2.10. + * * Changes on version 1.2.0 (current): * - Update Libwebsockets to version 2.0.0. * - Update jansson to version 2.8. @@ -143,7 +147,7 @@ #define FAYECPP_VERSION_MAJOR 1 #define FAYECPP_VERSION_MINOR 2 -#define FAYECPP_VERSION_PATCH 0 +#define FAYECPP_VERSION_PATCH 1 #if !defined(HAVE_SUITABLE_QT_VERSION)