We need to get more helpful structure into this message, and add a
type=bg flag to handle background progress messages.
Add unit test for merging progress: setvalue commands.
Simplify ProtocolHandler sendTextMessage with a std::string wrapper.
Android code needs manual testing.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I54ce807e2fc5de80118905e68557a95e637fbd18
We need to have a valid wopiFileInfo instance
even on Mobile, since we dereference it
to get the actual unique_ptr.
Eventually, we should change this to be
a shared_ptr everywhere, but until then
we need to make sure the pointer is valid.
Change-Id: I54b6a0f862e319f4e727c28ac396102410bb422d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When we call checkFileInfo from the constructor
of CheckFileInfo, it is possible for the
callback to get fired immediately if we fail
to open a socket.
In that case, the caller would have had
no chance of having stored the reference to
the CheckFileInfo object instance, so
the callback would fire without the owner
having a way to properly do housekeeping.
By moving the call outside of the constructor
and making it explicit, we allow for a
better management of the CheckFileInfo
object instance.
Change-Id: I3094b73fa3ab70e83ec5238959defcb2fd9ecf4e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Since we have a more accurate reason
for failing to load, that's what we
should always return.
Change-Id: If9d38cf6de6d41310ba94857efcd073e3f4ef8b7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We might not have the WS yet when
CheckFileInfo fails or returns unauthorized.
Change-Id: Id0fe34a6fadef7ba4094707a0ae82b83b9b2a5fb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In some cases the WOPISrc is inconsistently
encoded. So now we decode before comparing.
Also, improve related log entries.
Change-Id: Ifd6cca76c91a34761dd0ce8f6d78c3af5d47fd43
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We only need the client WebSocket when creating
a new ClientSession. As such, we can spawn the Kit,
create a new thread, and even download the document
before the said WebSocket is connected.
At this point we only refactor the createDocBroker
helper.
Change-Id: I1bb57f6f0f2e89d49266cb87f152970a47e1eecf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Support parallel CheckFileInfo upon serving
cool.html. This makes loading documents faster
from the user's perspective by parallelizing
CheckFileInfo and, later, DocBroker creation
and document downloading.
Change-Id: I838a19022517196ee2b459991a542ed9ef323e48
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This makes it easier to support even earlier use
of RequestVettingStation, when cool.html is served.
Change-Id: I206f5f593a33806c24c6ed1e126d4cae5500f405
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This excludes Wopi handling (as much as possible)
from mobile builds.
Change-Id: I4abb00f02e77b5d89d56ced49ce19a37ae93c13e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Throwing exceptions from an async processor does
nothing good. Instead, we handle the consequences of
the error in-place, instead of throwing.
Change-Id: I85c4cee7cc8231453498e4cb9cb07a07b2b417c9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
CheckFileInfo requests can now redirect
to a new URL.
Change-Id: I7579ac37235b1a2ac1d7091366f0046cf889ce15
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This breaks the CheckFileInfo fetching
code in RVS into its own function to
allow for redirection.
Change-Id: I8bfa3a71705c77af8f6e75ed1af75e710767cf19
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
RequestVettingStation is designed to
vet requests before allocating further
resources. Specifically, it is to be
used to verify whether the resource
requested exists and whether or not
the request is allowed and authenticated.
All of this is designed to be done
asynchronously, for performance reasons.
Change-Id: I399fa7bc91741ffee065a6d41acca0756eedc939
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>