Description
Functionpointers of write_to_data_destination type are used to download object data to a
networkor other destination from the 5800 system server using hc_retrieve_ez” on page 91.
Thefunction 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
argumentto deliver the downloaded data to a local data storage function.
Awrite_to_data_destinationfunction should write exactly buff_len bytes to the data
destinationindicated by cookie, reading the bytes from the buer at location buff. It should
returna long value indicating the number of bytes actually processed. A return code that diers
frombuff_len indicates that the transfer should be terminated.
Parameters
cookie Anopaque data structure to identify this data cookie. The cookie is likely to be
anopen le descriptor.
buff Whereto copy the data from.
buff_len Thenumber of bytes of space in buff.
SeeAlso
hc_retrieve_ez”on page 91
hcerr_t
5800system C client API error codes.
Todecode 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,
SynchronousCData Types
Chapter3 • Sun StorageTek 5800 System C Client API 51