Ledger
onSync(OnSyncCallback) [Ledger class]
Registers a function to be called when the ledger is synchronized. This method takes a C function and an arg
value. The arg can be a pointer to a C++ object instance, a pointer to some other structure, or can be 0 if you don't need an additional argument.
// PROTOTYPE
int onSync(OnSyncCallback callback, void* arg = nullptr);
// CALLBACK DEFINITION
typedef void (*OnSyncCallback)(Ledger ledger, void* arg);
// CALLBACK PROTOTYPE
void myCallback(Ledger ledger, void* arg)