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 and sequenceNum that you have read. Both objectId and sequenceNum may be different from haveObjectId and haveSequenceNum. For example, if the object was deleted and recreated, then objectId will be different from haveObjectId. If additional changes were made to the object, sequenceNum will be different from haveSequenceNum.

Once you’ve received a callback with one objectId, all further callbacks will provide the same objectId, because if the object is deleted while you are reading it, you will receive a result of eOmniClientResult_ErrorAccessLost

The callback will be called with zero or more eOmniClientResult_Ok results, followed by eOmniClientResult_OkLatest, followed by zero or more eOmniClientResult_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.

See also http://omniverse-docs.s3-website-us-east-1.amazonaws.com/usd_resolver/1.4.0/docs/omni-client-live.html#reading-a-live-layer