add ability to read from a stream

do not use this unless you understand what you are doing and you want to take the risk,
you are warnned
This commit is contained in:
Seven Du
2014-09-04 09:00:38 +08:00
parent f0b9407cca
commit 31f78d8cac
6 changed files with 34 additions and 0 deletions
+3
View File
@@ -3,6 +3,7 @@
#ifdef __cplusplus
#include <string>
extern "C" {
#endif
#ifdef DOH
@@ -149,7 +150,9 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
SWITCH_DECLARE_CONSTRUCTOR Stream(void);
SWITCH_DECLARE_CONSTRUCTOR Stream(switch_stream_handle_t *);
virtual SWITCH_DECLARE_CONSTRUCTOR ~ Stream();
SWITCH_DECLARE(std::string) read();
SWITCH_DECLARE(void) write(const char *data);
SWITCH_DECLARE(void) raw_write(std::string data);
SWITCH_DECLARE(const char *) get_data(void);
};