1 | /*
|
---|
2 | * Copyright (c) 1995-1998, Index Data.
|
---|
3 | *
|
---|
4 | * Permission to use, copy, modify, distribute, and sell this software and
|
---|
5 | * its documentation, in whole or in part, for any purpose, is hereby granted,
|
---|
6 | * provided that:
|
---|
7 | *
|
---|
8 | * 1. This copyright and permission notice appear in all copies of the
|
---|
9 | * software and its documentation. Notices of copyright or attribution
|
---|
10 | * which appear at the beginning of any file must remain unchanged.
|
---|
11 | *
|
---|
12 | * 2. The names of Index Data or the individual authors may not be used to
|
---|
13 | * endorse or promote products derived from this software without specific
|
---|
14 | * prior written permission.
|
---|
15 | *
|
---|
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
|
---|
17 | * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
---|
18 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
---|
19 | * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
---|
20 | * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
|
---|
21 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
|
---|
22 | * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
---|
23 | * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
---|
24 | * OF THIS SOFTWARE.
|
---|
25 | *
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef PRT_EXD_H
|
---|
29 | #define PRT_EXD_H
|
---|
30 |
|
---|
31 | #include <yaz/yconfig.h>
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | typedef struct Z_TaskPackage
|
---|
38 | {
|
---|
39 | Odr_oid *packageType;
|
---|
40 | char *packageName; /* OPTIONAL */
|
---|
41 | char *userId; /* OPTIONAL */
|
---|
42 | Z_IntUnit *retentionTime; /* OPTIONAL */
|
---|
43 | Z_Permissions *permissions; /* OPTIONAL */
|
---|
44 | char *description; /* OPTIONAL */
|
---|
45 | Odr_oct *targetReference;
|
---|
46 | char *creationDateTime; /* OPTIONAL */
|
---|
47 | int *taskStatus;
|
---|
48 | #define Z_TaskPackage_pending 0
|
---|
49 | #define Z_TaskPackage_active 1
|
---|
50 | #define Z_TaskPackage_complete 2
|
---|
51 | #define Z_TaskPackage_aborted 3
|
---|
52 | int num_packageDiagnostics;
|
---|
53 | Z_DiagRec **packageDiagnostics; /* OPTIONAL */
|
---|
54 | Z_External *taskSpecificParameters;
|
---|
55 | } Z_TaskPackage;
|
---|
56 |
|
---|
57 | int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name);
|
---|
58 |
|
---|
59 | /* ----------------------- ITEM ORDER ------------------------- */
|
---|
60 |
|
---|
61 | typedef struct Z_IOTargetPart
|
---|
62 | {
|
---|
63 | Z_External *itemRequest; /* OPTIONAL */
|
---|
64 | Z_External *statusOrErrorReport;
|
---|
65 | int *auxiliaryStatus; /* OPTIONAL */
|
---|
66 | #define Z_IOTargetPart_notReceived 1
|
---|
67 | #define Z_IOTargetPart_loanQueue 2
|
---|
68 | #define Z_IOTargetPart_forwarded 3
|
---|
69 | #define Z_IOTargetPart_unfilledCopyright 4
|
---|
70 | #define Z_IOTargetPart_filledCopyright 1
|
---|
71 | } Z_IOTargetPart;
|
---|
72 |
|
---|
73 | typedef struct Z_IOResultSetItem
|
---|
74 | {
|
---|
75 | char *resultSetId;
|
---|
76 | int *item;
|
---|
77 | } Z_IOResultSetItem;
|
---|
78 |
|
---|
79 | typedef struct Z_IOOriginPartNotToKeep
|
---|
80 | {
|
---|
81 | Z_IOResultSetItem *resultSetItem; /* OPTIONAL */
|
---|
82 | Z_External *itemRequest; /* OPTIONAL */
|
---|
83 | } Z_IOOriginPartNotToKeep;
|
---|
84 |
|
---|
85 | typedef struct Z_IOContact
|
---|
86 | {
|
---|
87 | char *name; /* OPTIONAL */
|
---|
88 | char *phone; /* OPTIONAL */
|
---|
89 | char *email; /* OPTIONAL */
|
---|
90 | } Z_IOContact;
|
---|
91 |
|
---|
92 | typedef struct Z_IOCreditCardInfo
|
---|
93 | {
|
---|
94 | char *nameOnCard;
|
---|
95 | char *expirationDate;
|
---|
96 | char *cardNumber;
|
---|
97 | } Z_IOCreditCardInfo;
|
---|
98 |
|
---|
99 | typedef struct Z_IOBilling
|
---|
100 | {
|
---|
101 | int which;
|
---|
102 | #define Z_IOBilling_billInvoice 0
|
---|
103 | #define Z_IOBilling_prepay 1
|
---|
104 | #define Z_IOBilling_depositAccount 2
|
---|
105 | #define Z_IOBilling_creditCard 3
|
---|
106 | #define Z_IOBilling_cardInfoPreviouslySupplied 4
|
---|
107 | #define Z_IOBilling_privateKnown 5
|
---|
108 | #define Z_IOBilling_privateNotKnown 6
|
---|
109 | union
|
---|
110 | {
|
---|
111 | Odr_null *noinfo;
|
---|
112 | Z_IOCreditCardInfo *creditCard;
|
---|
113 | Z_External *privateNotKnown;
|
---|
114 | } paymentMethod;
|
---|
115 | char *customerReference; /* OPTIONAL */
|
---|
116 | char *customerPONumber; /* OPTIONAL */
|
---|
117 | } Z_IOBilling;
|
---|
118 |
|
---|
119 | typedef struct Z_IOOriginPartToKeep
|
---|
120 | {
|
---|
121 | Z_External *supplDescription; /* OPTIONAL */
|
---|
122 | Z_IOContact *contact; /* OPTIONAL */
|
---|
123 | Z_IOBilling *addlBilling; /* OPTIONAL */
|
---|
124 | } Z_IOOriginPartToKeep;
|
---|
125 |
|
---|
126 | typedef struct Z_IORequest
|
---|
127 | {
|
---|
128 | Z_IOOriginPartToKeep *toKeep; /* OPTIONAL */
|
---|
129 | Z_IOOriginPartNotToKeep *notToKeep;
|
---|
130 | } Z_IORequest;
|
---|
131 |
|
---|
132 | typedef struct Z_IOTaskPackage
|
---|
133 | {
|
---|
134 | Z_IOOriginPartToKeep *originPart; /* OPTIONAL */
|
---|
135 | Z_IOTargetPart *targetPart;
|
---|
136 | } Z_IOTaskPackage;
|
---|
137 |
|
---|
138 | typedef struct Z_ItemOrder
|
---|
139 | {
|
---|
140 | int which;
|
---|
141 | #define Z_ItemOrder_esRequest 0
|
---|
142 | #define Z_ItemOrder_taskPackage 1
|
---|
143 | union
|
---|
144 | {
|
---|
145 | Z_IORequest *esRequest;
|
---|
146 | Z_IOTaskPackage *taskPackage;
|
---|
147 | } u;
|
---|
148 | } Z_ItemOrder;
|
---|
149 |
|
---|
150 | int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name);
|
---|
151 |
|
---|
152 | /* ----------------------- ITEM UPDATE ------------------------ */
|
---|
153 |
|
---|
154 | typedef struct Z_IUSuppliedRecordsId
|
---|
155 | {
|
---|
156 | int which;
|
---|
157 | #define Z_IUSuppliedRecordsId_timeStamp 1
|
---|
158 | #define Z_IUSuppliedRecordsId_versionNumber 2
|
---|
159 | #define Z_IUSuppliedRecordsId_previousVersion 3
|
---|
160 | union {
|
---|
161 | char *timeStamp;
|
---|
162 | char *versionNumber;
|
---|
163 | Odr_external *previousVersion;
|
---|
164 | } u;
|
---|
165 | } Z_IUSuppliedRecordsId;
|
---|
166 |
|
---|
167 | typedef struct Z_IUCorrelationInfo
|
---|
168 | {
|
---|
169 | char *note; /* OPTIONAL */
|
---|
170 | int *id; /* OPTIONAL */
|
---|
171 | } Z_IUCorrelationInfo;
|
---|
172 |
|
---|
173 | typedef struct Z_IUSuppliedRecords_elem
|
---|
174 | {
|
---|
175 | int which;
|
---|
176 | #define Z_IUSuppliedRecords_number 1
|
---|
177 | #define Z_IUSuppliedRecords_string 2
|
---|
178 | #define Z_IUSuppliedRecords_opaque 3
|
---|
179 | union {
|
---|
180 | int *number;
|
---|
181 | char *string;
|
---|
182 | Odr_oct *opaque;
|
---|
183 | } u; /* OPTIONAL */
|
---|
184 | Z_IUSuppliedRecordsId *supplementalId; /* OPTIONAL */
|
---|
185 | Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
|
---|
186 | Z_External *record;
|
---|
187 | } Z_IUSuppliedRecords_elem;
|
---|
188 |
|
---|
189 | typedef struct Z_IUSuppliedRecords
|
---|
190 | {
|
---|
191 | int num;
|
---|
192 | Z_IUSuppliedRecords_elem **elements;
|
---|
193 | } Z_IUSuppliedRecords;
|
---|
194 |
|
---|
195 | typedef struct Z_IUOriginPartToKeep
|
---|
196 | {
|
---|
197 | int *action;
|
---|
198 | #define Z_IUOriginPartToKeep_recordInsert 1
|
---|
199 | #define Z_IUOriginPartToKeep_recordReplace 2
|
---|
200 | #define Z_IUOriginPartToKeep_recordDelete 3
|
---|
201 | #define Z_IUOriginPartToKeep_elementUpdate 4
|
---|
202 | #define Z_IUOriginPartToKeep_specialUpdate 5
|
---|
203 | char *databaseName;
|
---|
204 | Odr_oid *schema; /* OPTIONAL */
|
---|
205 | char *elementSetName; /* OPTIONAL */
|
---|
206 | Odr_external *actionQualifier; /* OPTIONAL */
|
---|
207 | } Z_IUOriginPartToKeep;
|
---|
208 |
|
---|
209 | typedef struct Z_IUTaskPackageRecordStructure
|
---|
210 | {
|
---|
211 | int which;
|
---|
212 | #define Z_IUTaskPackageRecordStructure_record 1
|
---|
213 | #define Z_IUTaskPackageRecordStructure_surrogateDiagnostics 2
|
---|
214 | union {
|
---|
215 | Odr_external *record;
|
---|
216 | Z_DiagRecs *surrogateDiagnostics;
|
---|
217 | } u; /* OPTIONAL */
|
---|
218 | Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
|
---|
219 | int *recordStatus;
|
---|
220 | #define Z_IUTaskPackageRecordStructureS_success 1
|
---|
221 | #define Z_IUTaskPackageRecordStructureS_queued 2
|
---|
222 | #define Z_IUTaskPackageRecordStructureS_inProcess 3
|
---|
223 | #define Z_IUTaskPackageRecordStructureS_failure 4
|
---|
224 | Z_DiagRecs *supplementalDiagnostics; /* OPTIONAL */
|
---|
225 | } Z_IUTaskPackageRecordStructure;
|
---|
226 |
|
---|
227 | typedef struct Z_IUTargetPart
|
---|
228 | {
|
---|
229 | int *updateStatus;
|
---|
230 | #define Z_IUTargetPart_success 1
|
---|
231 | #define Z_IUTargetPart_partial 2
|
---|
232 | #define Z_IUTargetPart_failure 3
|
---|
233 | int num_globalDiagnostics;
|
---|
234 | Z_DiagRec **globalDiagnostics; /* OPTIONAL */
|
---|
235 | int num_taskPackageRecords;
|
---|
236 | Z_IUTaskPackageRecordStructure **taskPackageRecords;
|
---|
237 | } Z_IUTargetPart;
|
---|
238 |
|
---|
239 | typedef struct Z_IUUpdateEsRequest
|
---|
240 | {
|
---|
241 | Z_IUOriginPartToKeep *toKeep;
|
---|
242 | Z_IUSuppliedRecords *notToKeep;
|
---|
243 | } Z_IUUpdateEsRequest;
|
---|
244 |
|
---|
245 | typedef struct Z_IUUpdateTaskPackage
|
---|
246 | {
|
---|
247 | Z_IUOriginPartToKeep *originPart;
|
---|
248 | Z_IUTargetPart *targetPart;
|
---|
249 | } Z_IUUpdateTaskPackage;
|
---|
250 |
|
---|
251 | typedef struct Z_IUUpdate
|
---|
252 | {
|
---|
253 | int which;
|
---|
254 | #define Z_IUUpdate_esRequest 1
|
---|
255 | #define Z_IUUpdate_taskPackage 2
|
---|
256 | union {
|
---|
257 | Z_IUUpdateEsRequest *esRequest;
|
---|
258 | Z_IUUpdateTaskPackage *taskPackage;
|
---|
259 | } u;
|
---|
260 | } Z_IUUpdate;
|
---|
261 |
|
---|
262 | YAZ_EXPORT int z_IUUpdate(ODR o, Z_IUUpdate **p, int opt, const char *name);
|
---|
263 |
|
---|
264 | #ifdef __cplusplus
|
---|
265 | }
|
---|
266 | #endif
|
---|
267 |
|
---|
268 | #endif
|
---|