Commit graph

26 commits

Author SHA1 Message Date
Henry Castro
7243e485d0 loolwsd: assign view id after loading
When session, it is not assigned, ViewCallback thread
will not enqueue the message
2016-09-17 18:13:05 -04:00
Tor Lillqvist
941f400e71 Minor comment fix 2016-09-16 12:03:57 +03:00
Tor Lillqvist
4799bcc73e Clarify comments about the meaning of the three LOOLSession subclasses
Be careful in using the definite article for classes that are
instantiated as singletons in a process, and otherwise an indefinite
article. Also mention in which process objects of the type in question
exist.
2016-09-16 11:24:35 +03:00
Pranav Kant
76884fc020 loolwsd: Remove unused method
Change-Id: I9fcd2610c9cd27a32a9a835801ef627a631a85da
Reviewed-on: https://gerrit.libreoffice.org/28485
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-08-30 07:46:18 +00:00
Pranav Kant
7d48cd6f17 loolwsd: Echo back view information to clients
View information as of now includes viewid and username
associated with the view.

Change-Id: If0c4957eb56962eb4b1b1d0c1189dc300fa6b857
Reviewed-on: https://gerrit.libreoffice.org/28482
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-08-30 07:45:47 +00:00
Pranav Kant
67444eeb80 loolwsd: Pass sessions' usernames to core
Change-Id: I8c81c02fafd2cb9d0048729401e082bb422e299b
Reviewed-on: https://gerrit.libreoffice.org/28481
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-08-30 07:45:37 +00:00
Pranav Kant
f6217133f4 loolwsd: view ids - unsigned -> int
Change-Id: I4bc2aa109143dd4cfd88a49c1988b66ae134d647
2016-08-29 17:57:23 +05:30
Pranav Kant
178808f989 loolwsd: Notify other views when new view is added
... but no need to notify the one which is just added.

Earlier behavior was notifying only the one which is just added,
which is redundant as same is accomplished by 'status' message.

Change-Id: Ib09424d186c49527b7b9c36fdabf90c31518ee04
Reviewed-on: https://gerrit.libreoffice.org/28395
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-25 18:26:31 +00:00
Ashod Nakashian
0d395f18b5 loolwsd: cleanup of ChildSession
Change-Id: I63bd6ff24a54b0ba3e0361ea385bf866f98faf76
Reviewed-on: https://gerrit.libreoffice.org/28306
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:49:45 +00:00
Ashod Nakashian
a28b832309 loolwsd: proper ChildSession cleanup
ChildSession cleanup is tricky because it needs
to be cleaned up when the connection is dropped.
The ChildSession itself needs to initiate this
cleanup from Document.

A new approach simplifies the design and correctly
broadcasts remview to all other connections so
they would be able to cleanup visual elements.

Change-Id: I78fd01fb42b801913534c858324c16dd7ad6451d
Reviewed-on: https://gerrit.libreoffice.org/28302
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:44:24 +00:00
Ashod Nakashian
59b88dab49 loolwsd: don't expose ChildSession mutex publicly
The only usecases for using the ChildSession mutex
are during tile rendering in Document. For these
the lok::Document mutex is perfectly fine.

Change-Id: I888e51d7885b05081858bcd55212abe45925e732
Reviewed-on: https://gerrit.libreoffice.org/28295
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:04:53 +00:00
Ashod Nakashian
006a49007c loolwsd: sync re-activating views by replaying state messages
Change-Id: I0ce37ca75f10493a90107e93c253edf084a15f7f
Reviewed-on: https://gerrit.libreoffice.org/28284
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 04:13:54 +00:00
Ashod Nakashian
daad00812d loolwsd: refresh views on UI re-activation
Change-Id: I78d04abe939a91e56cb06f89184e651e7946b28b
Reviewed-on: https://gerrit.libreoffice.org/28134
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:19:15 +00:00
Ashod Nakashian
5af1f18e36 loolwsd: convert function-object callbacks to abstract interface
Change-Id: Ia2e832659f8deddd55b8be6507c2d7406f110085
Reviewed-on: https://gerrit.libreoffice.org/28133
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:18:26 +00:00
Ashod Nakashian
08909b2a3d loolwsd: doxygen comments added to all classes
Change-Id: Ia485c2dcec20a6840d46836a61f75a8e7e8762ed
Reviewed-on: https://gerrit.libreoffice.org/28128
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:12:31 +00:00
Ashod Nakashian
e3507552b7 loolwsd: one thread and queue per document
Each ChildSession had its own thread and queue,
which was an overkill. By moving the LOK callback
handler into Document and handling all events in the
same order that we receive them we reduce resource
consumption without affecting performance.

In fact, performance could improve by avoiding
unnecessary overheads.

Change-Id: Ic2bac0f08c28e91acabd512a704966c6b761fc7c
Reviewed-on: https://gerrit.libreoffice.org/28124
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:09:57 +00:00
Ashod Nakashian
58468c76be loolwsd: cleaned up ChildSession public members
Change-Id: I4bfc008859edb979688ece89d99af227ea3d0416
Reviewed-on: https://gerrit.libreoffice.org/28123
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:07:44 +00:00
Ashod Nakashian
ae5f47234c loolwsd: per-session callbacks
Callbacks from Core are now per-session and not
shared among all. A new descriptor is used to
help get from the callback to the respective
session.

Change-Id: Ie72771da05eef4760cf01351f7c06c034abf5109
Reviewed-on: https://gerrit.libreoffice.org/28122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:06:59 +00:00
Ashod Nakashian
10737fdeab loolwsd: payload as std::string
Change-Id: Icee8a16fd18489da87e22955f3126851261332e5
Reviewed-on: https://gerrit.libreoffice.org/28120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:05:53 +00:00
Ashod Nakashian
6536ba2fe2 loolwsd: correct multiview creation
Change-Id: Id6675f6410793b743aec53182a4b5756b7cffa23
Reviewed-on: https://gerrit.libreoffice.org/27272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-18 02:49:45 +00:00
Ashod Nakashian
74304fc08e loolwsd: ChildSession error propegation and cleanup
Change-Id: I8e5c87b6989fd090c98ca35e2584a7dd6d1c6a60
Reviewed-on: https://gerrit.libreoffice.org/25267
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 16:34:54 +00:00
Ashod Nakashian
c6454ff9ed loolwsd: protect against null lok::Document
Change-Id: Iffa9c7f708d04bede5d98ba311e499a0874605fc
Reviewed-on: https://gerrit.libreoffice.org/25237
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 03:22:34 +00:00
Ashod Nakashian
5a8b3c8169 loolwsd: LibreOfficeKitDocument* -> shared_ptr<lok::Document>
Change-Id: Ie94882482729e4d6bb69c9f92badd375231fece2
Reviewed-on: https://gerrit.libreoffice.org/25094
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-18 11:31:10 +00:00
Ashod Nakashian
a21bcc2341 loolwsd: LibreOfficeKitDocument* -> shared_ptr<lok::Document>
Change-Id: Iafc48317c225f93b7d58708dd26f04d6bb13988e
Reviewed-on: https://gerrit.libreoffice.org/25092
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-18 11:29:05 +00:00
Ashod Nakashian
b41f0a6ea3 loolwsd: ChildProcessSession -> ChildSession
Change-Id: I24f001cb4d17d1ddc5cbd4f48134ec4eb8777afb
Reviewed-on: https://gerrit.libreoffice.org/25062
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 13:56:45 +00:00
Ashod Nakashian
7ce6e67731 loolwsd: ChildProcessSession.{cpp,hpp} -> ChildSession.{cpp,hpp}
Change-Id: Ic0c7f0992c9024d8fb8478b41205394372094af8
Reviewed-on: https://gerrit.libreoffice.org/25061
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 13:56:21 +00:00
Renamed from loolwsd/ChildProcessSession.hpp (Browse further)