Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef CHIRP_STREAM_H
00008 #define CHIRP_STREAM_H
00009
00010 #include <sys/time.h>
00011 #include <stdio.h>
00012
00025 typedef enum {
00026 CHIRP_STREAM_READ,
00027 CHIRP_STREAM_WRITE,
00028 } chirp_stream_mode_t;
00029
00039 struct chirp_stream *chirp_stream_open(const char *hostport, const char *path, chirp_stream_mode_t mode, time_t stoptime);
00040
00049 int chirp_stream_printf(struct chirp_stream *stream, time_t stoptime, const char *fmt, ...);
00050
00059 int chirp_stream_readline(struct chirp_stream *stream, char *line, int length, time_t stoptime);
00060
00069 int chirp_stream_write(struct chirp_stream *stream, const void *data, int length, time_t stoptime);
00070
00079 int chirp_stream_read(struct chirp_stream *stream, void *data, int length, time_t stoptime);
00080
00087 int chirp_stream_flush(struct chirp_stream *stream, time_t stoptime);
00088
00097 int chirp_stream_close(struct chirp_stream *stream, time_t stoptime);
00098
00099 #endif