13e7063657a8911e7d4b052b59a5599676b749f4
[yaz-moved-to-github.git] / include / yaz / z-accform1.h
1 /* YC 0.2: Wed Mar 01 10:28:12 CET 2000 */
2 /* Module-H AccessControlFormat-prompt-1 */
3
4 #ifndef z_accform1_H
5 #define z_accform1_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_PromptObject1 Z_PromptObject1;
14 YAZ_EXPORT int z_PromptObject1 (ODR o, Z_PromptObject1 **p, int opt, const char *name);
15
16 typedef struct Z_ChallengeUnit1 Z_ChallengeUnit1;
17 YAZ_EXPORT int z_ChallengeUnit1 (ODR o, Z_ChallengeUnit1 **p, int opt, const char *name);
18
19 typedef struct Z_Challenge1 Z_Challenge1;
20 YAZ_EXPORT int z_Challenge1 (ODR o, Z_Challenge1 **p, int opt, const char *name);
21
22 typedef struct Z_ResponseUnit1 Z_ResponseUnit1;
23 YAZ_EXPORT int z_ResponseUnit1 (ODR o, Z_ResponseUnit1 **p, int opt, const char *name);
24
25 typedef struct Z_Response1 Z_Response1;
26 YAZ_EXPORT int z_Response1 (ODR o, Z_Response1 **p, int opt, const char *name);
27
28 typedef struct Z_PromptIdEnumeratedPrompt Z_PromptIdEnumeratedPrompt;
29 YAZ_EXPORT int z_PromptIdEnumeratedPrompt (ODR o, Z_PromptIdEnumeratedPrompt **p, int opt, const char *name);
30
31 typedef struct Z_PromptId Z_PromptId;
32 YAZ_EXPORT int z_PromptId (ODR o, Z_PromptId **p, int opt, const char *name);
33
34 typedef struct Z_Encryption Z_Encryption;
35 YAZ_EXPORT int z_Encryption (ODR o, Z_Encryption **p, int opt, const char *name);
36 #ifdef __cplusplus
37 }
38 #endif
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 struct Z_PromptObject1 {
43         int which;
44         union {
45                 Z_Challenge1 *challenge;
46                 Z_Response1 *response;
47 #define Z_PromptObject1_challenge 1
48 #define Z_PromptObject1_response 2
49         } u;
50 };
51
52 struct Z_ChallengeUnit1 {
53         Z_PromptId *promptId;
54         Z_InternationalString *defaultResponse; /* OPT */
55         int which;
56         union {
57                 Z_InternationalString *character;
58                 Z_Encryption *encrypted;
59 #define Z_ChallengeUnit1_character 1
60 #define Z_ChallengeUnit1_encrypted 2
61         } u; /* OPT */
62         Z_InternationalString *regExpr; /* OPT */
63         Odr_null *responseRequired; /* OPT */
64         int num_allowedValues;
65         Z_InternationalString **allowedValues; /* OPT */
66         Odr_null *shouldSave; /* OPT */
67 #define Z_ChallengeUnit1_integer 1
68 #define Z_ChallengeUnit1_date 2
69 #define Z_ChallengeUnit1_float 3
70 #define Z_ChallengeUnit1_alphaNumeric 4
71 #define Z_ChallengeUnit1_url_urn 5
72 #define Z_ChallengeUnit1_boolean 6
73         int *dataType; /* OPT */
74         Z_External *diagnostic; /* OPT */
75 };
76
77 struct Z_Challenge1 {
78         int num;
79         Z_ChallengeUnit1 **elements;
80 };
81
82 struct Z_ResponseUnit1 {
83         Z_PromptId *promptId;
84         int which;
85         union {
86                 Z_InternationalString *string;
87                 bool_t *accept;
88                 Odr_null *acknowledge;
89                 Z_DiagRec *diagnostic;
90                 Z_Encryption *encrypted;
91 #define Z_ResponseUnit1_string 1
92 #define Z_ResponseUnit1_accept 2
93 #define Z_ResponseUnit1_acknowledge 3
94 #define Z_ResponseUnit1_diagnostic 4
95 #define Z_ResponseUnit1_encrypted 5
96         } u;
97 };
98
99 struct Z_Response1 {
100         int num;
101         Z_ResponseUnit1 **elements;
102 };
103
104 struct Z_PromptIdEnumeratedPrompt {
105 #define Z_PromptIdEnumeratedPrompt_groupId 0
106 #define Z_PromptIdEnumeratedPrompt_userId 1
107 #define Z_PromptIdEnumeratedPrompt_password 2
108 #define Z_PromptIdEnumeratedPrompt_newPassword 3
109 #define Z_PromptIdEnumeratedPrompt_copyright 4
110 #define Z_PromptIdEnumeratedPrompt_sessionId 5
111         int *type;
112         Z_InternationalString *suggestedString; /* OPT */
113 };
114
115 struct Z_PromptId {
116         int which;
117         union {
118                 Z_PromptIdEnumeratedPrompt *enumeratedPrompt;
119                 Z_InternationalString *nonEnumeratedPrompt;
120 #define Z_PromptId_enumeratedPrompt 1
121 #define Z_PromptId_nonEnumeratedPrompt 2
122         } u;
123 };
124
125 struct Z_Encryption {
126         Odr_oct *cryptType; /* OPT */
127         Odr_oct *credential; /* OPT */
128         Odr_oct *data;
129 };
130
131 #ifdef __cplusplus
132 }
133 #endif
134 #endif