A record object is a retrival record on the client side - created from result sets.
void Z3950_resultset_records (Z3950_resultset r, Z3950_record *recs, size_t *cnt); Z3950_record Z3950_resultset_record (Z3950_resultset s, int pos); void *Z3950_record_get (Z3950_record rec, const char *type, int *len); void Z3950_record_destroy (Z3950_record rec); |
Records are created by functions Z3950_resultset_records or Z3950_resultset_record and destroyed by Z3950_record_destroy.
A single record is created and returned by function Z3950_resultset_record that takes a position as argument. First record has position zero. If no record could be obtained NULL is returned.
Function Z3950_resultset_records retrieves a number of records from a result set. Options start and count specifies the range of records to be returned. Upon completion recs[0], ..recs[*cnt] holds record objects for the records. These array of records recs should be allocate prior to calling Z3950_resultset_records. Note that for records that couldn't be retrieved from the target recs[ ..] is NULL.
In order to extract information about a single record, Z3950_record_get is provided. The function returns a pointer to certain record information. The nature (type) of the pointer depends on the type given. In addition for certain types, the length len passed will be set to the size in bytes of the returned information. The types database, syntax and render are supported. More will be added later.