* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zget.c,v $
- * Revision 1.2 1995-05-30 10:15:49 quinn
+ * Revision 1.10 1996-01-02 08:57:23 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.9 1995/09/29 17:11:55 quinn
+ * Smallish
+ *
+ * Revision 1.8 1995/09/27 15:02:43 quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.7 1995/06/15 07:44:52 quinn
+ * Moving to v3.
+ *
+ * Revision 1.6 1995/06/14 15:26:37 quinn
+ * *** empty log message ***
+ *
+ * Revision 1.5 1995/06/07 14:42:30 quinn
+ * Fixed CLOSE
+ *
+ * Revision 1.4 1995/06/07 14:36:25 quinn
+ * Added CLOSE
+ *
+ * Revision 1.3 1995/06/05 10:52:06 quinn
+ * Fixed some negligences.
+ *
+ * Revision 1.2 1995/05/30 10:15:49 quinn
* Added our implementor's ID
*
* Revision 1.1 1995/05/22 11:30:20 quinn
*/
#include <proto.h>
-#include "../version.h"
Z_InitRequest *zget_InitRequest(ODR o)
{
r->implementationName = "Index Data/YAZ";
r->implementationVersion = YAZ_VERSION;
r->userInformationField = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
*r->preferredMessageSize = 30*1024;
r->maximumRecordSize = odr_malloc(o, sizeof(int));
*r->maximumRecordSize = 30*1024;
- r->implementationId = "YAZ";
- r->implementationName = "Index Data YAZ Z39.50/SR implementation";
+ r->result = odr_malloc(o, sizeof(bool_t));
+ *r->result = 1;
+ r->implementationId = "YAZ (id=81)";
+ r->implementationName = "Index Data/YAZ";
r->implementationVersion = YAZ_VERSION;
r->userInformationField = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->mediumSetElementSetNames = 0;
r->preferredRecordSyntax = 0;
r->query = 0;
+#ifdef Z_95
+ r->additionalSearchInfo = 0;
+ r->otherInfo = 0;
+#endif
return r;
}
r->resultSetStatus = 0;
r->presentStatus = 0;
r->records = 0;
+#ifdef Z_95
+ r->additionalSearchInfo = 0;
+ r->otherInfo = 0;
+#endif
return r;
}
*r->resultSetStartPoint = 1;
r->numberOfRecordsRequested = odr_malloc(o, sizeof(int));
*r->numberOfRecordsRequested = 10;
+#ifdef Z_95
+ r->num_ranges = 0;
+ r->additionalRanges = 0;
+ r->recordComposition = 0;
+#else
r->elementSetNames = 0;
+#endif
r->preferredRecordSyntax = 0;
+#ifdef Z_95
+ r->maxSegmentCount = 0;
+ r->maxRecordSize = 0;
+ r->maxSegmentSize = 0;
+ r->otherInfo = 0;
+#endif
return r;
}
r->presentStatus = odr_malloc(o, sizeof(int));
*r->presentStatus = Z_PRES_SUCCESS;
r->records = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
*r->deleteFunction = Z_DeleteRequest_list;
r->num_ids = 0;
r->resultSetList = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->num_bulkStatuses = 0;
r->bulkStatuses = 0;
r->deleteMessage = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->numberOfTermsRequested = odr_malloc(o, sizeof(int));
*r->numberOfTermsRequested = 20;
r->preferredPositionInResponse = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->positionOfTerm =0;
r->entries = 0;
r->attributeSet = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
*r->requestedAction = Z_TriggerResourceCtrl_resourceReport;
r->prefResourceReportFormat = 0;
r->resultSetWanted = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->responseRequired = odr_malloc(o, sizeof(bool_t));
*r->responseRequired = 0;
r->triggeredRequestFlag = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->continueFlag = odr_malloc(o, sizeof(bool_t));
*r->continueFlag = 1;
r->resultSetWanted = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->referenceId = 0;
r->which = Z_AccessRequest_simpleForm;
r->u.simpleForm = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
r->which = Z_AccessResponse_simpleForm;
r->u.simpleForm = 0;
r->diagnostic = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
return r;
}
-Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which)
+Z_Segment *zget_Segment(ODR o)
+{
+ Z_Segment *r = odr_malloc(o, sizeof(*r));
+
+ r->referenceId = 0;
+ r->numberOfRecordsReturned = odr_malloc(o, sizeof(int));
+ *r->numberOfRecordsReturned = 0;
+ r->num_segmentRecords = 0;
+ r->segmentRecords = 0;
+ r->otherInfo = 0;
+ return r;
+}
+
+Z_Close *zget_Close(ODR o)
+{
+ Z_Close *r = odr_malloc(o, sizeof(*r));
+
+ r->referenceId = 0;
+ r->closeReason = odr_malloc(o, sizeof(int));
+ *r->closeReason = Z_Close_finished;
+ r->diagnosticInformation = 0;
+ r->resourceReportFormat = 0;
+ r->resourceReport = 0;
+#ifdef Z_95
+ r->otherInfo = 0;
+#endif
+ return r;
+}
+
+Z_APDU *zget_APDU(ODR o, int which)
{
Z_APDU *r = odr_malloc(o, sizeof(*r));
case Z_APDU_resourceControlResponse:
r->u.resourceControlResponse = zget_ResourceControlResponse(o);
break;
+ case Z_APDU_segmentRequest:
+ r->u.segmentRequest = zget_Segment(o);
+ break;
+ case Z_APDU_close:
+ r->u.close = zget_Close(o);
+ break;
default:
fprintf(stderr, "Bad APDU-type to zget_APDU");
exit(1);