X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fzoom.xml;h=acd0fa235edb165eda42922cd08100aff7c310ee;hp=63bff819120ef385cd0c559e98c556abf536a9f3;hb=08e079756cdb1cd5da5779e1833b6065d07292d3;hpb=bd67bd91a1ef6340ba08db039aa04b6fc424fc8d diff --git a/doc/zoom.xml b/doc/zoom.xml index 63bff81..acd0fa2 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -1,4 +1,4 @@ - + Building clients with ZOOM @@ -31,7 +31,7 @@ - The C language misses many features found in object oriented languages + The C language misses features found in object oriented languages such as C++, Java, etc. For example, you'll have to manually, destroy all objects you create, even though you may think of them as temporary. Most objects has a _create - and a @@ -404,8 +404,8 @@ size_t start, size_t count); ZOOM_record ZOOM_resultset_record (ZOOM_resultset s, size_t pos); - void *ZOOM_record_get (ZOOM_record rec, const char *type, - size_t *len); + const char *ZOOM_record_get (ZOOM_record rec, const char *type, + size_t *len); ZOOM_record ZOOM_record_clone (ZOOM_record rec); @@ -452,27 +452,32 @@ database Database of record is returned - as a C null-terminated string. Return type char *. + as a C null-terminated string. Return type + const char *. syntax The transfer syntax (OID) of the record is returned - as a C null-terminated string. Return type char *. + as a C null-terminated string. Return type is + const char *. render The record is returned in a display friendly format. Upon completion buffer is returned - (type char *) and length is stored in + (type const char *) and length is stored in *len. raw The record is returned in the internal - YAZ specific format. The raw data is returned as type + YAZ specific format. For GRS-1, Explain, and others, t + he raw data is returned as type Z_External * which is just the type for the member retrievalRecord in type NamePlusRecord. + For SUTRS and octet aligned record (including all MARCs) the + octet buffer is returned and the length of the buffer. @@ -497,6 +502,85 @@ + Scan + + This section describes an interface for Scan. Scan is not an + official part of the ZOOM model yet. The result of a scan operation + is the ZOOM_scanset which is a set of terms + returned by a target. + + + ZOOM_scanset ZOOM_connection_scan (ZOOM_connection c, + const char *startterm); + + size_t ZOOM_scanset_size(ZOOM_scanset scan); + + const char * ZOOM_scanset_term(ZOOM_scanset scan, size_t pos, + int *occ, size_t *len); + + + void ZOOM_scanset_destroy (ZOOM_scanset scan); + + const char *ZOOM_scanset_option_get (ZOOM_scanset scan, + const char *key); + + void ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key, + const char *val); + + + The scan set is created by function + ZOOM_connection_scan which performs a scan + operation on the connection and start term given. + If the operation was successful, the size of the scan set can be + retrived by a call to ZOOM_scanset_size. + Like result sets, the items are numbered 0,..size-1. + To obtain information about a particular scan term, call function + ZOOM_scanset_term. This function takes + a scan set offset pos and returns a pointer + to an actual term or NULL if non-present. + If present, the occ and len + are set to the number of occurrences and the length + of the actual term respectively. + A scan set may be freed by a call to function + ZOOM_scanset_destroy. + Functions ZOOM_scanset_option_get and + ZOOM_scanset_option_set retrieves and sets + an option respectively. + + + ZOOM Scan Set Options + + + + + + + Option + Description + Default + + + + + numberNumber of Scan Terms requested in next scan. + After scan it holds the actual number of terms returend. + 10 + + positionPreferred Position of term in response + in next scan; actual position after completion of scan. + 1 + + stepSizeStep Size + 0 + + scanStatusAn integer indicating the Scan Status + of last scan. + 0 + + +
+ +
Options Most &zoom; objects provide a way to specify options to change behavior.