/* * Copyright (c) 2015 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __STREAM_H__ #define __STREAM_H__ #include #include "cfg.h" #include "mdata.h" typedef struct stream * stream_t; int stream_init(void); void stream_exit(void); stream_t stream_create(const char *); void stream_destroy(stream_t *); int stream_configure(stream_t); int stream_set_metadata(stream_t, mdata_t, char **); const char * stream_get_name(stream_t); int stream_get_connected(stream_t); cfg_stream_t stream_get_cfg_stream(stream_t); cfg_intake_t stream_get_cfg_intake(stream_t); cfg_server_t stream_get_cfg_server(stream_t); int stream_connect(stream_t); void stream_disconnect(stream_t); void stream_sync(stream_t); int stream_send(stream_t, const char *, size_t); #endif /* __STREAM_H__ */