omniClientLiveRead¶
Defined in OmniClient.h
-
OmniClientRequestId
omniClientLiveRead
(char const *url, uint64_t haveObjectId, uint64_t haveSequenceNum, void *userData, OmniClientLiveReadCallback callback)¶ Read a live object and set up a subscription to be notified of new updates to that object.
haveObjectId
&haveSequenceNum:
If you already have some version of this live object, you can provide the object id and sequence number that you already have. The server will attempt to build a delta that brings you up to date. If you do not have any version of this live layer, you set both to 0.The callback will be called with the exact
objectId
andsequenceNum
that you have read. BothobjectId
andsequenceNum
may be different fromhaveObjectId
andhaveSequenceNum
. For example, if the object was deleted and recreated, thenobjectId
will be different fromhaveObjectId
. If additional changes were made to the object,sequenceNum
will be different fromhaveSequenceNum
.Once you’ve received a callback with one
objectId
, all further callbacks will provide the sameobjectId
, because if the object is deleted while you are reading it, you will receive a result ofeOmniClientResult_ErrorAccessLost
The callback will be called with zero or more
eOmniClientResult_Ok
results, followed byeOmniClientResult_OkLatest
, followed by zero or moreeOmniClientResult_Ok
results. Unless there is an error result (which could come at any time).The callback will not be called again after an error result.
Used by omni-usd-resolver.