+/* ------------------------ SEGMENTATION -------------------- */
+
+typedef struct Z_Segment
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ int *numberOfRecordsReturned;
+ int num_segmentRecords;
+ Z_NamePlusRecord **segmentRecords;
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_Segment;
+
+/* ----------------------- Extended Services ---------------- */
+
+typedef struct Z_Permissions
+{
+ char *userId;
+ int num_allowableFunctions;
+ int **allowableFunctions;
+#define Z_Permissions_delete 1
+#define Z_Permissions_modifyContents 2
+#define Z_Permissions_modifyPermissions 3
+#define Z_Permissions_present 4
+#define Z_Permissions_invoke 5
+} Z_Permissions;
+
+typedef struct Z_ExtendedServicesRequest
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ int *function;
+#define Z_ExtendedServicesRequest_create 1
+#define Z_ExtendedServicesRequest_delete 2
+#define Z_ExtendedServicesRequest_modify 3
+ Odr_oid *packageType;
+ char *packageName; /* OPTIONAL */
+ char *userId; /* OPTIONAL */
+ Z_IntUnit *retentionTime; /* OPTIONAL */
+ Z_Permissions *permissions; /* OPTIONAL */
+ char *description; /* OPTIONAL */
+ Z_External *taskSpecificParameters; /* OPTIONAL */
+ int *waitAction;
+#define Z_ExtendedServicesRequest_wait 1
+#define Z_ExtendedServicesRequest_waitIfPossible 2
+#define Z_ExtendedServicesRequest_dontWait 3
+#define Z_ExtendedServicesRequest_dontReturnPackage 4
+ char *elements; /* OPTIONAL */
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_ExtendedServicesRequest;
+
+typedef struct Z_ExtendedServicesResponse
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ int *operationStatus;
+#define Z_ExtendedServicesResponse_done 1
+#define Z_ExtendedServicesResponse_accepted 2
+#define Z_ExtendedServicesResponse_failure 3
+ int num_diagnostics;
+ Z_DiagRec **diagnostics; /* OPTIONAL */
+ Z_External *taskPackage; /* OPTIONAL */
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_ExtendedServicesResponse;
+
+/* ------------------------ Sort --------------------------- */
+
+typedef struct Z_SortAttributes
+{
+ Odr_oid *id;
+ Z_AttributeList *list;
+} Z_SortAttributes;
+
+typedef struct Z_SortKey
+{
+ int which;
+#define Z_SortKey_sortField 0
+#define Z_SortKey_elementSpec 1
+#define Z_SortKey_sortAttributes 2
+ union
+ {
+ char *sortField;
+ Z_Specification *elementSpec;
+ Z_SortAttributes *sortAttributes;
+ } u;
+} Z_SortKey;
+
+typedef struct Z_SortDbSpecific
+{
+ char *databaseName;
+ Z_SortKey *dbSort;
+} Z_SortDbSpecific;
+
+typedef struct Z_SortDbSpecificList
+{
+ int num_dbSpecific;
+ Z_SortDbSpecific **dbSpecific;
+} Z_SortDbSpecificList;
+
+typedef struct Z_SortElement
+{
+ int which;
+#define Z_SortElement_generic 0
+#define Z_SortElement_databaseSpecific 1
+ union
+ {
+ Z_SortKey *generic;
+ Z_SortDbSpecificList *databaseSpecific;
+ } u;
+} Z_SortElement;
+
+typedef struct Z_SortMissingValueAction
+{
+ int which;
+#define Z_SortMissingValAct_abort 0
+#define Z_SortMissingValAct_null 1
+#define Z_SortMissingValAct_valData 2
+ union
+ {
+ Odr_null *abort;
+ Odr_null *null;
+ Odr_oct *valData;
+ } u;
+} Z_SortMissingValueAction;
+
+typedef struct Z_SortKeySpec
+{
+ Z_SortElement *sortElement;
+ int *sortRelation;
+#define Z_SortRelation_ascending 0
+#define Z_SortRelation_descending 1
+#define Z_SortRelation_ascendingByFreq 3
+#define Z_SortRelation_descendingByFreq 4
+ int *caseSensitivity;
+#define Z_SortCase_caseSensitive 0
+#define Z_SortCase_caseInsensitive 1
+ Z_SortMissingValueAction *missingValueAction; /* OPTIONAL */
+} Z_SortKeySpec;
+
+typedef struct Z_SortResponse
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ int *sortStatus;
+#define Z_SortStatus_success 0
+#define Z_SortStatus_partial_1 1
+#define Z_SortStatus_failure 2
+ int *resultSetStatus; /* OPTIONAL */
+#define Z_SortResultSetStatus_empty 1
+#define Z_SortResultSetStatus_interim 2
+#define Z_SortResultSetStatus_unchanged 3
+#define Z_SortResultSetStatus_none 4
+ Z_DiagRecs *diagnostics; /* OPTIONAL */
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_SortResponse;
+
+typedef struct Z_SortKeySpecList
+{
+ int num_specs;
+ Z_SortKeySpec **specs;
+} Z_SortKeySpecList;
+
+typedef struct Z_SortRequest
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ Z_StringList *inputResultSetNames;
+ char *sortedResultSetName;
+ Z_SortKeySpecList *sortSequence;
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_SortRequest;
+
+/* ----------------------- Resource Report ------------------ */
+
+typedef struct Z_ResourceReportRequest
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ Z_ReferenceId *opId; /* OPTIONAL */
+ Odr_oid *prefResourceReportFormat; /* OPTIONAL */
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_ResourceReportRequest;
+
+typedef struct Z_ResourceReportResponse
+{
+ Z_ReferenceId *referenceId; /* OPTIONAL */
+ int *resourceReportStatus;
+#define Z_ResourceReportStatus_success 0
+#define Z_ResourceReportStatus_partial 1
+#define Z_ResourceReportStatus_failure_1 2
+#define Z_ResourceReportStatus_failure_2 3
+#define Z_ResourceReportStatus_failure_3 4
+#define Z_ResourceReportStatus_failure_4 5
+#define Z_ResourceReportStatus_failure_5 6
+#define Z_ResourceReportStatus_failure_6 7
+ Z_External *resourceReport; /* OPTIONAL */
+ Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_ResourceReportResponse;
+