Start here to prepare an 'objects message'. You must add at least one object and then you can send the message using SyncClient::send() or SyncServer::send().
More...
#include <objectbox-sync.hpp>
Start here to prepare an 'objects message'. You must add at least one object and then you can send the message using SyncClient::send() or SyncServer::send().
◆ SyncObjectsMessageBuilder() [1/5]
obx::SyncObjectsMessageBuilder::SyncObjectsMessageBuilder |
( |
| ) |
|
|
inline |
◆ SyncObjectsMessageBuilder() [2/5]
obx::SyncObjectsMessageBuilder::SyncObjectsMessageBuilder |
( |
const std::string & |
topic | ) |
|
|
inlineexplicit |
- Parameters
-
topic | - application-specific message qualifier |
◆ SyncObjectsMessageBuilder() [3/5]
obx::SyncObjectsMessageBuilder::SyncObjectsMessageBuilder |
( |
const void * |
topic, |
|
|
size_t |
topicSize |
|
) |
| |
|
inlineexplicit |
- Parameters
-
topic | - application-specific message qualifier (may be NULL), usually a string but can also be binary |
◆ SyncObjectsMessageBuilder() [4/5]
◆ SyncObjectsMessageBuilder() [5/5]
Can't be copied, single owner of C resources is required (to avoid double-free during destruction)
◆ ~SyncObjectsMessageBuilder()
virtual obx::SyncObjectsMessageBuilder::~SyncObjectsMessageBuilder |
( |
| ) |
|
|
inlinevirtual |
◆ add() [1/2]
void obx::SyncObjectsMessageBuilder::add |
( |
const std::string & |
object, |
|
|
uint64_t |
id = 0 |
|
) |
| |
|
inline |
Adds a string object to the given message (builder).
- Parameters
-
id | an optional (pass 0 if you don't need it) value that the application can use identify the object |
◆ add() [2/2]
void obx::SyncObjectsMessageBuilder::add |
( |
OBXSyncObjectType |
type, |
|
|
const void * |
data, |
|
|
size_t |
size, |
|
|
uint64_t |
id = 0 |
|
) |
| |
|
inline |
Adds an object to the given message (builder).
- Parameters
-
id | an optional (pass 0 if you don't need it) value that the application can use identify the object |