Description
Function pointers of write_to_data_destination type are used to download object data to a
network or other destination from the 5800 system server using
“hc_retrieve_ez” on page 91.
The function pointer and opaque cookie reference are supplied as arguments to
“hc_retrieve_ez” on page 91, and the function will be called with the supplied cookie
argument to deliver the downloaded data to a local data storage function.
A write_to_data_destination function should write exactly buff_len bytes to the data
destination indicated by cookie, reading the bytes from the buer at location buff. It should
return a long value indicating the number of bytes actually processed. A return code that diers
from buff_len indicates that the transfer should be terminated.
Parameters
cookie An opaque data structure to identify this data cookie. The cookie is likely to be
an open le descriptor.
buff Where to copy the data from.
buff_len The number of bytes of space in buff.
See Also
“hc_retrieve_ez” on page 91
hcerr_t
5800 system C client API error codes.
To decode hcerr_t values into strings, see
“hc_decode_hcerr” on page 112
Synopsis
typedef enum hcerr {
HCERR_OK = 0,
HCERR_NOT_INITED,
HCERR_ALREADY_INITED,
HCERR_INIT_FAILED,
HCERR_OOM,
HCERR_NOT_YET_IMPLEMENTED,
HCERR_SESSION_CREATE_FAILED,
HCERR_ADD_HEADER_FAILED,HCERR_IO_ERR,
HCERR_FAILOVER_OCCURRED,
HCERR_CAN_CALL_AGAIN,
HCERR_GET_RESPONSE_CODE_FAILED,
HCERR_CONNECTION_FAILED,
SynchronousCDataTypes
Chapter3 • SunStorageTek 5800SystemCClient API 51