2015-03-19 06:55:06 -05:00
|
|
|
All communication consists of messages that are one line of
|
|
|
|
human-readable UTF-8 text optionally followed by a single newline and
|
|
|
|
binary data.
|
2015-03-05 07:57:03 -06:00
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
client -> server
|
|
|
|
================
|
|
|
|
|
2015-03-19 07:38:04 -05:00
|
|
|
load <pathname>
|
|
|
|
|
|
|
|
Deprecated.
|
|
|
|
|
|
|
|
load url=<url>
|
2015-03-04 17:14:04 -06:00
|
|
|
|
|
|
|
status
|
|
|
|
|
|
|
|
tile width=<width> height=<height> tileposx=<xpos> tileposy=<ypos> tilewidth=<tileWidth> tileheight=<tileHeight>
|
|
|
|
|
2015-03-19 07:38:04 -05:00
|
|
|
All parameters are numbers.
|
|
|
|
|
|
|
|
key type=<type> char=<charcode> key=<keycode>
|
|
|
|
|
|
|
|
<type> is 'input' or 'up', <charcode> and <keycode> are numbers.
|
|
|
|
|
|
|
|
mouse type=<type> x=<x> y=<y> count=<count>
|
|
|
|
|
|
|
|
<type> is 'buttondown', 'buttonup' or 'move', others are numbers.
|
|
|
|
|
|
|
|
uno <command>
|
|
|
|
|
|
|
|
<command> is a line of text.
|
|
|
|
|
|
|
|
selecttext type=<type> x=<x> y=<y>
|
|
|
|
|
|
|
|
<type> is 'start', 'end' or 'reset', <x> and <y> are numbers.
|
|
|
|
|
|
|
|
selectgraphic type=<type> x=<x> y=<y>
|
|
|
|
|
|
|
|
<type> is 'start' or 'end' <x> and <y> are numbers.
|
|
|
|
|
|
|
|
resetselection
|
|
|
|
|
2015-03-23 15:13:57 -05:00
|
|
|
saveas url=<url> format=<format> options=<options>
|
|
|
|
|
|
|
|
<url> is a URL, encoded. <format> is also URL-encoded, i.e. spaces as %20
|
|
|
|
options are the whole rest of the line, not URL-encoded, and can be empty
|
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
server -> client
|
|
|
|
================
|
|
|
|
|
|
|
|
error: cmd=<command> kind=<kind>
|
|
|
|
<freeErrorText>
|
|
|
|
|
2015-03-19 07:38:04 -05:00
|
|
|
<command> is the command part of the corresponding client->server
|
|
|
|
message that caused the error. <kind> is some single-word
|
|
|
|
classification
|
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
status: type=<typeName> parts=<numberOfParts> current=<currentPartNumber> width=<width> height=<height>
|
|
|
|
|
2015-03-19 07:38:04 -05:00
|
|
|
<typeName> is 'text, 'spreadsheet', 'presentation', 'drawing' or 'other. Others are numbers.
|
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
tile: width=<width> height=<height> tileposx=<xpos> tileposy=<ypos> tilewidth=<tileWidth> tileheight=<tileHeight>
|
|
|
|
<binaryPngImage>
|
2015-03-05 07:57:03 -06:00
|
|
|
|
2015-03-19 07:38:04 -05:00
|
|
|
The parameters from the corresponding 'tile' command.
|
|
|
|
|
2015-03-13 04:30:45 -05:00
|
|
|
Each LOK_CALLBACK_FOO_BAR callback causes a corresponding message to
|
|
|
|
the client, consisting of the FOO_BAR part in lowercase, without
|
|
|
|
underscore, followed by a colon, space and the callback payload. For
|
|
|
|
instance:
|
|
|
|
|
2015-03-05 07:57:03 -06:00
|
|
|
invalidatetiles: <payload>
|
|
|
|
|
|
|
|
invalidatecursor:
|
|
|
|
|
2015-03-19 06:55:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
The communication between the parent process (the one keeping open the
|
|
|
|
Websocket connections to the clients) and a child process (handling
|
|
|
|
one document through LibreOfficeKit) uses the same protocol, with
|
|
|
|
the following additions and changes:
|
|
|
|
|
|
|
|
child -> parent
|
|
|
|
===============
|
|
|
|
|
|
|
|
child <id>
|
|
|
|
|
|
|
|
Must be the first message sent from the child to the parent. The
|
|
|
|
parent has passed the id (a 64-bit random number) to the child when
|
|
|
|
starting it, so this is how the child identificates itself.
|