Esempio n. 1
0
void ApiHandler::IpcEditorGetLineRange(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

	const interval iv = editor.GetLineExtent(lineid);

	hessian_ipc::Writer& writer = conn.get_reply_writer();
	writer.write_reply(iv);
}
Esempio n. 2
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);
}