ObjectBox Sync makes data available on other devices. Start building a sync client using client() and connect to a remote server.
More...
#include <objectbox-sync.hpp>
|
static bool | isAvailable () |
|
static std::shared_ptr< SyncClient > | client (Store &store, const std::string &serverUrl, const SyncCredentials &creds) |
| Creates a sync client associated with the given store and configures it with the given options. This does not initiate any connection attempts yet: call SyncClient::start() to do so. Before start(), you can still configure some aspects of the sync client, e.g. its "request update" mode.
|
|
static std::shared_ptr< SyncClient > | client (Store &store, OBX_sync *cSync) |
| Adopts an existing OBX_sync* sync client, taking ownership of the pointer.
|
|
ObjectBox Sync makes data available on other devices. Start building a sync client using client() and connect to a remote server.
◆ client() [1/2]
Creates a sync client associated with the given store and configures it with the given options. This does not initiate any connection attempts yet: call SyncClient::start() to do so. Before start(), you can still configure some aspects of the sync client, e.g. its "request update" mode.
- Note
- While you may not interact with SyncClient directly after start(), you need to hold on to the object. Make sure the SyncClient is not destroyed and thus synchronization can keep running in the background.
◆ client() [2/2]
Adopts an existing OBX_sync* sync client, taking ownership of the pointer.
- Parameters
-
cSync | an initialized sync client. You must NOT call obx_sync_close() yourself anymore. |
◆ isAvailable()
static bool obx::Sync::isAvailable |
( |
| ) |
|
|
inlinestatic |