Updated.
[yaz-moved-to-github.git] / include / prt.h
1 /*
2  * Copyright (c) 1995-1997, Index Data
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: prt.h,v $
7  * Revision 1.21  1997-10-31 12:20:08  adam
8  * Improved memory debugging for xmalloc/nmem.c. References to NMEM
9  * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
10  * Bug fix: missing fclose in data1_read_espec1.
11  *
12  */
13
14 #ifndef PRT_H
15 #define PRT_H
16
17 #include <yconfig.h>
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 YAZ_EXPORT int ber_boolean(ODR o, int *val);
24 YAZ_EXPORT int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt);
25 YAZ_EXPORT int ber_enctag(ODR o, int zclass, int tag, int constructed);
26 YAZ_EXPORT int ber_dectag(unsigned char *buf, int *zclass, int *tag, int *constructed);
27 YAZ_EXPORT int odr_bool(ODR o, int **p, int opt);
28 YAZ_EXPORT int odr_integer(ODR o, int **p, int opt);
29 YAZ_EXPORT int odr_implicit_settag(ODR o, int zclass, int tag);
30 #if 0
31 YAZ_EXPORT int odr_implicit(ODR o, int (*type)(ODR o, void *p, int opt), void *p,
32     int zclass, int tag, int opt);
33 #endif
34 YAZ_EXPORT int ber_enclen(ODR o, int len, int lenlen, int exact);
35 YAZ_EXPORT int ber_declen(unsigned char *buf, int *len);
36 YAZ_EXPORT char *odr_indent(ODR o);
37 YAZ_EXPORT int ber_null(ODR o);
38 YAZ_EXPORT int odr_null(ODR o, Odr_null **p, int opt);
39 YAZ_EXPORT int ber_integer(ODR o, int *val);
40 YAZ_EXPORT int odr_constructed_begin(ODR o, void *p, int zclass, int tag);
41 YAZ_EXPORT int odr_constructed_end(ODR o);
42 YAZ_EXPORT int odr_sequence_begin(ODR o, void *p, int size);
43 YAZ_EXPORT int odr_sequence_end(ODR o);
44 YAZ_EXPORT int ber_octetstring(ODR o, Odr_oct *p, int cons);
45 YAZ_EXPORT int odr_octetstring(ODR o, Odr_oct **p, int opt);
46 YAZ_EXPORT int odp_more_chunks(ODR o, unsigned char *base, int len);
47 YAZ_EXPORT int odr_constructed_more(ODR o);
48 YAZ_EXPORT int odr_bitstring(ODR o, Odr_bitmask **p, int opt);
49 YAZ_EXPORT int ber_bitstring(ODR o, Odr_bitmask *p, int cons);
50 YAZ_EXPORT int odr_generalstring(ODR o, char **p, int opt);
51 YAZ_EXPORT int ber_oidc(ODR o, Odr_oid *p);
52 YAZ_EXPORT int odr_oid(ODR o, Odr_oid **p, int opt);
53 YAZ_EXPORT int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp);
54 YAZ_EXPORT int odr_cstring(ODR o, char **p, int opt);
55 YAZ_EXPORT int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num);
56 YAZ_EXPORT int odr_any(ODR o, Odr_any **p, int opt);
57 YAZ_EXPORT int ber_any(ODR o, Odr_any **p);
58 YAZ_EXPORT int completeBER(unsigned char *buf, int len);
59 YAZ_EXPORT void odr_begin(ODR o);
60 YAZ_EXPORT void odr_end(ODR o);
61 YAZ_EXPORT Odr_oid *odr_oiddup(ODR odr, Odr_oid *o);
62 YAZ_EXPORT Odr_oid *odr_oiddup_nmem(NMEM nmem, Odr_oid *o);
63 YAZ_EXPORT int odr_grow_block(odr_ecblock *b, int min_bytes);
64 YAZ_EXPORT int odr_write(ODR o, unsigned char *buf, int bytes);
65 YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
66 YAZ_EXPORT int odr_dumpBER(FILE *f, char *buf, int len);
67 YAZ_EXPORT void odr_choice_bias(ODR o, int what);
68 YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode);
69 YAZ_EXPORT int odr_total(ODR o);
70 YAZ_EXPORT char *odr_errmsg(int n);
71 YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, char *str);
72 YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, char *str);
73 YAZ_EXPORT int odr_initmember(ODR o, void *p, int size);
74 YAZ_EXPORT int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
75 YAZ_EXPORT void odr_setlenlen(ODR o, int len);
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif