source: trunk/gsdl/packages/yaz/include/yaz/prt-acc.h@ 1343

Last change on this file since 1343 was 1343, checked in by johnmcp, 24 years ago

Added the YAZ toolkit source to the packages directory (for z39.50 stuff)

  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1/*
2 * Copyright (c) 1995, 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 name 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 * $Log$
27 * Revision 1.1 2000/08/03 03:10:43 johnmcp
28 * Added the YAZ toolkit source to the packages directory (for z39.50 stuff)
29 *
30 * Revision 1.1 1999/11/30 13:47:11 adam
31 * Improved installation. Moved header files to include/yaz.
32 *
33 * Revision 1.9 1999/04/20 09:56:48 adam
34 * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
35 * Modified all encoders/decoders to reflect this change.
36 *
37 * Revision 1.8 1997/09/01 08:49:51 adam
38 * New windows NT/95 port using MSV5.0. To export DLL functions the
39 * YAZ_EXPORT modifier was added. Defined in yconfig.h.
40 *
41 * Revision 1.7 1997/05/14 06:53:46 adam
42 * C++ support.
43 *
44 * Revision 1.6 1996/01/02 08:57:35 quinn
45 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
46 *
47 * Revision 1.5 1995/09/29 17:12:09 quinn
48 * Smallish
49 *
50 * Revision 1.4 1995/09/27 15:02:49 quinn
51 * Modified function heads & prototypes.
52 *
53 * Revision 1.3 1995/08/17 12:45:16 quinn
54 * Fixed minor problems with GRS-1. Added support in c&s.
55 *
56 * Revision 1.2 1995/08/15 12:00:13 quinn
57 * Updated External
58 *
59 * Revision 1.1 1995/06/02 09:49:49 quinn
60 * Add access control
61 *
62 *
63 */
64
65#ifndef PRT_ACC_H
66#define PRT_ACC_H
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
72typedef struct Z_Encryption1
73{
74 Odr_oct *cryptType; /* OPTIONAL */
75 Odr_oct *credential; /* OPTIONAL */
76 Odr_oct *data;
77} Z_Encryption1;
78
79typedef struct Z_EnumeratedPrompt1
80{
81 int *type;
82#define Z_Prompt1_groupId 0
83#define Z_Prompt1_userId 1
84#define Z_Prompt1_password 2
85#define Z_Prompt1_newPassword 3
86#define Z_Prompt1_copyright 4
87 char *suggestedString; /* OPTIONAL */
88} Z_EnumeratedPrompt1;
89
90typedef struct Z_PromptId1
91{
92 int which;
93#define Z_PromptId1_enumeratedPrompt 0
94#define Z_PromptId1_nonEnumeratedPrompt 1
95 union
96 {
97 Z_EnumeratedPrompt1 *enumeratedPrompt;
98 char *nonEnumeratedPrompt;
99 } u;
100} Z_PromptId1;
101
102typedef struct Z_PromptInfo1
103{
104 int which;
105#define Z_Challenge1_character 0
106#define Z_Challenge1_encrypted 1
107 union
108 {
109 char *character;
110 Z_Encryption1 *encrypted;
111 } u;
112} Z_PromptInfo1;
113
114typedef struct Z_ChallengeUnit1
115{
116 Z_PromptId1 *promptId;
117 char *defaultResponse; /* OPTIONAL */
118 Z_PromptInfo1 *promptInfo; /* OPTIONAL */
119 char *regExpr; /* OPTIONAL */
120 Odr_null *responseRequired; /* OPTIONAL */
121 int num_values;
122 char **allowedValues; /* OPTIONAL */
123 Odr_null *shouldSave; /* OPTIONAL */
124 int *dataType; /* OPTIONAL */
125#define Z_ChalDataType_integer 1
126#define Z_ChalDataType_date 2
127#define Z_ChalDataType_float 3
128#define Z_ChalDataType_alphaNumeric 4
129#define Z_ChalDataType_urlUrn 5
130#define Z_ChalDataType_boolean 6
131 Z_External *diagnostic; /* OPTIONAL */
132} Z_ChallengeUnit1;
133
134typedef struct Z_Challenge1
135{
136 int num_challenges;
137 Z_ChallengeUnit1 **list;
138} Z_Challenge1;
139
140typedef struct Z_ResponseUnit1
141{
142 Z_PromptId1 *promptId;
143 int which;
144#define Z_Response1_string 0
145#define Z_Response1_accept 1
146#define Z_Response1_acknowledge 2
147#define Z_Response1_diagnostic 3
148#define Z_Response1_encrypted 4
149 union
150 {
151 char *string;
152 bool_t *accept;
153 Odr_null *acknowledge;
154 Z_DiagRec *diagnostic;
155 Z_Encryption1 *encrypted;
156 } u;
157} Z_ResponseUnit1;
158
159typedef struct Z_Response1
160{
161 int num_responses;
162 Z_ResponseUnit1 **list;
163} Z_Response1;
164
165typedef struct Z_PromptObject1
166{
167 int which;
168#define Z_PromptObject1_challenge 0
169#define Z_PromptObject1_response 1
170 union
171 {
172 Z_Challenge1 *challenge;
173 Z_Response1 *response;
174 } u;
175} Z_PromptObject1;
176
177YAZ_EXPORT int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt,
178 const char *name);
179
180#ifdef __cplusplus
181}
182#endif
183
184#endif
Note: See TracBrowser for help on using the repository browser.