Esempio n. 1
0
void ApiHandler::IpcEditorGetLineText(EditorCtrl& editor, IConnection& conn) {
	const hessian_ipc::Call& call = *conn.get_call();
	const unsigned int lineid = call.GetParameter(1).GetInt();
	if (lineid > editor.GetLineCount()) return; // fault

	vector<char> text;
	editor.GetLine(lineid, text);

	hessian_ipc::Writer& writer = conn.get_reply_writer();
	writer.write_reply(text);
}