Skip to content

Commit

Permalink
0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot committed May 6, 2022
1 parent bd12fa1 commit 06fc661
Show file tree
Hide file tree
Showing 14 changed files with 313 additions and 259 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
ObjectBox C and C++ API Changelog
=================================

0.15.3 (2022-05-05)
0.16.0 (2022-05-06)
-------------------
* Allow UTF-8 for database directories on Windows (available for other platforms before)
* Various internal improvements

* 0.15.2 (2022-02-15)
---------------------
### C++

* Promoted `Options` to a top level class, as nested classes cannot be declared forward
* New `#define` to disable FlatBuffers includes to simplify new project setup
* Rename `Exception` to `DbException`
* Minor improvements

0.15.2 (2022-02-15)
-------------------
* Add store cloning
* Fix attaching to a reopened store

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else ()

function(defineObjectBoxLib VARIANT)
# Configuration updated for each release
set(DL_VERSION 0.15.3)
set(DL_VERSION 0.16.0)

# Platform detection and other setup
set(DL_URL https://github.com/objectbox/objectbox-c/releases/download)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ box.put({.text = "Buy milk"});
See [ObjectBox C and C++ docs](https://cpp.objectbox.io/) for API details.
**Latest version: 0.15.3** (2022-05-05).
**Latest version: 0.16.0** (2022-05-06).
See [changelog](CHANGELOG.md) for more details.
Feature Highlights
Expand Down
2 changes: 1 addition & 1 deletion download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tty -s || quiet=true

# Note: optional arguments like "--quiet" shifts argument positions in the case block above

version=${1:-0.15.3}
version=${1:-0.16.0}
os=${2:-$(uname)}
arch=${3:-$(uname -m)}
echo "Base config: OS ${os} and architecture ${arch}"
Expand Down
13 changes: 10 additions & 3 deletions doxygen/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
ObjectBox C and C++ API Changelog
=================================

0.15.3 (2022-05-05)
0.16.0 (2022-05-06)
-------------------
* Allow UTF-8 for database directories on Windows (available for other platforms before)
* Various internal improvements

* 0.15.2 (2022-02-15)
---------------------
### C++

* Promoted `Options` to a top level class, as nested classes cannot be declared forward
* New `#define` to disable FlatBuffers includes to simplify new project setup
* Rename `Exception` to `DbException`
* Minor improvements

0.15.2 (2022-02-15)
-------------------
* Add store cloning
* Fix attaching to a reopened store

Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "ObjectBox C and C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "0.15.3"
PROJECT_NUMBER = "0.16.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp-gen-sync/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main(int argc, char* argv[]) {

// create_obx_model() provided by objectbox-model.h
// obx interface contents provided by objectbox.hpp
Store::Options storeOptions(create_obx_model());
Options storeOptions(create_obx_model());

if (int err = processArgs(argc, argv, storeOptions)) {
return err;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp-gen-sync/tasklist-example-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "objectbox.hpp"
#include "tasklist.obx.hpp"

int processArgs(int argc, char* argv[], obx::Store::Options& outOptions) {
int processArgs(int argc, char* argv[], obx::Options& outOptions) {
// Remember, argv[0] is application path

const char* directory = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp-gen/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
int main(int argc, char* argv[]) {
// create_obx_model() provided by objectbox-model.h
// obx interface contents provided by objectbox.hpp
obx::Store::Options options(create_obx_model());
obx::Options options(create_obx_model());

if (int err = processArgs(argc, argv, options)) {
return err;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp-gen/tasklist-example-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "objectbox.hpp"
#include "tasklist.obx.hpp"

int processArgs(int argc, char* argv[], obx::Store::Options& outOptions) {
int processArgs(int argc, char* argv[], obx::Options& outOptions) {
// Remember, argv[0] is application path

const char* directory = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion include/objectbox-sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "objectbox.h"

#if defined(static_assert) || defined(__cplusplus)
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 15 && OBX_VERSION_PATCH == 3,
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 16 && OBX_VERSION_PATCH == 0,
"Versions of objectbox.h and objectbox-sync.h files do not match, please update");
#endif

Expand Down
11 changes: 6 additions & 5 deletions include/objectbox-sync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "objectbox-sync.h"
#include "objectbox.hpp"

static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 15 && OBX_VERSION_PATCH == 3,
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 16 && OBX_VERSION_PATCH == 0,
"Versions of objectbox.h and objectbox-sync.hpp files do not match, please update");

static_assert(sizeof(obx_id) == sizeof(OBX_id_array::ids[0]),
Expand Down Expand Up @@ -581,7 +581,7 @@ class SyncServer : public Closable {
/// \note The model given via store_options is also used to verify the compatibility of the models presented by
/// clients.
/// E.g. a client with an incompatible model will be rejected during login.
/// @param storeOptions Options for the server's store.
/// @param storeOptions Options for the server's store. Will be "consumed"; do not use the Options object again.
/// @param uri The URI (following the pattern protocol:://IP:port) the server should listen on.
/// Supported \b protocols are "ws" (WebSockets) and "wss" (secure WebSockets).
/// To use the latter ("wss"), you must also call obx_sync_server_certificate_path().
Expand All @@ -591,10 +591,8 @@ class SyncServer : public Closable {
/// an arbitrary port that is available. The port can be queried via obx_sync_server_port() once the server
/// was started. \b Examples: "ws://0.0.0.0:9999" could be used during development (no certificate config
/// needed), while in a production system, you may want to use wss and a specific IP for security reasons.
// TODO also offer SyncServer(const Store::Options& storeOptions, const std::string& uri)
explicit SyncServer(Store::Options&& storeOptions, const std::string& uri) {
explicit SyncServer(Options& storeOptions, const std::string& uri) {
cPtr_ = checkPtrOrThrow(obx_sync_server(storeOptions.release(), uri.c_str()), "Could not create SyncServer");

try {
OBX_store* cStore = checkPtrOrThrow(obx_sync_server_store(cPtr_), "Can't get SyncServer's store");
store_.reset(new Store(cStore, false));
Expand All @@ -604,6 +602,9 @@ class SyncServer : public Closable {
}
}

/// Rvalue variant of SyncServer(Options& storeOptions, const std::string& uri) that works equivalently.
explicit SyncServer(Options&& storeOptions, const std::string& uri) : SyncServer((Options&) storeOptions, uri) {}

SyncServer(SyncServer&& source) noexcept : cPtr_(source.cPtr_) {
source.cPtr_ = nullptr;
Guard lock(source.listeners_.mutex);
Expand Down
4 changes: 2 additions & 2 deletions include/objectbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ extern "C" {
/// When using ObjectBox as a dynamic library, you should verify that a compatible version was linked using
/// obx_version() or obx_version_is_at_least().
#define OBX_VERSION_MAJOR 0
#define OBX_VERSION_MINOR 15
#define OBX_VERSION_PATCH 3 // values >= 100 are reserved for dev releases leading to the next minor/major increase
#define OBX_VERSION_MINOR 16
#define OBX_VERSION_PATCH 0 // values >= 100 are reserved for dev releases leading to the next minor/major increase

//----------------------------------------------
// Common types
Expand Down
Loading

0 comments on commit 06fc661

Please sign in to comment.