YAZ  5.23.1
zget.c
Go to the documentation of this file.
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) Index Data
3  * See the file LICENSE for details.
4  */
9 #if HAVE_CONFIG_H
10 #include <config.h>
11 #endif
12 
13 #include <yaz/proto.h>
14 #include <yaz/oid_db.h>
15 
17 {
18  Z_InitRequest *r = (Z_InitRequest *)odr_malloc(o, sizeof(*r));
19 
20  r->referenceId = 0;
21  r->options = (Odr_bitmask *)odr_malloc(o, sizeof(*r->options));
24  odr_malloc(o, sizeof(*r->protocolVersion));
25 
28 
30 
33 
34  r->preferredMessageSize = odr_intdup(o, 1024*1024);
35  r->maximumRecordSize = odr_intdup(o, 1024*1024);
36  r->idAuthentication = 0;
37  r->implementationId = "81";
38  r->implementationName = "YAZ";
40 #ifdef YAZ_VERSION_SHA1
42 #endif
43  ;
44  r->userInformationField = 0;
45  r->otherInfo = 0;
46  return r;
47 }
48 
50 {
51  Z_InitResponse *r = (Z_InitResponse *)odr_malloc(o, sizeof(*r));
52 
53  r->referenceId = 0;
54  r->options = (Odr_bitmask *)odr_malloc(o, sizeof(*r->options));
56  r->protocolVersion = (Odr_bitmask *)odr_malloc(o, sizeof(*r->protocolVersion));
58  r->preferredMessageSize = odr_intdup(o, 30*1024);
59  r->maximumRecordSize = odr_intdup(o, 30*1024);
60  r->result = odr_booldup(o, 1);
61  r->implementationId = "81";
62  r->implementationName = "YAZ";
64 #ifdef YAZ_VERSION_SHA1
66 #endif
67  ;
68  r->userInformationField = 0;
69  r->otherInfo = 0;
70  return r;
71 }
72 
74 {
75  Z_SearchRequest *r = (Z_SearchRequest *)odr_malloc(o, sizeof(*r));
76 
77  r->referenceId = 0;
78  r->smallSetUpperBound = odr_intdup(o, 0);
79  r->largeSetLowerBound = odr_intdup(o, 1);
81  r->replaceIndicator = odr_booldup(o, 1);
82  r->resultSetName = "default";
83  r->num_databaseNames = 0;
84  r->databaseNames = 0;
87  r->preferredRecordSyntax = 0;
88  r->query = 0;
89  r->additionalSearchInfo = 0;
90  r->otherInfo = 0;
91  return r;
92 }
93 
95 {
96  Z_SearchResponse *r = (Z_SearchResponse *)odr_malloc(o, sizeof(*r));
97 
98  r->referenceId = 0;
99  r->resultCount = odr_intdup(o, 0);
102  r->searchStatus = odr_booldup(o, 1);
103  r->resultSetStatus = 0;
104  r->presentStatus = 0;
105  r->records = 0;
106  r->additionalSearchInfo = 0;
107  r->otherInfo = 0;
108  return r;
109 }
110 
112 {
113  Z_PresentRequest *r = (Z_PresentRequest *)odr_malloc(o, sizeof(*r));
114 
115  r->referenceId = 0;
116  r->resultSetId = "default";
117  r->resultSetStartPoint = odr_intdup(o, 1);
119  r->num_ranges = 0;
120  r->additionalRanges = 0;
121  r->recordComposition = 0;
122  r->preferredRecordSyntax = 0;
123  r->maxSegmentCount = 0;
124  r->maxRecordSize = 0;
125  r->maxSegmentSize = 0;
126  r->otherInfo = 0;
127  return r;
128 }
129 
131 {
132  Z_PresentResponse *r = (Z_PresentResponse *)odr_malloc(o, sizeof(*r));
133 
134  r->referenceId = 0;
138  r->records = 0;
139  r->otherInfo = 0;
140  return r;
141 }
142 
144 {
146  odr_malloc(o, sizeof(*r));
147 
148  r->referenceId = 0;
150  r->num_resultSetList = 0;
151  r->resultSetList = 0;
152  r->otherInfo = 0;
153  return r;
154 }
155 
157 {
159  odr_malloc(o, sizeof(*r));
160 
161  r->referenceId = 0;
163  r->deleteListStatuses = 0;
164  r->numberNotDeleted = 0;
165  r->bulkStatuses = 0;
166  r->deleteMessage = 0;
167  r->otherInfo = 0;
168  return r;
169 }
170 
172 {
173  Z_ScanRequest *r = (Z_ScanRequest *)odr_malloc(o, sizeof(*r));
174 
175  r->referenceId = 0;
176  r->num_databaseNames = 0;
177  r->databaseNames = 0;
178  r->attributeSet = 0;
179  r->termListAndStartPoint = 0;
180  r->stepSize = 0;
183  r->otherInfo = 0;
184  return r;
185 }
186 
188 {
189  Z_ScanResponse *r = (Z_ScanResponse *)odr_malloc(o, sizeof(*r));
190 
191  r->referenceId = 0;
192  r->stepSize = 0;
195  r->positionOfTerm =0;
196  r->entries = 0;
197  r->attributeSet = 0;
198  r->otherInfo = 0;
199  return r;
200 }
201 
203 {
205  odr_malloc(o, sizeof(*r));
206 
207  r->referenceId = 0;
210  r->resultSetWanted = 0;
211  r->otherInfo = 0;
212  return r;
213 }
214 
216 {
218  odr_malloc(o, sizeof(*r));
219 
220  r->referenceId = 0;
221  r->suspendedFlag = 0;
222  r->resourceReport = 0;
224  r->responseRequired = odr_booldup(o, 0);
225  r->triggeredRequestFlag = 0;
226  r->otherInfo = 0;
227  return r;
228 }
229 
231 {
233  odr_malloc(o, sizeof(*r));
234 
235  r->referenceId = 0;
236  r->continueFlag = odr_booldup(o, 1);
237  r->resultSetWanted = 0;
238  r->otherInfo = 0;
239  return r;
240 }
241 
243 {
245  odr_malloc(o, sizeof(*r));
246 
247  r->referenceId = 0;
249  r->u.simpleForm = 0;
250  r->otherInfo = 0;
251  return r;
252 }
253 
255 {
257  odr_malloc(o, sizeof(*r));
258 
259  r->referenceId = 0;
261  r->u.simpleForm = 0;
262  r->diagnostic = 0;
263  r->otherInfo = 0;
264  return r;
265 }
266 
268 {
269  Z_Segment *r = (Z_Segment *)odr_malloc(o, sizeof(*r));
270 
271  r->referenceId = 0;
273  r->num_segmentRecords = 0;
275  r->otherInfo = 0;
276  return r;
277 }
278 
280 {
281  Z_Close *r = (Z_Close *)odr_malloc(o, sizeof(*r));
282 
283  r->referenceId = 0;
285  r->diagnosticInformation = 0;
286  r->resourceReportFormat = 0;
287  r->resourceReport = 0;
288  r->otherInfo = 0;
289  return r;
290 }
291 
293 {
295  odr_malloc(o, sizeof(*r));
296 
297  r->referenceId = 0;
298  r->opId = 0;
300  r->otherInfo = 0;
301  return r;
302 }
303 
305 {
307  odr_malloc(o, sizeof(*r));
308 
309  r->referenceId = 0;
311  r->resourceReport = 0;
312  r->otherInfo = 0;
313  return r;
314 }
315 
317 {
318  Z_SortRequest *r = (Z_SortRequest *)odr_malloc(o, sizeof(*r));
319 
320  r->referenceId = 0;
321  r->inputResultSetNames = 0;
322  r->sortedResultSetName = 0;
323  r->sortSequence = 0;
324  r->otherInfo = 0;
325  return r;
326 }
327 
329 {
330  Z_SortResponse *r = (Z_SortResponse *)odr_malloc(o, sizeof(*r));
331 
332  r->referenceId = 0;
335  r->diagnostics = 0;
336  r->resultCount = 0;
337  r->otherInfo = 0;
338  return r;
339 }
340 
342 {
344  odr_malloc(o, sizeof(*r));
345 
346  r->referenceId = 0;
348  r->packageType = 0;
349  r->packageName = 0;
350  r->userId = 0;
351  r->retentionTime = 0;
352  r->permissions = 0;
353  r->description = 0;
354  r->taskSpecificParameters = 0;
356  r->elements = 0;
357  r->otherInfo = 0;
358  return r;
359 }
360 
362 {
364  odr_malloc(o, sizeof(*r));
365 
366  r->referenceId = 0;
368  r->num_diagnostics = 0;
369  r->diagnostics = 0;
370  r->taskPackage = 0;
371  r->otherInfo = 0;
372  return r;
373 }
374 
376 {
378  odr_malloc(o, sizeof(*r));
379 
380  r->referenceId = 0;
381  r->num_inputResultSetIds = 0;
382  r->inputResultSetIds = 0;
383  r->outputResultSetName = 0;
387  r->clustering = 0;
388  r->num_retentionCriteria = 0;
389  r->retentionCriteria = 0;
390  r->num_sortCriteria = 0;
391  r->sortCriteria = 0;
392  r->otherInfo = 0;
393  return r;
394 }
395 
397 {
399  odr_malloc(o, sizeof(*r));
400 
401  r->referenceId = 0;
403  r->resultSetCount = 0;
404  r->num_diagnostics = 0;
405  r->diagnostics = 0;
406  r->otherInfo = 0;
407  return r;
408 }
409 
410 Z_APDU *zget_APDU(ODR o, int which)
411 {
412  Z_APDU *r = (Z_APDU *)odr_malloc(o, sizeof(*r));
413 
414  switch (r->which = which)
415  {
416  case Z_APDU_initRequest:
418  break;
419  case Z_APDU_initResponse:
421  break;
424  break;
427  break;
430  break;
433  break;
436  break;
439  break;
440  case Z_APDU_scanRequest:
442  break;
443  case Z_APDU_scanResponse:
445  break;
449  break;
452  break;
455  break;
457  r->u.segmentRequest = zget_Segment(o);
458  break;
459  case Z_APDU_close:
460  r->u.close = zget_Close(o);
461  break;
464  break;
467  break;
470  break;
473  break;
474  case Z_APDU_sortRequest:
476  break;
477  case Z_APDU_sortResponse:
479  break;
482  break;
485  break;
488  break;
491  break;
492  default:
493  return 0;
494  }
495  return r;
496 }
497 
499  const char *addinfo)
500 {
502  odr_malloc(o, sizeof(*dr));
503 
505  dr->condition = odr_intdup(o, error);
507  dr->u.v2Addinfo = odr_strdup (o, addinfo ? addinfo : "");
508  return dr;
509 }
510 
511 Z_DiagRec *zget_DiagRec(ODR o, int error, const char *addinfo)
512 {
513  Z_DiagRec *dr = (Z_DiagRec*) odr_malloc(o, sizeof(*dr));
515  dr->u.defaultFormat = zget_DefaultDiagFormat(o, error, addinfo);
516  return dr;
517 }
518 
519 Z_DiagRecs *zget_DiagRecs(ODR o, int error, const char *addinfo)
520 {
521  Z_DiagRecs *drecs = (Z_DiagRecs*) odr_malloc(o, sizeof(*drecs));
522  Z_DiagRec **dr = (Z_DiagRec**) odr_malloc(o, sizeof(**dr));
523  drecs->diagRecs = dr;
524  dr[0] = zget_DiagRec(o, error, addinfo);
525  drecs->num_diagRecs = 1;
526  return drecs;
527 }
528 
530  int error, const char *addinfo)
531 {
532  Z_NamePlusRecord *rec = (Z_NamePlusRecord *) odr_malloc(o, sizeof(*rec));
533  Z_DiagRec *drec = (Z_DiagRec *)odr_malloc(o, sizeof(*drec));
534 
535  if (dbname)
536  rec->databaseName = odr_strdup(o, dbname);
537  else
538  rec->databaseName = 0;
540  rec->u.surrogateDiagnostic = drec;
542  drec->u.defaultFormat = zget_DefaultDiagFormat(o, error, addinfo);
543  return rec;
544 }
545 
546 Z_External *zget_init_diagnostics(ODR odr, int error, const char *addinfo)
547 {
548  Z_External *x, *x2;
553 
554  x = (Z_External*) odr_malloc(odr, sizeof *x);
555  x->descriptor = 0;
556  x->indirect_reference = 0;
559 
560  u = (Z_OtherInformation *) odr_malloc(odr, sizeof *u);
561  x->u.userInfo1 = u;
562  u->num_elements = 1;
563  u->list = (Z_OtherInformationUnit**) odr_malloc(odr, sizeof *u->list);
564  u->list[0] = (Z_OtherInformationUnit*) odr_malloc(odr, sizeof *u->list[0]);
565  l = u->list[0];
566  l->category = 0;
568 
569  x2 = (Z_External*) odr_malloc(odr, sizeof *x);
571  x2->descriptor = 0;
572  x2->indirect_reference = 0;
574  x2->which = Z_External_diag1;
575 
576  d = (Z_DiagnosticFormat*) odr_malloc(odr, sizeof *d);
577  x2->u.diag1 = d;
578  d->num = 1;
579  d->elements = (Z_DiagnosticFormat_s**) odr_malloc(odr, sizeof *d->elements);
580  d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc(odr, sizeof *d->elements[0]);
581  e = d->elements[0];
582 
584  e->u.defaultDiagRec = zget_DefaultDiagFormat(odr, error, addinfo);
585  e->message = 0;
586  return x;
587 }
588 
590  const char *addinfo)
591 {
592  Z_External *x, *x2;
597  char *octet_buf;
598  int octet_len;
599  ODR encode;
600 
601  u = (Z_OtherInformation *) odr_malloc(odr, sizeof *u);
602  u->num_elements = 1;
603  u->list = (Z_OtherInformationUnit**) odr_malloc(odr, sizeof *u->list);
604  u->list[0] = (Z_OtherInformationUnit*) odr_malloc(odr, sizeof *u->list[0]);
605  l = u->list[0];
606  l->category = 0;
608 
609  x2 = (Z_External*) odr_malloc(odr, sizeof *x);
611  x2->descriptor = 0;
612  x2->indirect_reference = 0;
613 
615  x2->which = Z_External_diag1;
616 
617  d = (Z_DiagnosticFormat*) odr_malloc(odr, sizeof *d);
618  x2->u.diag1 = d;
619  d->num = 1;
620  d->elements = (Z_DiagnosticFormat_s**) odr_malloc(odr, sizeof *d->elements);
621  d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc(odr, sizeof *d->elements[0]);
622  e = d->elements[0];
623 
625  e->u.defaultDiagRec = zget_DefaultDiagFormat(odr, error, addinfo);
626  e->message = 0;
627 
628  encode = odr_createmem(ODR_ENCODE);
629 
630  z_OtherInformation(encode, &u, 0, 0);
631 
632  octet_buf = odr_getbuf(encode, &octet_len, 0);
633 
634  x = (Z_External*) odr_malloc(odr, sizeof *x);
635  x->descriptor = 0;
636  x->indirect_reference = 0;
638  x->which = Z_External_octet;
639  x->u.octet_aligned = odr_create_Odr_oct(odr, octet_buf, octet_len);
640 
641  odr_destroy(encode);
642 
643  return x;
644 }
645 
646 /*
647  * Local variables:
648  * c-basic-offset: 4
649  * c-file-style: "Stroustrup"
650  * indent-tabs-mode: nil
651  * End:
652  * vim: shiftwidth=4 tabstop=8 expandtab
653  */
654 
#define Z_APDU_scanResponse
Definition: z-core.h:365
Odr_int * resultCount
Definition: z-core.h:625
Z_AttributesPlusTerm * termListAndStartPoint
Definition: z-core.h:949
Odr_int * condition
Definition: z-core.h:743
static Z_InitResponse * zget_InitResponse(ODR o)
Definition: zget.c:49
#define Z_APDU_searchResponse
Definition: z-core.h:352
Odr_int * numberOfRecordsReturned
Definition: z-core.h:667
#define Z_APDU_segmentRequest
Definition: z-core.h:368
Odr_int * maxSegmentSize
Definition: z-core.h:661
Odr_int * numberOfRecordsReturned
Definition: z-core.h:626
static Z_AccessControlRequest * zget_AccessControlRequest(ODR o)
Definition: zget.c:242
Odr_int * resultSetStatus
Definition: z-core.h:633
int num_diagRecs
Definition: z-core.h:688
static Z_DuplicateDetectionResponse * zget_DuplicateDetectionResponse(ODR o)
Definition: zget.c:396
union Z_DiagnosticFormat_s::@81 u
static Z_ExtendedServicesRequest * zget_ExtendedServicesRequest(ODR o)
Definition: zget.c:341
unsigned long x2
Z_ReferenceId * referenceId
Definition: z-core.h:1170
#define Z_Close_finished
Definition: z-core.h:1178
Odr_int * stepSize
Definition: z-core.h:950
Z_ReferenceId * referenceId
Definition: z-core.h:1259
Z_ReferenceId * referenceId
Definition: z-core.h:651
Z_ElementSetNames * smallSetElementSetNames
Definition: z-core.h:460
static Z_AccessControlResponse * zget_AccessControlResponse(ODR o)
Definition: zget.c:254
Z_InternationalString * implementationName
Definition: z-core.h:419
Odr_bool * continueFlag
Definition: z-core.h:902
Z_TriggerResourceControlRequest * triggerResourceControlRequest
Definition: z-core.h:336
Z_DefaultDiagFormat * zget_DefaultDiagFormat(ODR o, int error, const char *addinfo)
Creates Default Diag Format Diagnostic.
Definition: zget.c:498
#define Z_SortResponse_success
Definition: z-core.h:1046
static Z_DuplicateDetectionRequest * zget_DuplicateDetectionRequest(ODR o)
Definition: zget.c:375
char * odr_strdup(ODR o, const char *str)
Definition: odr_mem.c:36
Z_OtherInformation * otherInfo
Definition: z-core.h:953
Z_InternationalString * implementationVersion
Definition: z-core.h:386
#define Z_APDU_resourceControlResponse
Definition: z-core.h:360
Z_InternationalString * resultSetName
Definition: z-core.h:457
Odr_oid * preferredRecordSyntax
Definition: z-core.h:658
Z_InfoCategory * category
Definition: z-core.h:1280
#define Z_APDU_searchRequest
Definition: z-core.h:351
#define Z_External_diag1
Definition: prt-ext.h:77
#define ODR_ENCODE
Definition: odr.h:96
#define Z_DeleteResultSetRequest_list
Definition: z-core.h:822
#define YAZ_VERSION_SHA1
SHA1 ID for YAZ (Git)
Definition: yaz-version.h:45
Z_ReferenceId * referenceId
Definition: z-core.h:624
char * odr_getbuf(ODR o, int *len, int *size)
Definition: odr.c:277
Z_Records * records
Definition: z-core.h:678
Z_Query * query
Definition: z-core.h:463
int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt, const char *name)
Definition: z-core.c:1545
Z_OtherInformation * otherInfo
Definition: z-core.h:937
Odr_bool * searchStatus
Definition: z-core.h:628
#define Z_DiagRec_defaultFormat
Definition: z-core.h:736
Z_InternationalString * description
Definition: z-core.h:1130
Z_PresentRequest * presentRequest
Definition: z-core.h:328
Odr_oid * direct_reference
Definition: prt-ext.h:60
Z_ProtocolVersion * protocolVersion
Definition: z-core.h:413
Z_Records * records
Definition: z-core.h:635
#define Z_DefaultDiagFormat_v2Addinfo
Definition: z-core.h:748
int which
Definition: z-core.h:322
Z_ReferenceId * referenceId
Definition: z-core.h:863
Z_DiagRec ** diagnostics
Definition: z-core.h:1265
Z_DuplicateDetectionRequest * duplicateDetectionRequest
Definition: z-core.h:347
static Z_PresentResponse * zget_PresentResponse(ODR o)
Definition: zget.c:130
Z_OtherInformation * otherInfo
Definition: z-core.h:388
Z_ResourceReport * resourceReport
Definition: z-core.h:1174
#define Z_Options_present
Definition: z-core.h:430
#define Z_DiagnosticFormat_s_defaultDiagRec
Definition: z-diag1.h:89
Z_ReferenceId * opId
Definition: z-core.h:920
Odr_int * mediumSetPresentNumber
Definition: z-core.h:455
Z_RetentionCriterion ** retentionCriteria
Definition: z-core.h:1199
Z_ElementSetName * elements
Definition: z-core.h:1137
Z_Close * close
Definition: z-core.h:346
#define Z_ExtendedServicesRequest_waitIfPossible
Definition: z-core.h:1133
Z_DiagnosticFormat * diag1
Definition: prt-ext.h:119
Z_InitRequest * initRequest
Definition: z-core.h:324
Z_ExtendedServicesResponse * extendedServicesResponse
Definition: z-core.h:345
Z_OtherInformation * otherInfo
Definition: z-core.h:422
#define Z_APDU_initResponse
Definition: z-core.h:350
Z_ListStatuses * deleteListStatuses
Definition: z-core.h:833
Odr_int * resourceReportStatus
Definition: z-core.h:935
Odr_int * numberOfTermsRequested
Definition: z-core.h:951
Z_External * applicablePortionOfRecord
Definition: z-core.h:1194
Z_OtherInformation * additionalSearchInfo
Definition: z-core.h:636
Z_AccessControlRequest * accessControlRequest
Definition: z-core.h:332
#define Z_AccessControlRequest_simpleForm
Definition: z-core.h:868
Odr_bool * suspendedFlag
Definition: z-core.h:889
Z_ReferenceId * referenceId
Definition: z-core.h:957
#define Z_ExtendedServicesRequest_create
Definition: z-core.h:1121
Odr_int * maxRecordSize
Definition: z-core.h:660
Z_ResultSetId ** resultSetList
Definition: z-core.h:826
Z_OtherInformation * otherInfo
Definition: z-core.h:670
#define ODR_MASK_SET(mask, num)
Definition: odr.h:204
Z_InternationalString * packageName
Definition: z-core.h:1126
Z_ReferenceId * referenceId
Definition: z-core.h:1036
Z_SortResponse * sortResponse
Definition: z-core.h:342
Z_DatabaseName * databaseName
Definition: z-core.h:705
#define Z_Scan_success
Definition: z-core.h:959
Odr_int * maximumRecordSize
Definition: z-core.h:416
#define Z_APDU_accessControlResponse
Definition: z-core.h:358
union Z_AccessControlResponse::@65 u
Z_OtherInformation * otherInfo
Definition: z-core.h:1175
Z_OtherInformation * userInfo1
Definition: prt-ext.h:131
Z_ListStatuses * bulkStatuses
Definition: z-core.h:835
int num_segmentRecords
Definition: z-core.h:668
Z_OtherInformation * otherInfo
Definition: z-core.h:1058
void * odr_malloc(ODR o, size_t size)
Definition: odr_mem.c:31
#define Z_APDU_deleteResultSetResponse
Definition: z-core.h:356
Z_OtherInformation * otherInfo
Definition: z-core.h:837
Z_ResourceReportId * prefResourceReportFormat
Definition: z-core.h:921
const Odr_oid yaz_oid_userinfo_userinfo_1[]
Definition: oid_std.c:110
Header for OID database.
union Z_External::@30 u
Z_ReferenceId * referenceId
Definition: z-core.h:875
Z_OtherInformation * otherInfo
Definition: z-core.h:637
Z_ReferenceId * referenceId
Definition: z-core.h:666
Z_InternationalString ** inputResultSetNames
Definition: z-core.h:1038
int which
Definition: prt-ext.h:63
Odr_int * partialResultsAvailable
Definition: z-core.h:894
Z_InternationalString * implementationName
Definition: z-core.h:385
Odr_bool * replaceIndicator
Definition: z-core.h:456
Odr_int * numberOfEntriesReturned
Definition: z-core.h:967
Odr_int * resultSetStatus
Definition: z-core.h:1054
Z_DiagRecs * zget_DiagRecs(ODR o, int error, const char *addinfo)
Creates Diagnostic record - Z_DiagRecs type.
Definition: zget.c:519
Z_DiagRec * surrogateDiagnostic
Definition: z-core.h:709
Z_OtherInformation * otherInfo
Definition: z-core.h:884
Z_DiagRec ** diagRecs
Definition: z-core.h:689
Z_DuplicateDetectionCriterion ** duplicateDetectionCriteria
Definition: z-core.h:1196
Z_SortKeySpecList * sortSequence
Definition: z-core.h:1040
Z_PresentResponse * presentResponse
Definition: z-core.h:329
Odr_null * odr_nullval(void)
Definition: odr.c:30
Z_External * zget_init_diagnostics(ODR odr, int error, const char *addinfo)
Creates Initialize Response diagnostics.
Definition: zget.c:546
static Z_ResourceReportResponse * zget_ResourceReportResponse(ODR o)
Definition: zget.c:304
Odr_int * resultSetStartPoint
Definition: z-core.h:653
union Z_DefaultDiagFormat::@60 u
Odr_int * nextResultSetPosition
Definition: z-core.h:676
Z_OtherInformation * otherInfo
Definition: z-core.h:1138
static Z_SearchRequest * zget_SearchRequest(ODR o)
Definition: zget.c:73
#define Z_External_userInfo1
Definition: prt-ext.h:87
#define Z_APDU_deleteResultSetRequest
Definition: z-core.h:355
Z_ReferenceId * referenceId
Definition: z-core.h:901
union Z_DiagRec::@59 u
Z_OtherInformation * otherInfo
Definition: z-core.h:904
Z_IntUnit * retentionTime
Definition: z-core.h:1128
#define YAZ_VERSION
YAZ version as string.
Definition: yaz-version.h:36
Z_IdAuthentication * idAuthentication
Definition: z-core.h:383
Odr_int * stepSize
Definition: z-core.h:958
Odr_int * numberNotDeleted
Definition: z-core.h:834
Z_InternationalString * outputResultSetName
Definition: z-core.h:1193
Z_ElementSetNames * mediumSetElementSetNames
Definition: z-core.h:461
Z_ExtendedServicesRequest * extendedServicesRequest
Definition: z-core.h:344
static Z_SearchResponse * zget_SearchResponse(ODR o)
Definition: zget.c:94
Z_APDU * zget_APDU(ODR o, int which)
Definition: zget.c:410
Z_PresentStatus * presentStatus
Definition: z-core.h:634
Z_DiagRec ** diagnostics
Definition: z-core.h:1148
Z_OtherInformation * otherInfo
Definition: z-core.h:915
#define Z_APDU_resourceReportResponse
Definition: z-core.h:363
Odr_int * preferredMessageSize
Definition: z-core.h:415
Z_ReferenceId * referenceId
Definition: z-core.h:674
Odr_bool * result
Definition: z-core.h:417
#define Z_APDU_extendedServicesRequest
Definition: z-core.h:369
int which
Definition: z-core.h:732
Odr_int * maxSegmentCount
Definition: z-core.h:659
Z_External * zget_init_diagnostics_octet(ODR odr, int error, const char *addinfo)
Creates Initialize Response diagnostics (Octet-aligned EXTERNAL)
Definition: zget.c:589
Z_SortCriterion ** sortCriteria
Definition: z-core.h:1201
Z_External * userInformationField
Definition: z-core.h:421
Z_InternationalString * implementationId
Definition: z-core.h:384
static Z_DeleteResultSetRequest * zget_DeleteResultSetRequest(ODR o)
Definition: zget.c:143
Z_ResourceReport * resourceReport
Definition: z-core.h:936
Z_AccessControlResponse * accessControlResponse
Definition: z-core.h:333
char * v2Addinfo
Definition: z-core.h:746
Z_External * externallyDefinedInfo
Definition: z-core.h:1285
char * descriptor
Definition: prt-ext.h:62
Z_DeleteStatus * deleteOperationStatus
Definition: z-core.h:832
Z_DeleteResultSetRequest * deleteResultSetRequest
Definition: z-core.h:330
Odr_int * sortStatus
Definition: z-core.h:1049
Z_OtherInformation * otherInfo
Definition: z-core.h:1202
#define Z_ProtocolVersion_1
Definition: z-core.h:425
Z_OtherInformation * otherInfo
Definition: z-core.h:897
#define Z_TriggerResourceControlRequest_resourceReport
Definition: z-core.h:909
Z_DiagRec * zget_DiagRec(ODR o, int error, const char *addinfo)
Creates Diagnostic record - Z_DiagRecs type.
Definition: zget.c:511
Odr_bool * triggeredRequestFlag
Definition: z-core.h:896
Header for Z39.50 Protocol.
Z_OtherInformation * otherInfo
Definition: z-core.h:465
#define Z_APDU_resourceReportRequest
Definition: z-core.h:362
Z_ResultSetId * resultSetId
Definition: z-core.h:652
Z_ReferenceId * referenceId
Definition: z-core.h:1190
union Z_AccessControlRequest::@64 u
Z_CloseReason * closeReason
Definition: z-core.h:1171
const Odr_oid yaz_oid_diagset_bib_1[]
Definition: oid_std.c:36
Z_DatabaseName ** databaseNames
Definition: z-core.h:459
Z_Options * options
Definition: z-core.h:380
Odr_int * indirect_reference
Definition: prt-ext.h:61
Odr_oct * simpleForm
Definition: z-core.h:878
#define Z_DuplicateDetectionResponse_success
Definition: z-core.h:1260
#define Z_DeleteStatus_success
Definition: z-core.h:850
Z_DatabaseName ** databaseNames
Definition: z-core.h:947
Z_DeleteResultSetResponse * deleteResultSetResponse
Definition: z-core.h:331
Odr_int * preferredPositionInResponse
Definition: z-core.h:952
Z_ResourceReportId * prefResourceReportFormat
Definition: z-core.h:913
Z_OtherInformation * additionalSearchInfo
Definition: z-core.h:464
Z_ReferenceId * referenceId
Definition: z-core.h:452
Z_ResourceReport * resourceReport
Definition: z-core.h:890
Z_SearchResponse * searchResponse
Definition: z-core.h:327
Odr_bool * resultSetWanted
Definition: z-core.h:903
Odr_int * odr_intdup(ODR o, Odr_int v)
Definition: odr_mem.c:51
void odr_destroy(ODR o)
Definition: odr.c:253
Z_DefaultDiagFormat * defaultDiagRec
Definition: z-diag1.h:87
union Z_APDU::@46 u
Z_Range ** additionalRanges
Definition: z-core.h:656
Definition: odr.h:124
Odr_int * resultCount
Definition: z-core.h:1057
int num_databaseNames
Definition: z-core.h:946
Odr_int * positionOfTerm
Definition: z-core.h:968
Z_NamePlusRecord ** segmentRecords
Definition: z-core.h:669
#define Z_ExtendedServicesResponse_done
Definition: z-core.h:1143
Z_InternationalString * diagnosticInformation
Definition: z-core.h:1172
#define Z_APDU_extendedServicesResponse
Definition: z-core.h:370
#define Z_AccessControlResponse_simpleForm
Definition: z-core.h:880
Z_OtherInformation * otherInfo
Definition: z-core.h:871
Z_InternationalString * sortedResultSetName
Definition: z-core.h:1039
#define Z_APDU_duplicateDetectionResponse
Definition: z-core.h:373
static Z_SortRequest * zget_SortRequest(ODR o)
Definition: zget.c:316
static Z_ResourceControlResponse * zget_ResourceControlResponse(ODR o)
Definition: zget.c:230
static Z_ResourceControlRequest * zget_ResourceControlRequest(ODR o)
Definition: zget.c:215
Odr_int * deleteFunction
Definition: z-core.h:824
Z_ReferenceId * referenceId
Definition: z-core.h:888
Z_InitResponse * initResponse
Definition: z-core.h:325
Z_DiagRec ** diagnostics
Definition: z-core.h:1056
Odr_int * smallSetUpperBound
Definition: z-core.h:453
Z_ScanRequest * scanRequest
Definition: z-core.h:339
Odr_oid * odr_oiddup(ODR odr, const Odr_oid *o)
Definition: odr_util.c:60
Z_ResourceControlRequest * resourceControlRequest
Definition: z-core.h:334
static Z_InitRequest * zget_InitRequest(ODR o)
Definition: zget.c:16
Z_InternationalString * message
Definition: z-diag1.h:92
static Z_Segment * zget_Segment(ODR o)
Definition: zget.c:267
static Z_ScanResponse * zget_ScanResponse(ODR o)
Definition: zget.c:187
static Z_ExtendedServicesResponse * zget_ExtendedServicesResponse(ODR o)
Definition: zget.c:361
Z_DiagnosticFormat_s ** elements
Definition: z-diag1.h:97
Z_AttributeSetId * attributeSet
Definition: z-core.h:948
Z_DefaultDiagFormat * defaultFormat
Definition: z-core.h:734
#define Z_External_octet
Definition: prt-ext.h:66
static Z_DeleteResultSetResponse * zget_DeleteResultSetResponse(ODR o)
Definition: zget.c:156
Z_NamePlusRecord * zget_surrogateDiagRec(ODR o, const char *dbname, int error, const char *addinfo)
Creates Surrogate Diagnostic Records.
Definition: zget.c:529
static Z_ScanRequest * zget_ScanRequest(ODR o)
Definition: zget.c:171
Odr_int * numberOfRecordsReturned
Definition: z-core.h:675
Z_InternationalString * userId
Definition: z-core.h:1127
#define Z_APDU_sortRequest
Definition: z-core.h:366
#define Z_APDU_close
Definition: z-core.h:371
Z_ReferenceId * referenceId
Definition: z-core.h:926
Z_InternationalString * implementationId
Definition: z-core.h:418
Z_ReferenceId * referenceId
Definition: z-core.h:945
Z_RecordComposition * recordComposition
Definition: z-core.h:657
Z_InternationalString * implementationVersion
Definition: z-core.h:420
Z_ProtocolVersion * protocolVersion
Definition: z-core.h:379
Z_Segment * segmentRequest
Definition: z-core.h:343
Odr_int * preferredMessageSize
Definition: z-core.h:381
union Z_OtherInformationUnit::@74 information
Z_External * userInformationField
Definition: z-core.h:387
Odr_int * nextResultSetPosition
Definition: z-core.h:627
structure for all known EXTERNALs
Definition: prt-ext.h:58
Z_ReferenceId * referenceId
Definition: z-core.h:1120
#define Z_OtherInfo_externallyDefinedInfo
Definition: z-core.h:1289
Z_SortRequest * sortRequest
Definition: z-core.h:341
Z_DiagRec * diagnostic
Definition: z-core.h:883
#define Z_APDU_sortResponse
Definition: z-core.h:367
Z_OtherInformation * otherInfo
Definition: z-core.h:1150
static Z_TriggerResourceControlRequest * zget_TriggerResourceControlRequest(ODR o)
Definition: zget.c:202
#define Z_ResourceReportResponse_success
Definition: z-core.h:927
Z_OtherInformation * otherInfo
Definition: z-core.h:662
Odr_oid * preferredRecordSyntax
Definition: z-core.h:462
Z_Permissions * permissions
Definition: z-core.h:1129
Z_OtherInformation * otherInfo
Definition: z-core.h:679
Z_AttributeSetId * attributeSet
Definition: z-core.h:970
static Z_PresentRequest * zget_PresentRequest(ODR o)
Definition: zget.c:111
const Odr_oid yaz_oid_diagset_diag_1[]
Definition: oid_std.c:37
int num_databaseNames
Definition: z-core.h:458
Z_ResourceReportRequest * resourceReportRequest
Definition: z-core.h:337
Z_ReferenceId * referenceId
Definition: z-core.h:412
Odr_oid * diagnosticSetId
Definition: z-core.h:742
Odr_int * scanStatus
Definition: z-core.h:966
Definition: z-core.h:321
Z_Options * options
Definition: z-core.h:414
Odr_int * maximumRecordSize
Definition: z-core.h:382
Z_PresentStatus * presentStatus
Definition: z-core.h:677
ODR odr_createmem(int direction)
Definition: odr.c:200
Odr_int * numberOfRecordsRequested
Definition: z-core.h:654
Z_ResourceControlResponse * resourceControlResponse
Definition: z-core.h:335
Z_ReferenceId * referenceId
Definition: z-core.h:919
Z_OtherInformation * otherInfo
Definition: z-core.h:827
#define Z_APDU_resourceControlRequest
Definition: z-core.h:359
Z_ReferenceId * referenceId
Definition: z-core.h:831
Z_InternationalString * deleteMessage
Definition: z-core.h:836
#define Z_APDU_triggerResourceControlRequest
Definition: z-core.h:361
Z_ResourceReportResponse * resourceReportResponse
Definition: z-core.h:338
Z_OtherInformation * otherInfo
Definition: z-core.h:1266
#define Z_APDU_scanRequest
Definition: z-core.h:364
Z_ResourceReportId * resourceReportFormat
Definition: z-core.h:1173
Z_External * taskPackage
Definition: z-core.h:1149
Z_SearchRequest * searchRequest
Definition: z-core.h:326
#define Z_NamePlusRecord_surrogateDiagnostic
Definition: z-core.h:714
Z_External * taskSpecificParameters
Definition: z-core.h:1131
Odr_oct * simpleForm
Definition: z-core.h:866
Z_OtherInformation * otherInfo
Definition: z-core.h:922
Z_ReferenceId * referenceId
Definition: z-core.h:908
#define ODR_MASK_ZERO(mask)
Definition: odr.h:200
Z_ReferenceId * referenceId
Definition: z-core.h:378
#define Z_PresentStatus_success
Definition: z-core.h:778
Z_InternationalString ** inputResultSetIds
Definition: z-core.h:1192
Z_OtherInformation * otherInfo
Definition: z-core.h:1041
Z_ListEntries * entries
Definition: z-core.h:969
#define Z_APDU_accessControlRequest
Definition: z-core.h:357
Odr_int * largeSetLowerBound
Definition: z-core.h:454
Z_OtherInformationUnit ** list
Definition: z-core.h:1296
#define Z_APDU_initRequest
Definition: z-core.h:349
Z_ScanResponse * scanResponse
Definition: z-core.h:340
Odr_oct * odr_create_Odr_oct(ODR o, const char *buf, int sz)
Definition: odr_mem.c:66
static Z_SortResponse * zget_SortResponse(ODR o)
Definition: zget.c:328
#define Z_APDU_duplicateDetectionRequest
Definition: z-core.h:372
Odr_oct * octet_aligned
Definition: prt-ext.h:105
#define Z_APDU_presentResponse
Definition: z-core.h:354
union Z_NamePlusRecord::@57 u
Z_ReferenceId * referenceId
Definition: z-core.h:1045
Odr_bool * responseRequired
Definition: z-core.h:895
Z_OtherInformation * otherInfo
Definition: z-core.h:971
Z_ReferenceId * referenceId
Definition: z-core.h:821
static Z_Close * zget_Close(ODR o)
Definition: zget.c:279
#define Z_Options_search
Definition: z-core.h:429
Z_ReferenceId * referenceId
Definition: z-core.h:1142
#define Z_ProtocolVersion_2
Definition: z-core.h:426
static Z_ResourceReportRequest * zget_ResourceReportRequest(ODR o)
Definition: zget.c:292
#define Z_SortResponse_empty
Definition: z-core.h:1050
Z_DuplicateDetectionResponse * duplicateDetectionResponse
Definition: z-core.h:348
#define Z_APDU_presentRequest
Definition: z-core.h:353
Odr_bool * odr_booldup(ODR o, Odr_bool v)
Definition: odr_mem.c:56