1 #ifndef CALLBACKSTREAM_H
2 #define CALLBACKSTREAM_H
4 typedef int (*cb_t
)(const char *, void *);
7 #include "libs/StreamOutput.h"
10 class CallbackStream
: public StreamOutput
{
12 CallbackStream(cb_t cb
, void *u
);
13 virtual ~CallbackStream();
14 int puts(const char*);
15 void inc() { use_count
++; }
17 int get_count() { return use_count
; }
29 extern void *new_callback_stream(cb_t cb
, void *);
30 extern void delete_callback_stream(void *);