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