X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fzoom.xml;h=4b62b508972fe65286469f67a6b28b7de0f9a7c1;hp=5049709bc2c41aabb92a11c6a4fc82f9e81373cf;hb=d00666d5391066b1acba398090170d3766ec7e4f;hpb=fd4adcc80d442f84c6a1894e890b1b6ccd02615e diff --git a/doc/zoom.xml b/doc/zoom.xml index 5049709..4b62b50 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. @@ -260,10 +260,7 @@ const char *key, const char *val); - int Z3950_resultset_size (Z3950_resultset r); - - 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 @@ -274,13 +271,6 @@ 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 +400,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 +444,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