03b8f77c7660d95e7f9e6f66162fdbc0c496c9f9
[yaz-moved-to-github.git] / include / yaz / zes-order.h
1 /* YC 0.2: Tue Feb 29 16:45:07 CET 2000 */
2 /* Module-H ESFormat-ItemOrder */
3
4 #ifndef zes_order_H
5 #define zes_order_H
6
7 #include <yaz/odr.h>
8 #include <yaz/z-core.h>
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 typedef struct Z_IORequest Z_IORequest;
14 YAZ_EXPORT int z_IORequest (ODR o, Z_IORequest **p, int opt, const char *name);
15
16 typedef struct Z_IOTaskPackage Z_IOTaskPackage;
17 YAZ_EXPORT int z_IOTaskPackage (ODR o, Z_IOTaskPackage **p, int opt, const char *name);
18
19 typedef struct Z_IOItemOrder Z_IOItemOrder;
20 YAZ_EXPORT int z_IOItemOrder (ODR o, Z_IOItemOrder **p, int opt, const char *name);
21
22 typedef struct Z_IOContact Z_IOContact;
23 YAZ_EXPORT int z_IOContact (ODR o, Z_IOContact **p, int opt, const char *name);
24
25 typedef struct Z_IOBilling Z_IOBilling;
26 YAZ_EXPORT int z_IOBilling (ODR o, Z_IOBilling **p, int opt, const char *name);
27
28 typedef struct Z_IOOriginPartToKeep Z_IOOriginPartToKeep;
29 YAZ_EXPORT int z_IOOriginPartToKeep (ODR o, Z_IOOriginPartToKeep **p, int opt, const char *name);
30
31 typedef struct Z_IOCreditCardInfo Z_IOCreditCardInfo;
32 YAZ_EXPORT int z_IOCreditCardInfo (ODR o, Z_IOCreditCardInfo **p, int opt, const char *name);
33
34 typedef struct Z_IOResultSetItem Z_IOResultSetItem;
35 YAZ_EXPORT int z_IOResultSetItem (ODR o, Z_IOResultSetItem **p, int opt, const char *name);
36
37 typedef struct Z_IOOriginPartNotToKeep Z_IOOriginPartNotToKeep;
38 YAZ_EXPORT int z_IOOriginPartNotToKeep (ODR o, Z_IOOriginPartNotToKeep **p, int opt, const char *name);
39
40 typedef struct Z_IOTargetPart Z_IOTargetPart;
41 YAZ_EXPORT int z_IOTargetPart (ODR o, Z_IOTargetPart **p, int opt, const char *name);
42 #ifdef __cplusplus
43 }
44 #endif
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 struct Z_IORequest {
49         Z_IOOriginPartToKeep *toKeep; /* OPT */
50         Z_IOOriginPartNotToKeep *notToKeep;
51 };
52
53 struct Z_IOTaskPackage {
54         Z_IOOriginPartToKeep *originPart; /* OPT */
55         Z_IOTargetPart *targetPart;
56 };
57
58 struct Z_IOItemOrder {
59         int which;
60         union {
61                 Z_IORequest *esRequest;
62                 Z_IOTaskPackage *taskPackage;
63 #define Z_IOItemOrder_esRequest 1
64 #define Z_IOItemOrder_taskPackage 2
65         } u;
66 };
67
68 struct Z_IOContact {
69         Z_InternationalString *name; /* OPT */
70         Z_InternationalString *phone; /* OPT */
71         Z_InternationalString *email; /* OPT */
72 };
73
74 struct Z_IOBilling {
75         int which;
76         union {
77                 Odr_null *billInvoice;
78                 Odr_null *prepay;
79                 Odr_null *depositAccount;
80                 Z_IOCreditCardInfo *creditCard;
81                 Odr_null *cardInfoPreviouslySupplied;
82                 Odr_null *privateKnown;
83                 Z_External *privateNotKnown;
84 #define Z_IOBilling_billInvoice 1
85 #define Z_IOBilling_prepay 2
86 #define Z_IOBilling_depositAccount 3
87 #define Z_IOBilling_creditCard 4
88 #define Z_IOBilling_cardInfoPreviouslySupplied 5
89 #define Z_IOBilling_privateKnown 6
90 #define Z_IOBilling_privateNotKnown 7
91         } u;
92         Z_InternationalString *customerReference; /* OPT */
93         Z_InternationalString *customerPONumber; /* OPT */
94 };
95
96 struct Z_IOOriginPartToKeep {
97         Z_External *supplDescription; /* OPT */
98         Z_IOContact *contact; /* OPT */
99         Z_IOBilling *addlBilling; /* OPT */
100 };
101
102 struct Z_IOCreditCardInfo {
103         Z_InternationalString *nameOnCard;
104         Z_InternationalString *expirationDate;
105         Z_InternationalString *cardNumber;
106 };
107
108 struct Z_IOResultSetItem {
109         Z_InternationalString *resultSetId;
110         int *item;
111 };
112
113 struct Z_IOOriginPartNotToKeep {
114         Z_IOResultSetItem *resultSetItem; /* OPT */
115         Z_External *itemRequest; /* OPT */
116 };
117
118 struct Z_IOTargetPart {
119         Z_External *itemRequest; /* OPT */
120         Z_External *statusOrErrorReport; /* OPT */
121 #define Z_IOTargetPart_notReceived 1
122 #define Z_IOTargetPart_loanQueue 2
123 #define Z_IOTargetPart_forwarded 3
124 #define Z_IOTargetPart_unfilledCopyright 4
125 #define Z_IOTargetPart_filledCopyright 5
126         int *auxiliaryStatus; /* OPT */
127 };
128
129 #ifdef __cplusplus
130 }
131 #endif
132 #endif