Typedef anjay_dm_transaction_begin_t
Defined in File dm.h
Typedef Documentation
-
typedef int anjay_dm_transaction_begin_t(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr)
A handler that is called when there is a request that might modify an Object and fail. Such situation often requires to rollback changes, and this handler shall implement logic that prepares for possible failure in the future.
Handlers listed below are NOT called without beginning transaction in the first place (note that if an Object does not implement transaction handlers, then it will not be possible to perform operations listed below):
Note: if an error occurs during a transaction (i.e. after successful call of this function) then the rollback handler anjay_dm_transaction_rollback_t will be executed by the library.
- Param anjay:
Anjay object to operate on.
- Param obj_ptr:
Object definition pointer, as passed to anjay_register_object .
- Return:
0 on success
a negative value in case of error