Commit Graph

35 Commits (3ba713aabf20279c5d83d039e5a7ac906b79c783)

Author SHA1 Message Date
Jaume Pujantell 3ba713aabf add isMobileApp util function to reduce ifdefs
Removed all MOBILEAPP preprocessor conditionals from Util.hpp/.cpp
Added isMobileApp function to help remove further conditionals.

Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I038a4db47ec2a2c7bb10f5696df5571b13bd9a61
2024-03-20 09:13:00 +01:00
Jaume Pujantell d77b0b6bd2 android: add support for c++20 and std::filesystem
Android build fails due to use of std::filesystem and
c++20 features like string::starts_with.

cmake requires c++2a flag
std::filesystem requires ndk 22+

Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: Ibba1e5e76a32ba5526d9d7111b810a650f372a02
2024-03-15 12:23:56 +01:00
Michael Meeks c117d87bb4 nearly pure re-factor: split out code into its own modules.
StateRecorder.hpp split from ChildSession.cpp
KitWebSocketHandler.[ch]pp split from Kit.cpp.
ThreadPool.hpp split from RenderTiles.hpp

Expose headers for KitSocketPoll and Document
at the same time.

Not clear we need the DocumentManagerInterface anymore.

Conditionally compile out Document::createSession for unittest
dependency breaking, and avoid Rlimit::handleSetrlimitCommand
likewise.

Make makePropertyValue a private method of Kit.cpp.

clang-format new files.

Change-Id: I47a1d6afe20165f156b477a931b94c916cff4b9d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-03-06 20:56:55 -05:00
Ashod Nakashian 7570dd299c wsd: use RequestVettingStation for async loading
This replaces the synchronous loading logic
with the new asynchronous one.

Change-Id: I20fd7903cffbbd7c524d8051295113439ef75d5b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-02-24 14:09:22 -05:00
Ashod Nakashian 5a82c36680 wsd: move ClientRequestDispatcher to own file
This moves ClientRequestDispatcher and all
its direct exclusive dependencies to its
own file and adjusts formatting.

No functional changes were performed,
although namespaces were restored and
other minor changes were done for
consistency.

The resulting file is still rather large
at around 2000 lines, but that makes
COOLWSD.cpp smaller by about 30% now.

Change-Id: I59bcd997ad08702ce7029c6791095e75ad9b23b0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-02-21 20:13:39 -05:00
Jaume Pujantell 8f178ef6cd extract some functions to extra files for in process mode
Extract some functions from ForKit.cpp and COOLWSD.cpp to new files
so we can do a kit in process mode without using ifdef directives.

Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I7529f8f46a8026318244666b27d1ce72ed5ad4ca
2023-12-18 10:34:10 +00:00
Caolán McNamara 654cb1ae05 add DeltaSimd to android/iOS
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icad55a047ea505d81e50ae634e38d8301fb3b21e
2023-09-25 16:55:04 +01:00
Caolán McNamara aa59f57285 add Simd.cpp to android CMakeLists
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I577bbe203a940e1d2f38fa4d1f86cc6d8f8d1f33
2023-09-25 16:55:04 +01:00
Andras Timar a077c4288b Put all Zotero logic to browser
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib1b071b96322511b7f319ff6b851e902b3556fbb
2022-12-12 13:35:29 +01:00
Pranam Lashkari 2cfae369af initial zotero skeleton
add zotero UI only if user is logged in
when zotero citation edit button is clicked,
fetch the library with zotero API.
Let user select what to insert

at this stage its not a complete solution but just first stage

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id67d8409bcd6416994713acd9ace495b24823fb0
2022-11-30 20:37:48 +01:00
Miklos Vajna 3bf487c540 android: don't link against PocoRedis
This was added in commit 4f03f09c53
(android: Gradle project and other stuff to build., 2019-02-12), but
Online doesn't need it, probably was a copy&paste mistake that went
unnoticed till today Michael S mentioned it on IRC.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Icb60cacfb9469a674db3f0f7a359ccdf01132558
2022-11-14 09:21:53 +01:00
Michael Meeks a8c449642e Android - add --with-zstd-includes and libs and build instructions.
Also reduce cut/paste in configure.ac around checking for files.

Change-Id: I33f789e99ed79f08cb9cfa5ed147b764332adfde
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-02 12:09:53 +01:00
Andras Timar f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Pranam Lashkari f02a0a1447 freemium: renamed Freemium namespace to CommandControl
also renamed freemium files accordingly

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id33b8a1d1a2a8725bfa6e7b7c562430ea126993c
2021-10-21 12:28:13 +03:00
Andras Timar 24214ef955 Android: add common/Freemium.cpp to CMakeLists.txt.in
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibdfe445d0085fe26f74655a265cb2e9208157f7b
2021-08-06 17:21:04 +02:00
Pranam Lashkari e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Tor Lillqvist 8cef48a0fa Introduce a generic TraceEvent class and instant events here, too
Modelled on how it is done in core. ProfileZone is derived from
NamedEvent which is derived from TraceEvent. Here we don't keep any
separate ProfileZone.hpp, though.

This was needed to introduce generation of "instant" events here, too.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6583134e96001641c50339deb4197fca6ab7d5d5
2021-06-02 09:04:21 +03:00
Tor Lillqvist 3553430a62 Try to fix iOS and Android build
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I0839c589517f64d966fec9f247dda4163bdbe5fd
2021-05-31 10:56:19 +03:00
Ashod Nakashian 08eab4bc15 wsd: more config features
Change-Id: I2fb33a2d89ab886bc454ae961dbff7b6c2c1b0ef
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-02 12:43:39 -04:00
Henry Castro b6520bdaeb android: fix the include directories when builddir != srcdir
Change-Id: I81e823354129c510c43d606f0e56f0cbf92c5eef
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100568
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-08-12 13:38:30 +02:00
Jan Holesovsky b39017c08c android: Remove unneeded dependency + add some comments.
Change-Id: Idbc271a398f6f0c037d478bda5ee0b149ca4f24f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97730
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-07-02 11:08:19 +02:00
Jan Holesovsky 37b3acbdf1 android: Add support for x86 ABI too.
Turns out that the ChromeOS uses the x86 Android runtime, not x86-64.

Change-Id: Ic3b6f7a65d35d2298daa731f46e57068eaf2583d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97607
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-07-01 17:10:28 +02:00
Ashod Nakashian fa96934861 wsd: Authorization parsing and creation improvements
Authorization class now handles the parsing and creation
of its instances, which makes it centralized.

We also avoid repeatedly constructing Authorization objects
in ClientSession and instead do it once at construction
and cache it.

A bunch of new unit-tests added.

Change-Id: I9b5939be51a5957214d07ed8f1096efd179686c6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96825
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:33:57 +02:00
Ashod Nakashian 5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Jan Holesovsky a12f6a64da android: The location of liblo-native-code.so has changed.
By mistake, the commit 526db8b1bd was a wrong
version of the patch; update it slightly.

Change-Id: I1c0148a7195a577a14440453688d506b83aa6ab4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97381
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-29 16:17:12 +02:00
Jan Holesovsky 526db8b1bd android: The location of liblo-native-code.so has changed.
Don't try to look it up at the old location, that'll only cause
problems.

Change-Id: I6376770ce09c5a19cfe1514e1fd12c508a5fc3d0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97420
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-29 16:02:55 +02:00
Jan Holesovsky 661bb47d07 android: Add x86-64 build too.
This will make it possible to create AAB's that contain 3 ABIs:
armeabi-v7a, arm64-v8a and x86_64.

If you want to build for just one ABI, use --with-android-abi=... where
the value is one of those three above.

Change-Id: I553b8ca941db67eddc1d712a96b818f9cfedd0fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97227
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-29 14:24:36 +02:00
Henry Castro 2eec63af29 android: add "x86_64" ABI build variant
Change-Id: I19281af5432ae5a02f26f33464ced722759a4c67
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95609
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-06-11 20:11:44 +02:00
Henry Castro 56fb579332 android: fix build when builddir != srcdir
Unfortunately the "liblo-native-code.so" file is located
in the LO source directory

Change-Id: I43ad3313ad2dba62d987cbdbaed5de490c52b9cc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95608
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-06-11 18:27:58 +02:00
Michael Meeks dec683218a Proxy: move RequestDetails to its own header.
Share it with various other places requiring similar data.

Change-Id: I873f56798f5a34dcf7440456bd649b68f6d3df98
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94069
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-12 20:30:17 +02:00
Miklos Vajna b8bd1990aa Rework LOOLProtocol::tokenize() to return a StringVector object
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.

The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.

This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)

Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.

Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28 16:07:56 +01:00
Michael Meeks 7d4580733f Un-break the XML by adding missing closing tag.
Also get the path right in the CMake .in file.

Change-Id: Ib0f02c5e4a71d04e40b7c353caea872a5ea9cfd6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89386
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-25 00:11:43 +01:00
Jan Holesovsky 2ea84e11cb android: Fix a typo in the 32bit build.
Change-Id: I8a1d68327c48da47d970eccdd586c26467bb495c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86014
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-30 16:46:32 +01:00
Jan Holesovsky d556760c2f android: Implement (optional) support for both 32bit and 64bit build.
This adds possiblity to specify additional build trees for LibreOffice
and POCO that contain the 64bit version, like:

    --with-lo-builddir=/local/libreoffice/master-android-release:/local/libreoffice/master-android-release-64bit \
    --with-poco-includes=/opt/poco-android/include:/opt/poco-android-64bit/include \
    --with-poco-libs=/opt/poco-android/lib:/opt/poco-android-64bit/lib \

which triggers both 32bit and 64bit build.

It should be still possible to build just 32bit when used without the
semicolons - which is useful for the normal development.

Change-Id: I99145e57f0cc15f022c05d09f8c4ab275880d44b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/84312
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-30 14:24:30 +01:00
Jan Holesovsky 2b13c69d75 android: Split the actual editing Activity into an own library.
This way, it is more naturally visible what is the actuall app (with the
initial recent documents / file picker) and the editing part.

Change-Id: Ia764f2900939e980f703e3da9f9abd6c0aee7cbb
2019-07-12 11:52:56 +02:00