return _device->get_shared_pointer(shared_from_this());
}
-void Input::send(string data)
+void Input::send(void *data, size_t length)
{
- auto gstr = g_string_new(data.c_str());
+ auto gstr = g_string_new_len((gchar *)data, length);
auto ret = sr_input_send(_structure, gstr);
g_string_free(gstr, false);
check(ret);
/** Virtual device associated with this input. */
shared_ptr<InputDevice> device();
/** Send next stream data.
- * @param data Next stream data. */
- void send(string data);
+ * @param data Next stream data.
+ * @param length Length of data. */
+ void send(void *data, size_t length);
/** Signal end of input data. */
void end();
protected: