A quite common logic that is best moved to a utility
and optimized for best performance.
Includes unit-tests.
Change-Id: Id63a388690c17355eb2fac529070c38e9b082fd0
This is needed so we can use this inside ChildSession.
Change-Id: I88f2cc767412fd52dbb242938f0f9897d4277639
Reviewed-on: https://gerrit.libreoffice.org/63836
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Actually, I should expand on this and write a test that makes sure the
FakeSocket API semantics does in fact match that of the real socket
API... A fakefakesockettest. Later.
Change-Id: I5cf885a956d6d795976a4369448be04e88837c19
I had no idea that the CPPUNIT_ASSERT* macros work by throwing
exceptions. They do, so one should thus not catch them, but let the
Cppunit code take care of that.
Also, make the tests a bit more specific and add some
fakeSocketAvailableDataLength() checks.
Change-Id: I9291822114331c21b774bb41116e8b2ff709dae2
Sad that this Makefile.am is so complicated, and that this needs to be
added explicitly like this.
Change-Id: I8b1b25761eb723e124cab96479f49478d3a75194
Based on Mobile/TestFakeSocket/TestFakeSocket/main.mm. Needs work,
does not really test the interesting semantic corner cases that have
been fixed only recently.
Change-Id: Ie2f3dbd2b478ab3acb4bfef0e0d3031c817d0f37
Check all pariticipating IPs to be allowed to use convert-to
functionality. In a simple use case it means the reverse-proxy's
and the actual client's IP.
Change-Id: I4ef9cb14a1c3003cba6c66f6e99d5b54b2c3b2b8
Extract the client IP from the X-Forwarded-For value
and use that one to allow / deny the usage of convert-to
feature.
Change-Id: I363c0931df5a0538236cae12f943fffd65086ee6
Add an entry to discovery.xml with the urlsrc where capabilities end
point can be found. Use json format to send back the feature list.
Change-Id: I390a53d956d53ca79e5a8090aead7f4131ec4ca0
Also support anonymization of downloadas documents
and renaming of documents.
Reviewed-on: https://gerrit.libreoffice.org/57541
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 78248a542c9ca31bf9ad4cad9b55d78690384395)
Change-Id: I81a80e6290217659987d73f625e5f0fb81cb7ef2
We try to decrease the network usage with avoiding sending out
to much tiles to the client. When we already sent out two versions
of the same tile without having the tileprocessed message from the
client we delay sending out the next version to avoid spamming tiles
on the network.
Change-Id: Ia47cd7c0d3fb829f6777f0c3265970433591df19
It's good if this limit big enough to send all the tiles of the
current visible area at once, so the tiles arrive at the same
time to the client by zoom or scroll. Now this value is set to a bit
bigger so if we have a small amount of tiles before zoom / scroll we'll
still see the same on the client side.
Change-Id: I8e28dbf6197fe2f683fe9528e9a32c15a191b20e
Some times tiles with the same wireID survives the wireID
filtering in kit, so we should do that in wsd too.
The issue is with the tilesBeingRendered construction. First when
one tile is filtered out on kit side the client remains subcribed
to the tile, since wsd does not know filtering happened.
Second via the tilesBeingRendered object more clients can be subcribed
to the same tile and so when one client request a new version of this
tile (with an old wireID) the rendered tile is sent to all subscribed
clients even if the other clients has up-to-date tiles.
Change-Id: I4ca6b7a83a5d6979a9f924d766a71aba5e5362c7
Since this commit:
9473908d45
We can avoid that, because the tiles will be invalidated
on the client side and when the client visible area changes
the invalidated tiles are requested anyway.
Change-Id: I272e3b4b87380ae574c16a2b480dbc8caabf4b32
When we're doing the prerendering we also need to register
a tileBeingRendered object, so we know that the given tile
will arrive soon. In earlier version of the code, rendering
and sending of the tile was not separated in time, but now it is,
so we need create a tileBeingRendered object even if we don't
subscribe the client to it yet.
Change-Id: I1374c22e5ffebe1d6fcc6e37261ddcedeb9066ec
We already use a suffix "Interface" for SocketHandlerInterface, so
rename IDocumentManager to DocumentManagerInterface.
Naming "interface" classes with an "I" prefix is C# and COM style.
Sure, that is a convention as good as any other, but let's try to be
consistent within this rather small code-base.
Change-Id: I9c356df327debd780f23ed2b2e6d6e630328861e
It's seems unstable. After canceltiles wsd still can send tiles
if they already in the senderqueue.
Change-Id: I28f669aa18dfbfee1d9d242bd1ee3d0490f06c68