Added odr_set_stream which is is a more generic to odr_setprint.
[yaz-moved-to-github.git] / include / yaz / odr.h
index 6d1c30a..3dd1478 100644 (file)
@@ -23,7 +23,7 @@
  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  * OF THIS SOFTWARE.
  *
- * $Id: odr.h,v 1.13 2003-10-16 10:37:06 adam Exp $
+ * $Id: odr.h,v 1.15 2004-08-11 12:15:38 adam Exp $
  */
 
 #ifndef ODR_H
@@ -143,7 +143,7 @@ typedef struct odr
     int choice_bias;     /* force choice */
     int lenlen;          /* force length-of-lenght (odr_setlen()) */
 
-    FILE *print;         /* output file for direction print */
+    FILE *print;         /* output file handler for direction print */
     int indent;          /* current indent level for printing */
 
     NMEM mem;            /* memory handle for decoding (primarily) */
@@ -297,6 +297,7 @@ YAZ_EXPORT int odr_initmember(ODR o, void *p, int size);
 YAZ_EXPORT int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
 YAZ_EXPORT void odr_setlenlen(ODR o, int len);
 YAZ_EXPORT int odr_missing(ODR o, int opt, const char *name);
+YAZ_EXPORT char *odr_prepend(ODR o, const char *prefix, const char *old);
 
 typedef struct Odr_external
 {
@@ -326,6 +327,13 @@ YAZ_EXPORT int odr_generalizedtime(ODR o, char **p, int opt,
 
 YAZ_EXPORT int odr_set_charset(ODR o, const char *to, const char *from);
 
+YAZ_EXPORT void odr_set_stream(ODR o,  void *handle,
+                              void (*stream_puts)(void *handle,
+                                                  const char *strz),
+                              void (*stream_close)(void *handle));
+
+YAZ_EXPORT void odr_printf(ODR o, const char *fmt, ...);
+
 YAZ_END_CDECL
 
 #include <yaz/xmalloc.h>