Commit graph

5128 commits

Author SHA1 Message Date
Ashod Nakashian
0a05a34f66 nb: move Socket family into own file
Change-Id: I17802f00a6e9e7d920b175b9721b158ea90a9880
Reviewed-on: https://gerrit.libreoffice.org/34238
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
22b1ae9553 nb: separate Socket into ClientSocket and ServerSocket
Change-Id: I1aafd6192b955e51b8f1e74c1aad5fc3603f71d6
Reviewed-on: https://gerrit.libreoffice.org/34237
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
b6b36f454b nb: refactor the client code into own function
Change-Id: I23735785cc4a66589fd81c7cb0f08476829ba7e8
Reviewed-on: https://gerrit.libreoffice.org/34236
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
f41968a726 nb: refactor server code into own function
Change-Id: Iba7363df7452da271fcf9afb54ad1f6177260ddd
Reviewed-on: https://gerrit.libreoffice.org/34235
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
10ab785fa4 nb: recreate the poll fds only when needed
Change-Id: I17accfb0339c590b7e155e8fd804e3e32c57e3ed
Reviewed-on: https://gerrit.libreoffice.org/34234
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
5ed0c601e3 nb: poll wakeup pipe and simplified polling
Change-Id: I2e688b985d4a9bf7cbe8eef5df10f67bfc96f91c
Reviewed-on: https://gerrit.libreoffice.org/34233
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:36 +01:00
Ashod Nakashian
eed7c4b4f5 nb: gitingore loolnb
Change-Id: I41ed294ce61cb92af065d9fc72e3b35a20be0012
2017-03-10 10:47:36 +01:00
Ashod Nakashian
a8b2f982b6 nb: support N clients and asynchronously communicate with all
Change-Id: I81f63895180141e554072b6cf5300139299f282c
2017-03-10 10:47:36 +01:00
Ashod Nakashian
0edb2f6679 nb: poll using multi-socket poll class SocketPoll
Change-Id: If244c4ec92f70fd458665b88d4da3c5fbcb11077
2017-03-10 10:47:36 +01:00
Ashod Nakashian
f086079d25 nb: SocketPoll class to poll events on N-Sockets
Internally SocketPoll manages the sockets
and handles the polling and firing of callback.

It's thread-safe and handles asynchronous calls
to remove sockets correctly while potentially
being in poll(2).

The choice for using poll(2) compared to epoll
or select are the following:

1. For our use-case, poll(2) works great up to
   a few hundred sockets, which we don't expect
   to have on a single document normally.

2. select(2) has an awkward API (modifies input,
   f.e) and has limit on max fds that we need to
   be mindful of (even if we'll not hit it in
   practice). poll(2) preserves the input and has
   a no-nonsense API that's simple and readable.

3. While select(2) is the most portable, poll(2)
   isn't far behind. Yet in practice we'll probably
   not support other systems than Linux.

4. epoll(2) starts to scale with hundreds or
   thousands of sockets. Meanwhile, it has high
   overhead to adding/removing sockets (context
   switch to kernel and back). Our typical case
   will have a handful to a dozen sockets.
   Hardly a justification for epoll's heavy guns.

Change-Id: Idf88257ea85e061a37af29eed21e38655ff43c9b
2017-03-10 10:47:36 +01:00
Ashod Nakashian
e4563f7d42 nb: ping-pong messages between client and server
Change-Id: I3856dde09764075a138e8574520487e6e5accd90
2017-03-10 10:47:36 +01:00
Ashod Nakashian
85a398ad9c nb: Socket connect supports waiting with timeout
Change-Id: Ib2d713d68f3a27067b121adb356188a164da4589
2017-03-10 10:47:36 +01:00
Ashod Nakashian
976381f633 nb: server now accepts asynchronously
Change-Id: Ic98f31d4f432fc8a06690b94899314b7c9106c69
2017-03-10 10:47:36 +01:00
Ashod Nakashian
d9c88322e2 nb: connect and read asynchronously
Change-Id: I04733f8dbf06f5f31e6b05e7f017ef75c629a015
2017-03-10 10:47:36 +01:00
Ashod Nakashian
3e6ceda91b nb: add polling to Socket
Change-Id: Ie3fd1f271d9c6fa24e8583316e68a443489d1967
2017-03-10 10:47:36 +01:00
Ashod Nakashian
b772f8a860 nb: add socket error getter
Change-Id: Ia0dfd1d6e6bfd2b34b5a9b01c883d78f9bb15e7d
2017-03-10 10:47:36 +01:00
Ashod Nakashian
06990cb703 nb: Socket fd member is const
Change-Id: Icc7f4d9bbd15ce0feb3a58339771fbfd168e20e5
2017-03-10 10:47:36 +01:00
Ashod Nakashian
6a82f12d5f nb: add recv and client connection
Change-Id: I311a475428ff410ca26f6049d5371943aa88cc59
2017-03-10 10:47:36 +01:00
Ashod Nakashian
2ebf4bdd58 nb: accept connections and send
Change-Id: Ie99b8c15e097fcaca0675aba11e11a11c2e7098f
2017-03-10 10:47:36 +01:00
Ashod Nakashian
1e2f7a9f65 nb: bind reuses address automatically
This is virtually always desirable, since
without it we may fail to bind after recycling
if the previous socket is TIME_WAIT.

However, if a socket is bound to same address
this will not prevent the failure to bind,
and we'll detect that the address/port is busy.

So the advantage is in minimizing recycling time.

Change-Id: Ib3bbbf7065f9822acfbd2d7f8ff3e8951739c0ef
2017-03-10 10:47:36 +01:00
Ashod Nakashian
21d6fbd948 nb: Socket doesn't throw on failures and better doc
Change-Id: I125c417c5d9e1a3f40ec386f4871bf6cf2c56ac8
2017-03-10 10:47:35 +01:00
Ashod Nakashian
3d2c2655cd nb: Socket supports listen and accept
Change-Id: I210ee7843f9ff977fde719773b920f1c9c720598
2017-03-10 10:47:35 +01:00
Ashod Nakashian
bd92b09da5 nb: add Socket class
The new socket class is implicitly
non-blocking, streaming, ipv4 socket.

Ipv6 to be added later, as necessary.

Change-Id: I722cc63ea97394d47a50b733c58a69cc1529d815
2017-03-10 10:47:35 +01:00
Ashod Nakashian
41f58f4b4d nb: add new loolnb program
Change-Id: Ib08ff3cdc037876e9c53b87603140b3c603ee916
2017-03-10 10:47:35 +01:00
Pranav Kant
48977108be loleaflet: Allow not inactivating the screen
Change-Id: Iad6233e2855b9260732ce4449668c0fab1cd3804
2017-03-10 14:58:47 +05:30
Pranav Kant
6c333b154a Typo
Change-Id: Iba85f017321806649ab4723a88873894c1b349f3
2017-03-10 14:17:54 +05:30
Henry Castro
bd911ff9d5 loleaflet: rework Impress annotations
LO Impress does not have an anchor position of the annotation object

Change-Id: Ifaa08bb3f62f442f3ee58242e835b6377901a592
2017-03-09 23:01:33 -04:00
Pranav Kant
af3a9110ee loleaflet: Add trackchange flag when object is modified too
Change-Id: I0b1c67737088018e4f87b85b5b10f3c68233c56f
2017-03-09 17:41:41 +05:30
Pranav Kant
148e0f6832 loleaflet: Make caption text bold
Change-Id: I2dbfcf8e341703ba931466e00c269a4a5814c7f9
2017-03-09 17:41:15 +05:30
Pranav Kant
8b3267e32e loleaflet: Add change tracking captions
Use the redline descriptions, such as, "Insert 'text'" etc. as captions
in change tracking sidebar objects.

Change-Id: I6c99f3b45725620b8888da77b0b8b4ebcdda10d2
2017-03-09 17:20:15 +05:30
Pranav Kant
ab7fc23021 loleaflet: Bin comment on change tracking option in toolbar
... as one can now easily comment on the change using the new popped up
sidebar object that gets added to DOM when a new redline is added.

Change-Id: Icb048672b0b3fe2a0490b64e05539095ffcb3715
2017-03-09 17:12:37 +05:30
Pranav Kant
7c84478840 loleaflet: Allow accepting/rejecting a change from sidebar object
Change-Id: I309b33c4569bc74c69200298566734e16d08b305
2017-03-09 17:11:01 +05:30
Pranav Kant
88de8e97cc loleaflet: Handle change tracking comments in multiview
Change-Id: Ib7d10b96e7d58f7578fe9b6fd8605eb3cfe8232f
2017-03-09 14:08:34 +05:30
Pranav Kant
4e491f5f26 loleaflet: Fix deleting comments from sidebar
Change-Id: Idf0ab544f7b91195ddf6c512eac6ab90fc0c0741
2017-03-08 18:22:03 +05:30
Pranav Kant
728c0d320d loleaflet: Change tracking comment can be changed now
Change-Id: I92886afc5e4a9a1b03f148d11c54a9988261c2c4
2017-03-08 17:56:09 +05:30
Pranav Kant
66c51609e7 loleaflet: Show change tracking comments in sidebar
Change-Id: I89c095c388efffc4a96a3837a8b780d14931b33f
2017-03-08 17:56:09 +05:30
Pranav Kant
0c5efd80ad Add change tracking toolbar buttons
Change-Id: Ie2b77ce5828de1062d94d0fca35852f7f5e15dbc
2017-03-08 17:55:23 +05:30
Henry Castro
9f9e090039 loleaflet: make annotation color consistent with the toolbar
Change-Id: I7b153f01844f5be2c55d1760b75206d2ca96a01d
2017-03-07 21:35:50 -04:00
László Németh
1b8b8f7efb loleaflet: fix console log in tile debug mode
Change-Id: Ic216369574b834148196d0ba8a03bc0a1d14db1a
2017-03-07 15:51:31 +01:00
Henry Castro
9af9ce9829 loleaflet: simplify popup menu of the annotation objects
Change-Id: I2eee2e317afc01fdb9aff90481cb546e3edf8b39
2017-03-05 22:19:23 -04:00
Henry Castro
42823172a2 loleaflet: insert Impress annotations
Impress does not send anchor position property of the annotation object, so tweak the code
to set the cursor position

Change-Id: I12e365ed600a53b5a2c1bcb0ef52dec078a258f2
2017-03-05 16:25:26 -04:00
Henry Castro
64dd84125b loleaflet: fix min width of an annotation
Change-Id: I129faa235ee5d22b77f935e89de0756807f276c6
2017-03-03 16:51:04 -04:00
Henry Castro
ecd6747ebc loleaflet: append L.Annotation to popup pane
Change-Id: I9ff4cf0b17c53a677625d5152e56e529482de094
2017-03-02 21:35:20 -04:00
Pranav Kant
8328b1bdb6 lolefalet: Bin unused variables
Change-Id: I693f67254194f78d999103801b1cf05d1f8196b4
2017-03-02 11:44:08 +05:30
Pranav Kant
40a1383b6d loleaflet: Show change tracking menu options in file menubar
Change-Id: Ie48bfdeb9545fbe7aec40ce3e7bc0f50b7f5007f
2017-03-02 11:12:52 +05:30
Henry Castro
a1ed658080 loleaflet: enable annotation pop-up menu
Change-Id: I670987359261b27d0b081ea2bd803b3fbb43d7dc
2017-03-01 22:10:23 -04:00
Henry Castro
dc24fdea67 loleaflet: change annotation appearance
Change-Id: I9c27b0576b686ac5b8a92bda8ab7960a1b400777
2017-03-01 17:54:45 -04:00
Samuel Mehrbrodt
f0ac4913ef Add LibreOffice favicon
Change-Id: I6b2c045dbc92f06bcf5a8c8bec74887b36cdc4f5
Reviewed-on: https://gerrit.libreoffice.org/34752
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-01 13:48:57 +00:00
Andras Timar
453819ed15 adapt rpm spec file to new build system, remove obsoleted options and don't install ssl key/cert 2017-02-28 22:58:50 +01:00
Andras Timar
738792d5ff use key.pem from source directory for unit tests 2017-02-28 22:54:03 +01:00