/*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation, in whole or in part, for any purpose, is hereby granted,
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.39 1997-05-14 06:53:44 adam
+ * Revision 1.47 1999-04-20 09:56:48 adam
+ * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
+ * Modified all encoders/decoders to reflect this change.
+ *
+ * Revision 1.46 1998/10/20 13:55:44 quinn
+ * Fixed Scan bug in asn and client
+ *
+ * Revision 1.45 1998/08/19 16:10:07 adam
+ * Changed som member names of DeleteResultSetRequest/Response.
+ *
+ * Revision 1.44 1998/05/18 10:14:08 adam
+ * Minor change - removed 'dead' definitions.
+ *
+ * Revision 1.43 1998/03/31 11:07:45 adam
+ * Furhter work on UNIverse resource report.
+ * Added Extended Services handling in frontend server.
+ *
+ * Revision 1.42 1998/03/20 14:46:06 adam
+ * Added UNIverse Resource Reports.
+ *
+ * Revision 1.41 1998/02/10 15:31:52 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.40 1997/09/01 08:49:50 adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.39 1997/05/14 06:53:44 adam
* C++ support.
*
* Revision 1.38 1997/04/30 08:52:09 quinn
extern "C" {
#endif
-/*
- * Because we didn't have time to put all of the extra v3 elements in here
- * before the first applications were written, we have to place them
- * in #ifdefs in places where they would break existing code. If you are
- * developing new stuff, we urge you to leave them in, even if you don't
- * intend to use any v3 features. When we are comfortable that the old
- * apps have been updated, we'll remove the #ifdefs.
- */
-
-#define Z_95
-
/* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
struct Z_External;
char *implementationId; /* OPTIONAL */
char *implementationName; /* OPTIONAL */
char *implementationVersion; /* OPTIONAL */
- Z_External *userInformationField; /* OPTIONAL */
-#ifdef Z_95
+ Z_External *userInformationField; /* OPTIONAL */
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_InitRequest;
typedef struct Z_InitResponse
char *implementationName; /* OPTIONAL */
char *implementationVersion; /* OPTIONAL */
Z_External *userInformationField; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_InitResponse;
typedef struct Z_NSRAuthentication
char *account;
} Z_NSRAuthentication;
-int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt);
+int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
+ const char *name);
-int z_StrAuthentication(ODR o, char **p, int opt);
+int z_StrAuthentication(ODR o, char **p, int opt, const char *name);
/* ------------------ SEARCH SERVICE ----------------*/
typedef struct Z_AttributeElement
{
-#ifdef Z_95
Odr_oid *attributeSet; /* OPTIONAL - v3 only */
-#endif
int *attributeType;
-#ifdef Z_95
int which;
#define Z_AttributeValue_numeric 0
#define Z_AttributeValue_complex 1
int *numeric;
Z_ComplexAttribute *complex;
} value;
-#else
- int *attributeValue;
-#endif
} Z_AttributeElement;
typedef struct Z_Term
Z_ElementSetNames *mediumSetElementSetNames; /* OPTIONAL */
Odr_oid *preferredRecordSyntax; /* OPTIONAL */
Z_Query *query;
-#ifdef Z_95
Z_OtherInformation *additionalSearchInfo; /* OPTIONAL */
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_SearchRequest;
/* ------------------------ RECORD -------------------------- */
typedef Z_External Z_DatabaseRecord;
-#ifdef Z_95
-
typedef struct Z_DefaultDiagFormat
{
Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
} u;
} Z_DiagRec;
-#else
-
-typedef struct Z_DiagRec
-{
- Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
- int *condition;
- char *addinfo;
-} Z_DiagRec;
-
-#endif
-
typedef struct Z_DiagRecs
{
int num_diagRecs;
#define Z_PRES_PARTIAL_4 4
#define Z_PRES_FAILURE 5
Z_Records *records; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *additionalSearchInfo;
Z_OtherInformation *otherInfo;
-#endif
} Z_SearchResponse;
/* ------------------------- PRESENT SERVICE -----------------*/
Z_ResultSetId *resultSetId;
int *resultSetStartPoint;
int *numberOfRecordsRequested;
-#ifdef Z_95
int num_ranges;
Z_Range **additionalRanges; /* OPTIONAL */
Z_RecordComposition *recordComposition; /* OPTIONAL */
-#else
- Z_ElementSetNames *elementSetNames; /* OPTIONAL */
-#endif
Odr_oid *preferredRecordSyntax; /* OPTIONAL */
-#ifdef Z_95
int *maxSegmentCount; /* OPTIONAL */
int *maxRecordSize; /* OPTIONAL */
int *maxSegmentSize; /* OPTIONAL */
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_PresentRequest;
typedef struct Z_PresentResponse
int *nextResultSetPosition;
int *presentStatus;
Z_Records *records;
-#ifdef Z_95
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_PresentResponse;
/* ------------------ RESOURCE CONTROL ----------------*/
#define Z_TriggerResourceCtrl_cancel 3
Odr_oid *prefResourceReportFormat; /* OPTIONAL */
bool_t *resultSetWanted; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_TriggerResourceControlRequest;
typedef struct Z_ResourceControlRequest
#define Z_ResourceControlRequest_none 3
bool_t *responseRequired;
bool_t *triggeredRequestFlag; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_ResourceControlRequest;
typedef struct Z_ResourceControlResponse
Z_ReferenceId *referenceId; /* OPTIONAL */
bool_t *continueFlag;
bool_t *resultSetWanted; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_ResourceControlResponse;
Odr_oct *simpleForm;
Z_External *externallyDefined;
} u;
-#ifdef Z_95
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_AccessControlRequest;
typedef struct Z_AccessControlResponse
Z_External *externallyDefined;
} u;
Z_DiagRec *diagnostic; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_AccessControlResponse;
/* ------------------------ SCAN SERVICE -------------------- */
Z_AttributesPlusTerm **terms;
} Z_AlternativeTerm;
-#if 1
-
typedef struct Z_ByDatabase
{
char *db;
Z_OccurrenceByAttributesElem **elements;
} Z_OccurrenceByAttributes;
-#else
-
-/*
- * Old, incomplete definition of OccurrenceByAttributes.
- */
-
-typedef struct Z_OccurrenceByAttributes
-{
- Z_AttributeList *attributes;
-#if 0
- int which;
-#define Z_OByAtt_global 0
-#define Z_ObyAtt_byDatabase 1
- union
- {
-#endif
- int *global;
-#if 0
- /* Z_ByDatabase *byDatabase; */
- } u;
-#endif
-} Z_OccurrenceByAttributes;
-
-#endif
-
typedef struct Z_TermInfo
{
Z_Term *term;
} u;
} Z_Entry;
+#ifdef BUGGY_LISTENTRIES
+
typedef struct Z_Entries
{
int num_entries;
} u;
} Z_ListEntries;
+#endif
+
+typedef struct Z_ListEntries {
+ int num_entries;
+ Z_Entry **entries; /* OPT */
+ int num_nonsurrogateDiagnostics;
+ Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
+} Z_ListEntries;
+
typedef struct Z_ScanRequest
{
Z_ReferenceId *referenceId; /* OPTIONAL */
int *stepSize; /* OPTIONAL */
int *numberOfTermsRequested;
int *preferredPositionInResponse; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_ScanRequest;
typedef struct Z_ScanResponse
int *positionOfTerm; /* OPTIONAL */
Z_ListEntries *entries; /* OPTIONAL */
Odr_oid *attributeSet; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_ScanResponse;
int *deleteFunction;
#define Z_DeleteRequest_list 0
#define Z_DeleteRequest_all 1
- int num_ids;
+ int num_resultSetList;
Z_ResultSetId **resultSetList; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_DeleteResultSetRequest;
+typedef struct Z_ListStatuses {
+ int num;
+ Z_ListStatus **elements;
+} Z_ListStatuses;
+
typedef struct Z_DeleteResultSetResponse
{
Z_ReferenceId *referenceId; /* OPTIONAL */
int *deleteOperationStatus;
- int num_statuses;
- Z_ListStatus **deleteListStatuses; /* OPTIONAL */
+ Z_ListStatuses *deleteListStatuses;/* OPTIONAL */
int *numberNotDeleted; /* OPTIONAL */
- int num_bulkStatuses;
- Z_ListStatus **bulkStatuses; /* OPTIONAL */
+ Z_ListStatuses *bulkStatuses; /* OPTIONAL */
char *deleteMessage; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo;
-#endif
} Z_DeleteResultSetResponse;
/* ------------------------ CLOSE SERVICE ------------------- */
char *diagnosticInformation; /* OPTIONAL */
Odr_oid *resourceReportFormat; /* OPTIONAL */
Z_External *resourceReport; /* OPTIONAL */
-#ifdef Z_95
Z_OtherInformation *otherInfo; /* OPTIONAL */
-#endif
} Z_Close;
/* ------------------------ SEGMENTATION -------------------- */
} u;
} Z_APDU;
-int z_APDU(ODR o, Z_APDU **p, int opt);
-int z_SUTRS(ODR o, Odr_oct **p, int opt);
-
-Z_InitRequest *zget_InitRequest(ODR o);
-Z_InitResponse *zget_InitResponse(ODR o);
-Z_SearchRequest *zget_SearchRequest(ODR o);
-Z_SearchResponse *zget_SearchResponse(ODR o);
-Z_PresentRequest *zget_PresentRequest(ODR o);
-Z_PresentResponse *zget_PresentResponse(ODR o);
-Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
-Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
-Z_ScanRequest *zget_ScanRequest(ODR o);
-Z_ScanResponse *zget_ScanResponse(ODR o);
-Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
-Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
-Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
-Z_Close *zget_Close(ODR o);
-int z_StringList(ODR o, Z_StringList **p, int opt);
-int z_InternationalString(ODR o, char **p, int opt);
-int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt);
-int z_ElementSetName(ODR o, char **p, int opt);
-int z_IntUnit(ODR o, Z_IntUnit **p, int opt);
-int z_Unit(ODR o, Z_Unit **p, int opt);
-int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt);
-int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt);
-int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt);
-int z_Term(ODR o, Z_Term **p, int opt);
-int z_Specification(ODR o, Z_Specification **p, int opt);
-int z_Permissions(ODR o, Z_Permissions **p, int opt);
-int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
-int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
-int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
-Z_APDU *zget_APDU(ODR o, int which);
-int z_Query(ODR o, Z_Query **p, int opt);
+YAZ_EXPORT int z_APDU(ODR o, Z_APDU **p, int opt, const char *name);
+YAZ_EXPORT int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name);
+
+YAZ_EXPORT Z_InitRequest *zget_InitRequest(ODR o);
+YAZ_EXPORT Z_InitResponse *zget_InitResponse(ODR o);
+YAZ_EXPORT Z_SearchRequest *zget_SearchRequest(ODR o);
+YAZ_EXPORT Z_SearchResponse *zget_SearchResponse(ODR o);
+YAZ_EXPORT Z_PresentRequest *zget_PresentRequest(ODR o);
+YAZ_EXPORT Z_PresentResponse *zget_PresentResponse(ODR o);
+YAZ_EXPORT Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
+YAZ_EXPORT Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
+YAZ_EXPORT Z_ScanRequest *zget_ScanRequest(ODR o);
+YAZ_EXPORT Z_ScanResponse *zget_ScanResponse(ODR o);
+YAZ_EXPORT Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
+YAZ_EXPORT Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
+YAZ_EXPORT Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
+YAZ_EXPORT Z_Close *zget_Close(ODR o);
+YAZ_EXPORT int z_StringList(ODR o, Z_StringList **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_InternationalString(ODR o, char **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
+ const char *naem);
+YAZ_EXPORT int z_ElementSetName(ODR o, char **p, int opt, const char *name);
+YAZ_EXPORT int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name);
+YAZ_EXPORT int z_Unit(ODR o, Z_Unit **p, int opt, const char *name);
+YAZ_EXPORT int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p,
+ int opt, const char *name);
+YAZ_EXPORT int z_Term(ODR o, Z_Term **p, int opt, const char *name);
+YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name);
+YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name);
+YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt,
+ const char *name);
+YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
+ const char *name);
+YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
+YAZ_EXPORT int z_Query(ODR o, Z_Query **p, int opt, const char *name);
#ifdef __cplusplus
}
#include <prt-esp.h>
#include <prt-add.h>
+#include <prt-dat.h>
+#include <prt-univ.h>
#include <prt-ext.h>
#endif