X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fzoom.xml;h=315e78e1a1e56914d6750bdbfd90477f541c882b;hb=02da040a0671d09dfe19790a53ff6408740e7cde;hp=5049709bc2c41aabb92a11c6a4fc82f9e81373cf;hpb=fd4adcc80d442f84c6a1894e890b1b6ccd02615e;p=yaz-moved-to-github.git diff --git a/doc/zoom.xml b/doc/zoom.xml index 5049709..315e78e 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -1,4 +1,4 @@ - + Building clients with ZOOM @@ -10,16 +10,16 @@ The lack of a simple Z39.50 client API for &yaz; has become more - and more apparent over time. So when the first ZOOM specification + and more apparent over time. So when the first &zoom; specification became available, an implementation for &yaz; was quickly developed. For the first time, it is now as easy (or easier!) to develop clients than servers with &yaz;. This - chapter describes the ZOOM C binding. Before going futher, please + chapter describes the &zoom; C binding. Before going futher, please reconsider whether C is the right programming language for the job. There are other language bindings available for &yaz;, and still more - are in active development. See the ZOOM website at - zoom.z3950.org for + are in active development. See the + ZOOM website for more information. @@ -80,21 +80,21 @@ Z3950_connection_destroy. - const char *Z3950_connection_option (Z3950_connection c, - const char *key, - const char *val); + void Z3950_connection_option_set (Z3950_connection c, + const char *key, + const char *val); + + const char *Z3950_connection_option_get (Z3950_connection c, + const char *key); + const char *Z3950_connection_host (Z3950_connection c); - The Z3950_connection_option allows you to - inspect or set an option given by key - for the connection. - If val is non-NULL that - holds the new value for option. - Otherwise, if val is - NULL, - the option is unchanged. - The function returns the (new) value of the option. + The Z3950_connection_option_set allows you to + set an option given by key to the value + value for the connection. + Function Z3950_connection_option_get returns + the value for an option given by key. ZOOM Connection Options @@ -256,31 +256,25 @@ creating query objects is not necessary. - const char *Z3950_resultset_option (Z3950_resultset r, - const char *key, - const char *val); + void Z3950_resultset_option_set (Z3950_resultset r, + const char *key, + const char *val); - int Z3950_resultset_size (Z3950_resultset r); + const char *Z3950_resultset_option_get (Z3950_resultset r, + const char *key); - void *Z3950_resultset_get (Z3950_resultset s, size_t pos, - const char *type, size_t *len); + size_t Z3950_resultset_size (Z3950_resultset r); - Function Z3950_resultset_options sets or - modifies an option for a result set similar to - Z3950_connection_option. + Functions Z3950_resultset_options_set and + Z3950_resultset_get sets and gets an option + for a result set similar to Z3950_connection_option_get + and Z3950_connection_option_set. The number of hits also called result-count is returned by function Z3950_resultset_size. - - Function Z3950_resultset_get is similar to - - Z3950_record_get but - instead of operating on a record object, it operates on a record on - a given offset within a result set. -
ZOOM Result set Options @@ -410,16 +404,24 @@ void *Z3950_record_get (Z3950_record rec, const char *type, size_t *len); + Z3950_record Z3950_record_dup (Z3950_record rec); + void Z3950_record_destroy (Z3950_record rec); - Records are created by functions + References to temporary records are returned by functions Z3950_resultset_records or - Z3950_resultset_record - and destroyed by Z3950_record_destroy. + Z3950_resultset_record. + + + If a persistent pointer to a record is desired + Z3950_record_dup should be used. + It returns a record reference that at any + later stage should be destroyed by + Z3950_record_destroy. - A single record is created and returned by function + A single record is 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. @@ -446,13 +448,13 @@ the returned information. database - The database that holds the record is returned - as a C string. Return type char *. + Database of record is returned + as a C null-terminated string. Return type char *. syntax The transfer syntax (OID) of the record is returned - as a C string. Return type char *. + as a C null-terminated string. Return type char *. render @@ -465,7 +467,7 @@ raw The record is returned in the internal YAZ specific format. The raw data is returned as type - Z_External * is just the type for + Z_External * which is just the type for the member retrievalRecord in type NamePlusRecord.