summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2021-11-18 13:08:14 +0100
committerAndras Timar <andras.timar@collabora.com>2021-11-18 14:14:11 +0100
commitf07ff8c7e0754babe9819163fb0edeacac326caf (patch)
tree2e24c52eb95edf971399e33580d26b691528b211
parentNotebookbarBuilder.js: Set role of Menubar. (diff)
downloadonline-f07ff8c7e0754babe9819163fb0edeacac326caf.tar.gz
online-f07ff8c7e0754babe9819163fb0edeacac326caf.zip
rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
-rw-r--r--.gitignore19
-rw-r--r--.gitpod-files/coolwsd-gitpod.xml (renamed from .gitpod-files/loolwsd-gitpod.xml)26
-rw-r--r--.gitpod.yml2
-rw-r--r--Makefile.am78
-rw-r--r--PROBLEMS2
-rw-r--r--android/app/appSettings.gradle.in4
-rw-r--r--android/app/proguard-rules.pro2
-rw-r--r--android/lib/build.gradle.in12
-rw-r--r--android/lib/libSettings.gradle.in6
-rw-r--r--android/lib/src/main/cpp/CMakeLists.txt.in6
-rw-r--r--android/lib/src/main/cpp/androidapp.cpp36
-rw-r--r--android/lib/src/main/cpp/androidapp.hpp2
-rw-r--r--android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java16
-rw-r--r--browser/Makefile.am2
-rw-r--r--browser/README22
-rw-r--r--browser/admin/adminSettings.html4
-rw-r--r--browser/admin/src/AdminSocketSettings.js8
-rw-r--r--browser/archived-packages/vex-js-4.1.0-9ff760927.tarbin2689536 -> 2689536 bytes
-rw-r--r--browser/cool-api.html4
-rw-r--r--browser/html/cool.html.m412
-rw-r--r--browser/html/framed.doc.html2
-rw-r--r--browser/js/global.js2
-rw-r--r--browser/src/control/Toolbar.js14
-rw-r--r--browser/src/core/Socket.js6
-rw-r--r--browser/src/layer/BackgroundColor.js2
-rw-r--r--browser/src/layer/marker/TextInput.js6
-rw-r--r--browser/src/layer/tile/CanvasTileLayer.js10
-rw-r--r--browser/src/map/handler/Map.Keyboard.js4
-rw-r--r--browser/test/bootstrap.js12
-rw-r--r--common/Common.hpp14
-rw-r--r--common/JailUtil.cpp12
-rw-r--r--common/Log.cpp2
-rw-r--r--common/Log.hpp2
-rw-r--r--common/Message.hpp10
-rw-r--r--common/MessageQueue.cpp44
-rw-r--r--common/MessageQueue.hpp20
-rw-r--r--common/Protocol.cpp2
-rw-r--r--common/Protocol.hpp2
-rw-r--r--common/Session.cpp4
-rw-r--r--common/SigUtil.cpp2
-rw-r--r--common/Unit.cpp2
-rw-r--r--common/Unit.hpp2
-rw-r--r--common/Util.cpp6
-rw-r--r--common/Util.hpp6
-rw-r--r--configure.ac110
-rw-r--r--coolkitconfig-mobile.xcu (renamed from loolkitconfig-mobile.xcu)0
-rw-r--r--coolkitconfig.xcu.in (renamed from loolkitconfig.xcu.in)0
-rwxr-xr-xcoolwsd-generate-proof-key12
-rw-r--r--coolwsd.init.rhel6 (renamed from loolwsd.init.rhel6)22
-rw-r--r--coolwsd.service (renamed from debian/loolwsd.service)4
-rw-r--r--coolwsd.spec.in (renamed from loolwsd.spec.in)107
l---------coolwsd.xml1
-rw-r--r--coolwsd.xml.in (renamed from loolwsd.xml.in)42
-rw-r--r--cypress_test/Makefile.am52
-rw-r--r--cypress_test/README4
-rw-r--r--debian/changelog6
-rw-r--r--debian/control8
-rw-r--r--debian/coolwsd.postinst.in (renamed from debian/loolwsd.postinst.in)8
-rw-r--r--debian/coolwsd.postrm5
-rw-r--r--debian/coolwsd.preinst10
-rw-r--r--debian/coolwsd.service (renamed from loolwsd.service)4
-rw-r--r--debian/copyright2
-rw-r--r--debian/loolwsd.postrm5
-rw-r--r--debian/loolwsd.preinst10
-rwxr-xr-xdocker/from-packages/scripts/install-collabora-online-rhel8.sh10
-rwxr-xr-xdocker/from-packages/scripts/install-collabora-online-ubuntu.sh10
-rwxr-xr-xdocker/from-packages/scripts/start-collabora-online.sh28
-rw-r--r--docker/from-source/Debian8
-rw-r--r--docker/from-source/Ubuntu8
-rwxr-xr-xdocker/from-source/build.sh2
-rw-r--r--docker/from-source/openSUSE8
-rw-r--r--etc/apache2/coolwsd.conf (renamed from etc/apache2/loolwsd.conf)4
-rw-r--r--etc/nginx/coolwsd.conf (renamed from etc/nginx/loolwsd.conf)0
-rw-r--r--fuzzer/ClientSession.cpp2
-rw-r--r--fuzzer/README2
-rw-r--r--fuzzer/data/coolclient (renamed from fuzzer/data/loolclient)0
-rw-r--r--fuzzer/data/crash-70dbba08f3353e34ddf3b12d78f8204e104b20bdbin188 -> 188 bytes
-rw-r--r--fuzzer/data/crash-ee6440c94cb4f4f7f902d3b28d607870639d910fbin8652 -> 8652 bytes
-rw-r--r--gtk/Makefile.am6
-rw-r--r--gtk/gtk.hpp2
-rw-r--r--gtk/mobile.cpp28
-rw-r--r--ios/Mobile.xcodeproj/project.pbxproj20
-rw-r--r--ios/Mobile/AppDelegate.mm22
-rw-r--r--ios/Mobile/CODocument.mm4
-rw-r--r--ios/Mobile/DocumentViewController.mm8
-rw-r--r--ios/Mobile/Info.plist.in2
-rw-r--r--ios/Mobile/Resources/Settings.bundle/Root.plist.in2
-rw-r--r--ios/config.h.in4
-rw-r--r--ios/ios.h2
-rw-r--r--ios/ios.mm2
-rw-r--r--kit/ChildSession.cpp8
-rw-r--r--kit/ForKit.cpp38
-rw-r--r--kit/Kit.cpp42
-rw-r--r--kit/SetupKitEnvironment.hpp10
-rw-r--r--kubernetes/helm/README.md10
-rw-r--r--kubernetes/helm/collabora-online/templates/deployment.yaml4
-rw-r--r--kubernetes/helm/collabora-online/values.yaml6
-rw-r--r--man/coolconfig.12
-rw-r--r--man/coolforkit.14
-rw-r--r--man/coolmount.14
-rw-r--r--man/coolwsd-generate-proof-key.16
-rw-r--r--man/coolwsd-systemplate-setup.14
-rw-r--r--net/HttpHelper.cpp2
-rw-r--r--net/HttpRequest.hpp2
-rw-r--r--net/Socket.cpp4
-rw-r--r--net/Socket.hpp2
-rw-r--r--net/WebSocketHandler.hpp2
-rw-r--r--net/WebSocketSession.hpp6
-rwxr-xr-xscripts/logparse.pl24
-rwxr-xr-xscripts/perftrace.pl4
-rwxr-xr-xscripts/segv-catch.pl8
-rw-r--r--sysconfig.coolwsd (renamed from sysconfig.loolwsd)4
-rw-r--r--test/HttpTestServer.hpp2
-rw-r--r--test/Makefile.am6
-rw-r--r--test/TileCacheTests.cpp66
-rw-r--r--test/UnitAdmin.cpp22
-rw-r--r--test/UnitBadDocLoad.cpp26
-rw-r--r--test/UnitCalc.cpp20
-rw-r--r--test/UnitClient.cpp2
-rw-r--r--test/UnitClose.cpp14
-rw-r--r--test/UnitCopyPaste.cpp4
-rw-r--r--test/UnitCursor.cpp22
-rw-r--r--test/UnitEachView.cpp6
-rw-r--r--test/UnitHTTP.cpp2
-rw-r--r--test/UnitHTTP.hpp8
-rw-r--r--test/UnitHosting.cpp2
-rw-r--r--test/UnitInsertDelete.cpp14
-rw-r--r--test/UnitLargePaste.cpp4
-rw-r--r--test/UnitLoad.cpp14
-rw-r--r--test/UnitLoadTorture.cpp6
-rw-r--r--test/UnitOAuth.cpp2
-rw-r--r--test/UnitPasswordProtected.cpp20
-rw-r--r--test/UnitPaste.cpp4
-rw-r--r--test/UnitPrefork.cpp2
-rw-r--r--test/UnitRenderSearchResult.cpp4
-rw-r--r--test/UnitRenderShape.cpp6
-rw-r--r--test/UnitRenderingOptions.cpp4
-rw-r--r--test/UnitSession.cpp16
-rw-r--r--test/UnitStorage.cpp2
-rw-r--r--test/UnitTiffLoad.cpp4
-rw-r--r--test/UnitTyping.cpp16
-rw-r--r--test/UnitUNOCommand.cpp4
-rw-r--r--test/UnitWOPI.cpp10
-rw-r--r--test/UnitWOPIAsyncUpload_Close.cpp8
-rw-r--r--test/UnitWOPIAsyncUpload_Modify.cpp8
-rw-r--r--test/UnitWOPIAsyncUpload_ModifyClose.cpp4
-rw-r--r--test/UnitWOPIHttpHeaders.cpp2
-rw-r--r--test/UnitWOPILoadEncoded.cpp4
-rw-r--r--test/UnitWOPILock.cpp4
-rw-r--r--test/UnitWOPIRenameFile.cpp4
-rw-r--r--test/UnitWOPISaveAs.cpp4
-rw-r--r--test/UnitWOPIWatermark.cpp6
-rw-r--r--test/WhiteBoxTests.cpp50
-rw-r--r--test/WopiTestServer.hpp10
-rw-r--r--test/countcoolkits.hpp (renamed from test/countloolkits.hpp)32
-rw-r--r--test/helpers.hpp90
-rw-r--r--test/httpcrashtest.cpp24
-rw-r--r--test/httpwstest.cpp26
-rw-r--r--test/integration-http-server.cpp12
-rwxr-xr-xtest/run_unit.sh.in2
-rw-r--r--test/test.cpp14
-rw-r--r--test/test.hpp4
-rw-r--r--tools/COOLWebSocket.hpp (renamed from tools/LOOLWebSocket.hpp)12
-rw-r--r--tools/Config.cpp8
-rw-r--r--tools/Connect.cpp14
-rw-r--r--tools/Replay.hpp4
-rw-r--r--tools/Stress.cpp2
-rw-r--r--tools/Tool.cpp4
-rw-r--r--tools/WebSocketDump.cpp4
-rw-r--r--wsd/Admin.cpp32
-rw-r--r--wsd/Admin.hpp2
-rw-r--r--wsd/AdminModel.cpp20
-rw-r--r--wsd/AdminModel.hpp2
-rw-r--r--wsd/Auth.cpp4
-rw-r--r--wsd/COOLWSD.cpp (renamed from wsd/LOOLWSD.cpp)522
-rw-r--r--wsd/COOLWSD.hpp (renamed from wsd/LOOLWSD.hpp)30
-rw-r--r--wsd/ClientSession.cpp68
-rw-r--r--wsd/DocumentBroker.cpp114
-rw-r--r--wsd/DocumentBroker.hpp4
-rw-r--r--wsd/Exceptions.hpp26
-rw-r--r--wsd/FileServer.cpp64
-rw-r--r--wsd/ProofKey.cpp6
-rw-r--r--wsd/ProxyProtocol.cpp6
-rw-r--r--wsd/QuarantineUtil.cpp40
-rw-r--r--wsd/README44
-rw-r--r--wsd/README.vars10
-rw-r--r--wsd/RequestDetails.cpp2
-rw-r--r--wsd/RequestDetails.hpp2
-rw-r--r--wsd/ServerURL.hpp8
-rw-r--r--wsd/Storage.cpp122
-rw-r--r--wsd/Storage.hpp10
-rw-r--r--wsd/TileCache.cpp10
-rw-r--r--wsd/TileDesc.hpp18
-rw-r--r--wsd/TraceFile.hpp6
-rw-r--r--wsd/metrics.txt20
-rw-r--r--wsd/protocol.txt6
196 files changed, 1568 insertions, 1563 deletions
diff --git a/.gitignore b/.gitignore
index ece99487c7..723345df72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,9 +12,9 @@
.vscode
Makefile
Makefile.in
-loolkitconfig.xcu
-loolwsd.spec
-loolwsd.xml
+coolkitconfig.xcu
+coolwsd.spec
+coolwsd.xml
aclocal.m4
autom4te.cache
config.h
@@ -33,7 +33,7 @@ ltmain.sh
missing
stamp-h1
m4
-debian/loolwsd.postinst
+debian/coolwsd.postinst
common/support-public-key.hpp
compile_commands.json
@@ -55,7 +55,7 @@ jsstress
*.exe
cscope*
*.orig
-loolwsd.log
+coolwsd.log
*.log.*.gz
*.lo
*.mo
@@ -72,19 +72,20 @@ browser/typescript_js
connect
lokitclient
+coolwsd
loolwsd
coolforkit
coolmount
coolmap
coolconvert
-loolsocketdump
-loolstress
-loolconfig
+coolsocketdump
+coolstress
coolconfig
+loolconfig
coolforkit-nocaps
loadtest
unittest
-loolwsd_fuzzer
+coolwsd_fuzzer
clientnb
# make tags
diff --git a/.gitpod-files/loolwsd-gitpod.xml b/.gitpod-files/coolwsd-gitpod.xml
index 03fafadd00..18f096c542 100644
--- a/.gitpod-files/loolwsd-gitpod.xml
+++ b/.gitpod-files/coolwsd-gitpod.xml
@@ -9,7 +9,7 @@
<child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="jails"></child_root_path>
<mount_jail_tree desc="Controls whether the systemplate and lotemplate contents are mounted or not, which is much faster than the default of linking/copying each file." type="bool" default="true"></mount_jail_tree>
- <server_name desc="External hostname:port of the server running loolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default=""></server_name>
+ <server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default=""></server_name>
<file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing browser." type="path" relative="true" default="browser/../"></file_server_root_path>
<memproportion desc="The maximum percentage of system memory consumed by all of the Collabora Online Development Edition, after which we start cleaning up idle documents" type="double" default="80.0"></memproportion>
@@ -53,7 +53,7 @@
See also: https://docs.libreoffice.org/sal/html/sal_log.html -->
<lokit_sal_log type="string" desc="Fine tune log messages from LOKit. Default is to suppress log messages from LOKit." default="-INFO-WARN">-INFO-WARN</lokit_sal_log>
<file enable="true">
- <property name="path" desc="Log file path.">/tmp/loolwsd.log</property>
+ <property name="path" desc="Log file path.">/tmp/coolwsd.log</property>
<property name="rotation" desc="Log file rotation strategy. See Poco FileChannel.">never</property>
<property name="archive" desc="Append either timestamp or number to the archived log filename.">timestamp</property>
<property name="compress" desc="Enable/disable log file compression.">true</property>
@@ -71,7 +71,7 @@
<browser_logging desc="Logging in the browser console" default="true">true</browser_logging>
<trace desc="Dump commands and notifications for replay. When 'snapshot' is true, the source file is copied to the path first." enable="false">
- <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/looltrace-%.gz" compress="true" snapshot="false"></path>
+ <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/cooltrace-%.gz" compress="true" snapshot="false"></path>
<filter>
<message desc="Regex pattern of messages to exclude"></message>
</filter>
@@ -81,10 +81,10 @@
</trace>
<net desc="Network settings">
- <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, loolwsd unexpectedly listens on [::1] only.
+ <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, coolwsd unexpectedly listens on [::1] only.
You need to change net.proto to IPv4, if you want to use 127.0.0.1. -->
<proto type="string" default="all" desc="Protocol to use IPv4, IPv6 or all for both">all</proto>
- <listen type="string" default="any" desc="Listen address that loolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
+ <listen type="string" default="any" desc="Listen address that coolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
<service_root type="path" default="" desc="Prefix all the pages, websockets, etc. with this path."></service_root>
<proxy_prefix type="bool" default="false" desc="Enable a ProxyPrefix to be passed int through which to redirect requests"></proxy_prefix>
<post_allow desc="Allow/deny client IP address for POST(REST)." allow="true">
@@ -96,16 +96,16 @@
<host desc="The IPv4 private 172.17.0.0/16 subnet (Docker).">172\.17\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:172\.17\.[0-9]{1,3}\.[0-9]{1,3}</host>
</post_allow>
- <frame_ancestors desc="Specify who is allowed to embed the LO Online iframe (loolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
- <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by loolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>
+ <frame_ancestors desc="Specify who is allowed to embed the LO Online iframe (coolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
+ <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by coolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>
</net>
<ssl desc="SSL settings">
- <enable type="bool" desc="Controls whether SSL encryption between browser and loolwsd is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">false</enable>
- <termination desc="Connection via proxy where loolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
- <cert_file_path desc="Path to the cert file" relative="false">/etc/loolwsd/cert.pem</cert_file_path>
- <key_file_path desc="Path to the key file" relative="false">/etc/loolwsd/key.pem</key_file_path>
- <ca_file_path desc="Path to the ca file" relative="false">/etc/loolwsd/ca-chain.cert.pem</ca_file_path>
+ <enable type="bool" desc="Controls whether SSL encryption between browser and coolwsd is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">false</enable>
+ <termination desc="Connection via proxy where coolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
+ <cert_file_path desc="Path to the cert file" relative="false">/etc/coolwsd/cert.pem</cert_file_path>
+ <key_file_path desc="Path to the key file" relative="false">/etc/coolwsd/key.pem</key_file_path>
+ <ca_file_path desc="Path to the ca file" relative="false">/etc/coolwsd/ca-chain.cert.pem</ca_file_path>
<cipher_list desc="List of OpenSSL ciphers to accept" default="ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"></cipher_list>
<hpkp desc="Enable HTTP Public key pinning" enable="false" report_only="false">
<max_age desc="HPKP's max-age directive - time in seconds browser should remember the pins" enable="true">1000</max_age>
@@ -159,7 +159,7 @@
</webdav>
<ssl desc="SSL settings">
<as_scheme type="bool" default="true" desc="When set we exclusively use the WOPI URI's scheme to enable SSL for storage">true</as_scheme>
- <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and loolwsd. When empty this defaults to following the ssl.enable setting"></enable>
+ <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and coolwsd. When empty this defaults to following the ssl.enable setting"></enable>
<cert_file_path desc="Path to the cert file" relative="false"></cert_file_path>
<key_file_path desc="Path to the key file" relative="false"></key_file_path>
<ca_file_path desc="Path to the ca file. If this is not empty, then SSL verification will be strict, otherwise cert of storage (WOPI-like host) will not be verified." relative="false"></ca_file_path>
diff --git a/.gitpod.yml b/.gitpod.yml
index 9e5559046b..b47dce17b2 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -34,5 +34,5 @@ github:
# 2. Update URL here under tasks
tasks:
- init: cd .. && wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-2021-assets.tar.gz
- prebuild: tar xvf core-co-2021-assets.tar.gz && rm core-co-2021-assets.tar.gz && cd online && ./autogen.sh && ./configure --enable-silent-rules --with-lokit-path=/workspace/include --with-lo-path=/workspace/instdir --enable-debug --disable-setcap && cp .gitpod-files/loolwsd-gitpod.xml loolwsd.xml && mkdir .vscode && cp .gitpod-files/settings.json .vscode/settings.json && make -j `nproc`
+ prebuild: tar xvf core-co-2021-assets.tar.gz && rm core-co-2021-assets.tar.gz && cd online && ./autogen.sh && ./configure --enable-silent-rules --with-lokit-path=/workspace/include --with-lo-path=/workspace/instdir --enable-debug --disable-setcap && cp .gitpod-files/coolwsd-gitpod.xml coolwsd.xml && mkdir .vscode && cp .gitpod-files/settings.json .vscode/settings.json && make -j `nproc`
diff --git a/Makefile.am b/Makefile.am
index cf22d50b74..bf00d8c81c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,31 +42,31 @@ dist_doc_DATA = wsd/README \
wsd/reference.md \
wsd/metrics.txt
-coolwsddatadir = @LOOLWSD_DATADIR@
+coolwsddatadir = @COOLWSD_DATADIR@
coolwsddata_DATA = discovery.xml \
favicon.ico
-coolwsdconfigdir = @LOOLWSD_CONFIGDIR@
+coolwsdconfigdir = @COOLWSD_CONFIGDIR@
-coolwsdconfig_DATA = loolwsd.xml \
- loolkitconfig.xcu
+coolwsdconfig_DATA = coolwsd.xml \
+ coolkitconfig.xcu
apache2configdir = ${sysconfdir}/apache2/conf-available
-apache2config_DATA = etc/apache2/loolwsd.conf
+apache2config_DATA = etc/apache2/coolwsd.conf
nginxconfigdir = ${sysconfdir}/nginx/snippets
-nginxconfig_DATA = etc/nginx/loolwsd.conf
+nginxconfig_DATA = etc/nginx/coolwsd.conf
ACLOCAL_AMFLAGS = -I m4
# quick and easy for now.
include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit ${ZLIB_CFLAGS}
-AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
- -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
+AM_CPPFLAGS = -pthread -DCOOLWSD_DATADIR='"@COOLWSD_DATADIR@"' \
+ -DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \
-DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
${include_paths}
@@ -79,12 +79,12 @@ AM_LDFLAGS = -pthread -Wl,-E -lpam $(ZLIB_LIBS)
if ENABLE_SSL
AM_LDFLAGS += -lssl -lcrypto
else
-loolwsd_fuzzer_LDADD = -lssl -lcrypto
+coolwsd_fuzzer_LDADD = -lssl -lcrypto
coolwsd_LDADD = -lssl -lcrypto
coolconfig_LDADD = -lssl -lcrypto
endif
-loolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 -DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)
+coolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 -DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)
AM_ETAGSFLAGS = --c++-kinds=+p --fields=+iaS --extra=+q -R --totals=yes --exclude=browser *
AM_CTAGSFLAGS = $(AM_ETAGSFLAGS)
@@ -123,7 +123,7 @@ coolwsd_sources = common/Crypto.cpp \
wsd/Auth.cpp \
wsd/DocumentBroker.cpp \
wsd/ProxyProtocol.cpp \
- wsd/LOOLWSD.cpp \
+ wsd/COOLWSD.cpp \
wsd/ClientSession.cpp \
wsd/FileServer.cpp \
wsd/FileServerUtil.cpp \
@@ -144,8 +144,8 @@ noinst_PROGRAMS = clientnb \
connect \
lokitclient \
coolmap \
- loolstress \
- loolsocketdump
+ coolstress \
+ coolsocketdump
if ENABLE_LIBFUZZER
noinst_PROGRAMS += \
@@ -153,7 +153,7 @@ noinst_PROGRAMS += \
clientsession_fuzzer \
httpresponse_fuzzer
else
-noinst_PROGRAMS += loolwsd_fuzzer
+noinst_PROGRAMS += coolwsd_fuzzer
endif
connect_SOURCES = tools/Connect.cpp \
@@ -180,7 +180,7 @@ coolforkit_json = $(patsubst %.cpp,%.cmd,$(coolforkit_sources))
coolforkit_SOURCES = $(coolforkit_sources) \
$(shared_sources)
-loolwsd_fuzzer_SOURCES = $(coolwsd_sources) \
+coolwsd_fuzzer_SOURCES = $(coolwsd_sources) \
$(coolforkit_sources) \
$(shared_sources) \
kit/DummyLibreOfficeKit.cpp
@@ -227,8 +227,8 @@ coolmap_SOURCES = tools/map.cpp
coolconvert_SOURCES = tools/Tool.cpp
-loolstress_CPPFLAGS = -DTDOC=\"$(abs_top_srcdir)/test/data\" ${include_paths}
-loolstress_SOURCES = tools/Stress.cpp \
+coolstress_CPPFLAGS = -DTDOC=\"$(abs_top_srcdir)/test/data\" ${include_paths}
+coolstress_SOURCES = tools/Stress.cpp \
common/DummyTraceEventEmitter.cpp \
$(shared_sources)
@@ -239,7 +239,7 @@ coolconfig_SOURCES = tools/Config.cpp \
common/StringVector.cpp \
common/Util.cpp
-loolsocketdump_SOURCES = tools/WebSocketDump.cpp \
+coolsocketdump_SOURCES = tools/WebSocketDump.cpp \
common/DummyTraceEventEmitter.cpp \
$(shared_sources)
@@ -251,7 +251,7 @@ wsd_headers = wsd/Admin.hpp \
wsd/ProxyProtocol.hpp \
wsd/Exceptions.hpp \
wsd/FileServer.hpp \
- wsd/LOOLWSD.hpp \
+ wsd/COOLWSD.hpp \
wsd/ProofKey.hpp \
wsd/RequestDetails.hpp \
wsd/SenderQueue.hpp \
@@ -314,11 +314,11 @@ kit_headers = kit/ChildSession.hpp \
kit/Watermark.hpp
noinst_HEADERS = $(wsd_headers) $(shared_headers) $(kit_headers) \
- tools/LOOLWebSocket.hpp \
+ tools/COOLWebSocket.hpp \
test/UnitHTTP.hpp \
test/HttpTestServer.hpp \
test/WopiTestServer.hpp \
- test/countloolkits.hpp \
+ test/countcoolkits.hpp \
test/lokassert.hpp \
test/test.hpp \
test/testlog.hpp \
@@ -337,27 +337,27 @@ dist-hook:
EXTRA_DIST = discovery.xml \
favicon.ico \
- loolkitconfig.xcu \
- loolwsd.init.rhel6 \
- loolwsd.spec \
- loolwsd.xml.in \
- loolwsd.service \
- sysconfig.loolwsd \
+ coolkitconfig.xcu \
+ coolwsd.init.rhel6 \
+ coolwsd.spec \
+ coolwsd.xml.in \
+ coolwsd.service \
+ sysconfig.coolwsd \
debian/compat \
debian/copyright \
- debian/loolwsd.preinst \
- debian/loolwsd.service \
+ debian/coolwsd.preinst \
+ debian/coolwsd.service \
debian/rules \
debian/source/format \
debian/changelog \
debian/control \
- debian/loolwsd.postinst \
- debian/loolwsd.postrm \
+ debian/coolwsd.postinst \
+ debian/coolwsd.postrm \
etc/key.pem \
etc/cert.pem \
etc/ca-chain.cert.pem \
- etc/apache2/loolwsd.conf \
- etc/nginx/loolwsd.conf \
+ etc/apache2/coolwsd.conf \
+ etc/nginx/coolwsd.conf \
scripts/unocommands.py \
scripts/refresh-git-hooks \
README.md \
@@ -366,7 +366,7 @@ EXTRA_DIST = discovery.xml \
if ENABLE_LIBFUZZER
CLEANUP_COMMAND=true
else
-# Use loolwsd to cleanup jails, if any. If it fails, we may have a broken/old loolwsd binary, remove it to rebuild.
+# Use coolwsd to cleanup jails, if any. If it fails, we may have a broken/old coolwsd binary, remove it to rebuild.
# A CI box may switch branches without cleaning up the binaries, if coolwsd from a broken branch is used here
# it will fail all subsequent builds, until it's rebuilt from the new branch. So removing coolwsd after failing is needed.
CLEANUP_COMMAND=if test -s ./coolwsd; then echo "Cleaning up..." && ./coolwsd --disable-cool-user-checking --cleanup --o:logging.level=trace || rm ./coolwsd; fi
@@ -390,7 +390,7 @@ else
CLEANUP_DEPS=coolwsd coolmount coolforkit
endif
-# Build loolwsd and coolmount first, so we can cleanup before updating
+# Build coolwsd and coolmount first, so we can cleanup before updating
# the systemplate directory, which we can't rm if it's mounted.
$(SYSTEM_STAMP): ${top_srcdir}/coolwsd-systemplate-setup $(CLEANUP_DEPS)
$(SET_CAPS_COMMAND)
@@ -416,15 +416,15 @@ clean-local:
rm -rf "${top_srcdir}/loleaflet"
if ENABLE_DEBUG
-# can write to /tmp/loolwsd.log
+# can write to /tmp/coolwsd.log
OUTPUT_TO_FILE=true
else
-# can't write to /var/log/loolwsd.log
+# can't write to /var/log/coolwsd.log
OUTPUT_TO_FILE=false
endif
setup-wsd: all @JAILS_PATH@
- @echo "Launching loolwsd"
+ @echo "Launching coolwsd"
@fc-cache "@LO_PATH@"/share/fonts/truetype
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
@@ -476,7 +476,7 @@ run-trace: setup-wsd
--o:trace.outgoing.record=false
run-valgrind: setup-wsd
- @echo "Launching coolwsd under valgrind (but not forkit/loolkit, yet)"
+ @echo "Launching coolwsd under valgrind (but not forkit/coolkit, yet)"
valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \
./coolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
diff --git a/PROBLEMS b/PROBLEMS
index cfe2a01b72..7038df033e 100644
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -39,7 +39,7 @@
removed from the Kit/ChildSession.cppp as/when we move to a single
threaded Kit process.
-- Occasionally Control-C (SIGINT) doesn't shut down loolwsd. One has
+- Occasionally Control-C (SIGINT) doesn't shut down coolwsd. One has
to kill it with SIGKILL. Which of course leaves all the chroot jails
around.
diff --git a/android/app/appSettings.gradle.in b/android/app/appSettings.gradle.in
index fc309dabc1..840364d9a2 100644
--- a/android/app/appSettings.gradle.in
+++ b/android/app/appSettings.gradle.in
@@ -5,12 +5,12 @@ ext {
liboLauncherIcon = '@mipmap/@APP_IC_LAUNCHER@'
liboHasBranding = '@APP_HAS_BRANDING@'
liboBrandingDir = '@APP_BRANDING_DIR@'
- liboOVersionHash = '@LOOLWSD_VERSION_HASH@'
+ liboOVersionHash = '@COOLWSD_VERSION_HASH@'
liboCoreVersionHash = '@CORE_VERSION_HASH@'
}
android.defaultConfig {
applicationId '@ANDROID_PACKAGE_NAME@'
versionCode @ANDROID_PACKAGE_VERSIONCODE@
- versionName '@LOOLWSD_VERSION@'
+ versionName '@COOLWSD_VERSION@'
}
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
index 7ebb4ddae6..e7df04e139 100644
--- a/android/app/proguard-rules.pro
+++ b/android/app/proguard-rules.pro
@@ -12,7 +12,7 @@
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
--keepclassmembers class LOOLMessageHandler {
+-keepclassmembers class COOLMessageHandler {
public *;
}
diff --git a/android/lib/build.gradle.in b/android/lib/build.gradle.in
index e18eb64ee5..4520529e9a 100644
--- a/android/lib/build.gradle.in
+++ b/android/lib/build.gradle.in
@@ -93,9 +93,9 @@ task copyUnpackAssets(type: Copy) {
includes = ['**']
}
}
- into('etc/loolwsd') {
- from('/android/loolkitconfig.xcu')
- includes = [ 'loolkitconfig.xcu' ]
+ into('etc/coolwsd') {
+ from('/android/coolkitconfig.xcu')
+ includes = [ 'coolkitconfig.xcu' ]
}
into('user/fonts') {
from "${liboInstdir}/share/fonts/truetype"
@@ -189,9 +189,9 @@ task copyDocTemplates(type: Copy) {
}
task copyKitConfig(type: Copy) {
- from "${file(rootProject.getRootDir()).getParent()}/loolkitconfig-mobile.xcu"
- into "src/main/assets/etc/loolwsd"
- rename { "loolkitconfig.xcu" }
+ from "${file(rootProject.getRootDir()).getParent()}/coolkitconfig-mobile.xcu"
+ into "src/main/assets/etc/coolwsd"
+ rename { "coolkitconfig.xcu" }
}
task createStrippedConfig {
diff --git a/android/lib/libSettings.gradle.in b/android/lib/libSettings.gradle.in
index 391fcf8295..beaf2d4d29 100644
--- a/android/lib/libSettings.gradle.in
+++ b/android/lib/libSettings.gradle.in
@@ -3,9 +3,9 @@ ext {
liboSrcRoot = '@LOBUILDDIR@'
liboInstdir = '@LOBUILDDIR@/instdir'
liboExampleDocument = '@LOBUILDDIR@/android/default-document/example.odt'
- liboVersionMajor = '@LOOLWSD_VERSION_MAJOR@'
- liboVersionMinor = '@LOOLWSD_VERSION_MAJOR@'
- liboOVersionHash = '@LOOLWSD_VERSION_HASH@'
+ liboVersionMajor = '@COOLWSD_VERSION_MAJOR@'
+ liboVersionMinor = '@COOLWSD_VERSION_MAJOR@'
+ liboOVersionHash = '@COOLWSD_VERSION_HASH@'
liboCoreVersionHash = '@CORE_VERSION_HASH@'
liboApplicationId = '@ANDROID_PACKAGE_NAME@'
liboBrandingDir = '@APP_BRANDING_DIR@'
diff --git a/android/lib/src/main/cpp/CMakeLists.txt.in b/android/lib/src/main/cpp/CMakeLists.txt.in
index 410fc8399d..b2255643f9 100644
--- a/android/lib/src/main/cpp/CMakeLists.txt.in
+++ b/android/lib/src/main/cpp/CMakeLists.txt.in
@@ -24,12 +24,12 @@ add_library(androidapp SHARED
../../../../../net/Socket.cpp
../../../../../wsd/ClientSession.cpp
../../../../../wsd/DocumentBroker.cpp
- ../../../../../wsd/LOOLWSD.cpp
+ ../../../../../wsd/COOLWSD.cpp
../../../../../wsd/RequestDetails.cpp
../../../../../wsd/Storage.cpp
../../../../../wsd/TileCache.cpp)
-target_compile_definitions(androidapp PRIVATE LOOLWSD_CONFIGDIR="/assets/etc/loolwsd")
+target_compile_definitions(androidapp PRIVATE COOLWSD_CONFIGDIR="/assets/etc/coolwsd")
# According to the ABI, we need to use different source trees
if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
@@ -58,7 +58,7 @@ target_include_directories(androidapp PRIVATE
. # path to androidapp.h
@abs_top_builddir@ # path to config.h
@abs_top_srcdir@
- ../../../../../common # the needed loolwsd includes
+ ../../../../../common # the needed coolwsd includes
../../../../../kit
../../../../../net
../../../../../wsd
diff --git a/android/lib/src/main/cpp/androidapp.cpp b/android/lib/src/main/cpp/androidapp.cpp
index 21c997529f..335ec7eb8d 100644
--- a/android/lib/src/main/cpp/androidapp.cpp
+++ b/android/lib/src/main/cpp/androidapp.cpp
@@ -15,7 +15,7 @@
#include <FakeSocket.hpp>
#include <Kit.hpp>
#include <Log.hpp>
-#include <LOOLWSD.hpp>
+#include <COOLWSD.hpp>
#include <Protocol.hpp>
#include <SetupKitEnvironment.hpp>
#include <Util.hpp>
@@ -26,7 +26,7 @@
const int SHOW_JS_MAXLEN = 70;
-int loolwsd_server_socket_fd = -1;
+int coolwsd_server_socket_fd = -1;
const char* user_name;
@@ -97,7 +97,7 @@ public:
static void send2JS(const JNIThreadContext &jctx, const std::vector<char>& buffer)
{
- LOG_DBG("Send to JS: " << LOOLProtocol::getAbbreviatedMessage(buffer.data(), buffer.size()));
+ LOG_DBG("Send to JS: " << COOLProtocol::getAbbreviatedMessage(buffer.data(), buffer.size()));
std::string js;
@@ -183,9 +183,9 @@ void closeDocument()
// Close one end of the socket pair, that will wake up the forwarding thread that was constructed in HULLO
fakeSocketClose(closeNotificationPipeForForwardingThread[0]);
- LOG_DBG("Waiting for LOOLWSD to finish...");
- std::unique_lock<std::mutex> lock(LOOLWSD::lokit_main_mutex);
- LOG_DBG("LOOLWSD has finished.");
+ LOG_DBG("Waiting for COOLWSD to finish...");
+ std::unique_lock<std::mutex> lock(COOLWSD::lokit_main_mutex);
+ LOG_DBG("COOLWSD has finished.");
}
/// Handle a message from JavaScript.
@@ -206,11 +206,11 @@ Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env,
{
// Now we know that the JS has started completely
- // Contact the permanently (during app lifetime) listening LOOLWSD server
+ // Contact the permanently (during app lifetime) listening COOLWSD server
// "public" socket
- assert(loolwsd_server_socket_fd != -1);
+ assert(coolwsd_server_socket_fd != -1);
- int rc = fakeSocketConnect(currentFakeClientFd, loolwsd_server_socket_fd);
+ int rc = fakeSocketConnect(currentFakeClientFd, coolwsd_server_socket_fd);
assert(rc != -1);
// Create a socket pair to notify the below thread when the document has been closed
@@ -267,7 +267,7 @@ Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env,
// WebSocket.
LOG_DBG("Actually sending to Online:" << fileURL);
- // Send the document URL to LOOLWSD to setup the docBroker URL
+ // Send the document URL to COOLWSD to setup the docBroker URL
struct pollfd pollfd;
pollfd.fd = currentFakeClientFd;
pollfd.events = POLLOUT;
@@ -282,7 +282,7 @@ Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env,
}
else
{
- // Send the message to LOOLWSD
+ // Send the message to COOLWSD
char *string_copy = strdup(string_value);
struct pollfd pollfd;
@@ -300,9 +300,9 @@ Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env,
extern "C" jboolean libreofficekit_initialize(JNIEnv* env, jstring dataDir, jstring cacheDir, jstring apkFile, jobject assetManager);
-/// Create the LOOLWSD instance.
+/// Create the COOLWSD instance.
extern "C" JNIEXPORT void JNICALL
-Java_org_libreoffice_androidlib_LOActivity_createLOOLWSD(JNIEnv *env, jobject instance, jstring dataDir, jstring cacheDir, jstring apkFile, jobject assetManager, jstring loadFileURL, jstring uiMode, jstring userName)
+Java_org_libreoffice_androidlib_LOActivity_createCOOLWSD(JNIEnv *env, jobject instance, jstring dataDir, jstring cacheDir, jstring apkFile, jobject assetManager, jstring loadFileURL, jstring uiMode, jstring userName)
{
fileURL = std::string(env->GetStringUTFChars(loadFileURL, nullptr));
@@ -343,14 +343,14 @@ Java_org_libreoffice_androidlib_LOActivity_createLOOLWSD(JNIEnv *env, jobject in
Util::setThreadName("app");
while (true)
{
- LOG_DBG("Creating LOOLWSD");
+ LOG_DBG("Creating COOLWSD");
{
fakeClientFd = fakeSocketSocket();
- LOG_DBG("createLOOLWSD created fakeClientFd: " << fakeClientFd);
- std::unique_ptr<LOOLWSD> loolwsd(new LOOLWSD());
- loolwsd->run(1, argv);
+ LOG_DBG("createCOOLWSD created fakeClientFd: " << fakeClientFd);
+ std::unique_ptr<COOLWSD> coolwsd(new COOLWSD());
+ coolwsd->run(1, argv);
}
- LOG_DBG("One run of LOOLWSD completed");
+ LOG_DBG("One run of COOLWSD completed");
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}).detach();
diff --git a/android/lib/src/main/cpp/androidapp.hpp b/android/lib/src/main/cpp/androidapp.hpp
index 06cecf828f..e7f79aa771 100644
--- a/android/lib/src/main/cpp/androidapp.hpp
+++ b/android/lib/src/main/cpp/androidapp.hpp
@@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-extern int loolwsd_server_socket_fd;
+extern int coolwsd_server_socket_fd;
extern const char* user_name;
diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 695c8be8d9..6aae9a3844 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -93,7 +93,7 @@ public class LOActivity extends AppCompatActivity {
private static final String KEY_IS_EDITABLE = "isEditable";
private static final String KEY_INTENT_URI = "intentUri";
private static final String CLIPBOARD_FILE_PATH = "LibreofficeClipboardFile.data";
- private static final String CLIPBOARD_LOOL_SIGNATURE = "cool-clip-magic-4a22437e49a8-";
+ private static final String CLIPBOARD_COOL_SIGNATURE = "cool-clip-magic-4a22437e49a8-";
public static final String RECENT_DOCUMENTS_KEY = "RECENT_DOCUMENTS_LIST";
private static String USER_NAME_KEY = "USER_NAME";
@@ -343,7 +343,7 @@ public class LOActivity extends AppCompatActivity {
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
- mWebView.addJavascriptInterface(this, "LOOLMessageHandler");
+ mWebView.addJavascriptInterface(this, "COOLMessageHandler");
// allow debugging (when building the debug version); see details in
// https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
@@ -812,7 +812,7 @@ public class LOActivity extends AppCompatActivity {
private void loadDocument() {
mProgressDialog.determinate(R.string.loading);
- // setup the LOOLWSD
+ // setup the COOLWSD
ApplicationInfo applicationInfo = getApplicationInfo();
String dataDir = applicationInfo.dataDir;
Log.i(TAG, String.format("Initializing LibreOfficeKit, dataDir=%s\n", dataDir));
@@ -822,7 +822,7 @@ public class LOActivity extends AppCompatActivity {
AssetManager assetManager = getResources().getAssets();
String uiMode = (isLargeScreen() && !isChromeOS()) ? "notebookbar" : "classic";
String userName = getPrefs().getString(USER_NAME_KEY, "Guest User");
- createLOOLWSD(dataDir, cacheDir, apkFile, assetManager, urlToLoad, uiMode, userName);
+ createCOOLWSD(dataDir, cacheDir, apkFile, assetManager, urlToLoad, uiMode, userName);
// trigger the load of the document
String finalUrlToLoad = "file:///android_asset/dist/cool.html?file_path=" +
@@ -871,9 +871,9 @@ public class LOActivity extends AppCompatActivity {
}
/**
- * Initialize the LOOLWSD to load 'loadFileURL'.
+ * Initialize the COOLWSD to load 'loadFileURL'.
*/
- public native void createLOOLWSD(String dataDir, String cacheDir, String apkFile, AssetManager assetManager, String loadFileURL, String uiMode, String userName);
+ public native void createCOOLWSD(String dataDir, String cacheDir, String apkFile, AssetManager assetManager, String loadFileURL, String uiMode, String userName);
/**
* Passing messages from JS (instead of the websocket communication).
@@ -1278,7 +1278,7 @@ public class LOActivity extends AppCompatActivity {
/// Returns a magic that specifies this application - and this document.
private final String getClipboardMagic() {
- return CLIPBOARD_LOOL_SIGNATURE + Long.toString(loadDocumentMillis);
+ return CLIPBOARD_COOL_SIGNATURE + Long.toString(loadDocumentMillis);
}
/// Needs to be executed after the .uno:Copy / Paste has executed
@@ -1336,7 +1336,7 @@ public class LOActivity extends AppCompatActivity {
if (clipDesc.getMimeType(i).equals(ClipDescription.MIMETYPE_TEXT_HTML)) {
final String html = clipData.getItemAt(i).getHtmlText();
// Check if the clipboard content was made with the app
- if (html.contains(CLIPBOARD_LOOL_SIGNATURE)) {
+ if (html.contains(CLIPBOARD_COOL_SIGNATURE)) {
// Check if the clipboard content is from the same app instance
if (html.contains(getClipboardMagic())) {
Log.i(TAG, "clipboard comes from us - same instance: short circuit it " + html);
diff --git a/browser/Makefile.am b/browser/Makefile.am
index e1275d92b0..9e37dace2d 100644
--- a/browser/Makefile.am
+++ b/browser/Makefile.am
@@ -740,7 +740,7 @@ check-local: $(MOCHA_TS_JS_FILES)
@echo "Running mocha tests..."
@$(NODE) node_modules/mocha/bin/mocha "$(srcdir)/mocha_tests/**/*.js"
-SSL_FLAG = `xmllint --xpath 'string(/config/ssl/enable)' $(abs_top_builddir)/loolwsd.xml`
+SSL_FLAG = `xmllint --xpath 'string(/config/ssl/enable)' $(abs_top_builddir)/coolwsd.xml`
# the delay (in miliseconds) between each emulated key stroke for each view
typing_speed=100
diff --git a/browser/README b/browser/README
index cf0c535db5..e9f2a6fe8b 100644
--- a/browser/README
+++ b/browser/README
@@ -75,23 +75,23 @@ Running
To see an example:
-* run loolwsd, like:
+* run coolwsd, like:
- ./loolwsd --o:sys_template_path=${SYSTEMPLATE} --o:child_root_path=${ROOTFORJAILS}
+ ./coolwsd --o:sys_template_path=${SYSTEMPLATE} --o:child_root_path=${ROOTFORJAILS}
-Note that this will, by default, set the loolwsd's file server's root to the parent directory of loolwsd,
+Note that this will, by default, set the coolwsd's file server's root to the parent directory of coolwsd,
which means you can access all the files in browser using /browser/ path. It is advised to set
file_server_root_path manually for more control. See wsd/README for more information.
-* open dist/cool.html through loolwsd's fileserver
+* open dist/cool.html through coolwsd's fileserver
https://localhost:9980/browser/dist/cool.html?file_path=file:///PATH/TO_DOC&host=wss://localhost:9980
and you should see the document in the browser.
Note that accessing local storage is disabled by default for security reasons. You need to explicitly enable it
-with the --o:storage.filesystem[@allow]=true option of loolwsd. In case anything goes wrong, check the loolwsd console for
+with the --o:storage.filesystem[@allow]=true option of coolwsd. In case anything goes wrong, check the coolwsd console for
the debugging output. You might be asked to confirm the certificate if you are using self-signed certificate
-for loolwsd.
+for coolwsd.
Development
-----------
@@ -105,7 +105,7 @@ Remember to add '--enable-browsersync' argument for './configure' script and del
Run server and start browser-sync:
-LOOL_SERVE_FROM_FS=1 make run
+COOL_SERVE_FROM_FS=1 make run
and in the second terminal:
@@ -119,16 +119,16 @@ browser-sync start --config browsersync-config.js --startPath "browser/96c23f663
Admin Panel
-----------
-You can do live monitoring of all the user sessions running on loolwsd instance. To access the admin
-console you need to ask for admin.html file from loolwsd which resides in dist/admin/admin.html.
+You can do live monitoring of all the user sessions running on coolwsd instance. To access the admin
+console you need to ask for admin.html file from coolwsd which resides in dist/admin/admin.html.
For example:
https://localhost:9980/browser/dist/admin/admin.html
-It will ask for username and password which is set by the admin_console options of loolwsd. For example you can
+It will ask for username and password which is set by the admin_console options of coolwsd. For example you can
pass --o:admin_console.username=admin --o:admin_console.password=admin in command line, or set these values in
-loolwsd.xml. After entering the correct password you should be able to monitor the live documents opened, total
+coolwsd.xml. After entering the correct password you should be able to monitor the live documents opened, total
users, memory consumption, document URLs with number of users viewing that document etc. You can also kill the
documents directly from the panel which would result in closing the socket connection to the respective document.
diff --git a/browser/admin/adminSettings.html b/browser/admin/adminSettings.html
index 55ea4d2654..5fc74b6f85 100644
--- a/browser/admin/adminSettings.html
+++ b/browser/admin/adminSettings.html
@@ -123,8 +123,8 @@
<div class="section">
<h4><script>document.write(l10nstrings.strVersionInfo)</script></h4>
<p>
- <h5><b>LOOLWSD</b></h5>
- <div id="loolwsd-version"></div>
+ <h5><b>COOLWSD</b></h5>
+ <div id="coolwsd-version"></div>
</p>
<p>
<h5><b>LOKit</b></h5>
diff --git a/browser/admin/src/AdminSocketSettings.js b/browser/admin/src/AdminSocketSettings.js
index 61647c4429..cebf32eb07 100644
--- a/browser/admin/src/AdminSocketSettings.js
+++ b/browser/admin/src/AdminSocketSettings.js
@@ -76,14 +76,14 @@ var AdminSocketSettings = AdminSocketBase.extend({
}
else if (textMsg.startsWith('coolserver ')) {
// This must be the first message, unless we reconnect.
- var loolwsdVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
- var h = loolwsdVersionObj.Hash;
+ var coolwsdVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
+ var h = coolwsdVersionObj.Hash;
if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) {
h = '<a target="_blank" href="https://github.com/CollaboraOnline/online/commits/' + h + '">' + h + '</a>';
- $('#loolwsd-version').html(loolwsdVersionObj.Version + ' (git hash: ' + h + ')');
+ $('#coolwsd-version').html(coolwsdVersionObj.Version + ' (git hash: ' + h + ')');
}
else {
- $('#loolwsd-version').text(loolwsdVersionObj.Version);
+ $('#coolwsd-version').text(coolwsdVersionObj.Version);
}
}
else if (textMsg.startsWith('lokitversion ')) {
diff --git a/browser/archived-packages/vex-js-4.1.0-9ff760927.tar b/browser/archived-packages/vex-js-4.1.0-9ff760927.tar
index f3b499dbf6..34adfebe29 100644
--- a/browser/archived-packages/vex-js-4.1.0-9ff760927.tar
+++ b/browser/archived-packages/vex-js-4.1.0-9ff760927.tar
Binary files differ
diff --git a/browser/cool-api.html b/browser/cool-api.html
index dfed373b7a..23f75b4273 100644
--- a/browser/cool-api.html
+++ b/browser/cool-api.html
@@ -103,14 +103,14 @@ unexpected behaviour.</h5>
<td><code><b>server</b></code></td>
<td><code>String</code></td>
<td><code><span class="literal">undefined</span></code></td>
- <td>The websocket server hosting loolwsd using the <code>ws:</code> protocol.
+ <td>The websocket server hosting coolwsd using the <code>ws:</code> protocol.
Example: wss://localhost:9980</td>
</tr>
<tr>
<td><code><b>webserver</b></code></td>
<td><code>String</code></td>
<td><code><span class="literal">undefined</span></code></td>
- <td>The webserver access to hosting loolwsd. Normally it is
+ <td>The webserver access to hosting coolwsd. Normally it is
derived from 'server', but can be overridden with an own
value in case of proxying. Example: http://localhost:9980</td>
</tr>
diff --git a/browser/html/cool.html.m4 b/browser/html/cool.html.m4
index 09ec4f2d2b..da49060f66 100644
--- a/browser/html/cool.html.m4
+++ b/browser/html/cool.html.m4
@@ -66,9 +66,9 @@ m4_ifelse(GTKAPP,[true],
)
m4_ifelse(ANDROIDAPP,[true],
[ window.ThisIsTheAndroidApp = true;
- window.postMobileMessage = function(msg) { window.LOOLMessageHandler.postMobileMessage(msg); };
- window.postMobileError = function(msg) { window.LOOLMessageHandler.postMobileError(msg); };
- window.postMobileDebug = function(msg) { window.LOOLMessageHandler.postMobileDebug(msg); };],
+ window.postMobileMessage = function(msg) { window.COOLMessageHandler.postMobileMessage(msg); };
+ window.postMobileError = function(msg) { window.COOLMessageHandler.postMobileError(msg); };
+ window.postMobileDebug = function(msg) { window.COOLMessageHandler.postMobileDebug(msg); };],
[ window.ThisIsTheAndroidApp = false;]
)
@@ -252,9 +252,9 @@ m4_ifelse(MOBILEAPP,[true],
</div>
<div id="about-dialog-info-container">
<div id="about-dialog-info">
- <div> LOOLWSD version:</div>
- <div id="loolwsd-version"></div>
- <div id="loolwsd-id" style="visibility: hidden;"></div>
+ <div> COOLWSD version:</div>
+ <div id="coolwsd-version"></div>
+ <div id="coolwsd-id" style="visibility: hidden;"></div>
<div>LOKit version:</div>
<div id="lokit-version"></div>
m4_ifelse(MOBILEAPP,[],[<div id="os-info"></div>],[<p></p>])
diff --git a/browser/html/framed.doc.html b/browser/html/framed.doc.html
index db69aadc68..fa1feb7e0f 100644
--- a/browser/html/framed.doc.html
+++ b/browser/html/framed.doc.html
@@ -193,7 +193,7 @@
<h3>Document frame</h3>
<h4>If the frame fails to load click <a id="link">here and accept security bits</a></h4>
- <h4>If the frame still fails to load ensure you have <code>localhost:*</code> included in your <code>net.frame_ancestors</code> in loolwsd.xml</h4>
+ <h4>If the frame still fails to load ensure you have <code>localhost:*</code> included in your <code>net.frame_ancestors</code> in coolwsd.xml</h4>
<iframe id="frame" height="1000" width="1000"></iframe>
<script>
diff --git a/browser/js/global.js b/browser/js/global.js
index e75af025f2..d75c375e74 100644
--- a/browser/js/global.js
+++ b/browser/js/global.js
@@ -128,7 +128,7 @@ window.app = { // Shouldn't have any functions defined.
gecko3d = 'MozPerspective' in doc.style,
opera12 = 'OTransition' in doc.style;
- var chromebook = window.ThisIsTheAndroidApp && window.LOOLMessageHandler.isChromeOS();
+ var chromebook = window.ThisIsTheAndroidApp && window.COOLMessageHandler.isChromeOS();
var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||
(window.DocumentTouch && document instanceof window.DocumentTouch)) && !chromebook;
diff --git a/browser/src/control/Toolbar.js b/browser/src/control/Toolbar.js
index 321beae14f..c4983e038e 100644
--- a/browser/src/control/Toolbar.js
+++ b/browser/src/control/Toolbar.js
@@ -725,9 +725,9 @@ L.Map.include({
map._docLayer.toggleTileDebugMode();
} else if (event.key === 'l') {
// L toggges the Online logging level between the default (whatever
- // is set in loolwsd.xml or on the loolwsd command line) and the
+ // is set in coolwsd.xml or on the coolwsd command line) and the
// most verbose a client is allowed to set (which also can be set in
- // loolwsd.xml or on the loolwsd command line).
+ // coolwsd.xml or on the coolwsd command line).
//
// In a typical developer "make run" setup, the default is "trace"
// so there is nothing more verbose. But presumably it is different
@@ -741,18 +741,18 @@ L.Map.include({
var logLevelInformation = newLogLevel;
if (newLogLevel === 'default')
- logLevelInformation = 'default (from loolwsd.xml)';
+ logLevelInformation = 'default (from coolwsd.xml)';
else if (newLogLevel === 'verbose')
- logLevelInformation = 'most verbose (from loolwsd.xml)';
+ logLevelInformation = 'most verbose (from coolwsd.xml)';
else if (newLogLevel === 'terse')
- logLevelInformation = 'least verbose (from loolwsd.xml)';
+ logLevelInformation = 'least verbose (from coolwsd.xml)';
else
logLevelInformation = newLogLevel;
$(app.ExpertlyTrickForLOAbout.contentEl).find('#log-level-state').html('Log level: ' + logLevelInformation);
} else if (event.key === 't') {
// T turns Trace Event recording on in the Kit process
- // for this document, as long as loolwsd is running with the
+ // for this document, as long as coolwsd is running with the
// trace_event[@enable] config option as true. T again
// turns it off.
@@ -768,7 +768,7 @@ L.Map.include({
// as directed by the SAL_LOG environment variable, and
// 2) all warnings on plus SAL_INFO for sc.
//
- // (Note that loolwsd sets the SAL_LOG environment variable
+ // (Note that coolwsd sets the SAL_LOG environment variable
// to "-WARN-INFO", i.e. the default is that nothing is
// logged from core.)
diff --git a/browser/src/core/Socket.js b/browser/src/core/Socket.js
index e56a344fd0..a773668820 100644
--- a/browser/src/core/Socket.js
+++ b/browser/src/core/Socket.js
@@ -504,15 +504,15 @@ app.definitions.Socket = L.Class.extend({
var h = this.WSDServer.Hash;
if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) {
h = '<a href="javascript:void(window.open(\'https://github.com/CollaboraOnline/online/commits/' + h + '\'));">' + h + '</a>';
- $('#loolwsd-version').html(this.WSDServer.Version + ' (git hash: ' + h + ')');
+ $('#coolwsd-version').html(this.WSDServer.Version + ' (git hash: ' + h + ')');
}
else {
- $('#loolwsd-version').text(this.WSDServer.Version);
+ $('#coolwsd-version').text(this.WSDServer.Version);
}
if (!window.ThisIsAMobileApp) {
var idUri = window.makeHttpUrl('/hosting/discovery');
- $('#loolwsd-id').html(_('Served by:') + ' <a target="_blank" href="' + idUri + '">' + this.WSDServer.Id + '</a>');
+ $('#coolwsd-id').html(_('Served by:') + ' <a target="_blank" href="' + idUri + '">' + this.WSDServer.Id + '</a>');
}
// TODO: For now we expect perfect match in protocol versions
diff --git a/browser/src/layer/BackgroundColor.js b/browser/src/layer/BackgroundColor.js
index 3029657c81..f707d625ff 100644
--- a/browser/src/layer/BackgroundColor.js
+++ b/browser/src/layer/BackgroundColor.js
@@ -43,7 +43,7 @@ L.BackgroundColor = L.Layer.extend({
/*
* A L.BackgroundColor that automatically resets its color
- * based on 'statechange' messages from loolwsd.
+ * based on 'statechange' messages from coolwsd.
*/
L.CalcBackground = L.BackgroundColor.extend({
onAdd: function(map) {
diff --git a/browser/src/layer/marker/TextInput.js b/browser/src/layer/marker/TextInput.js
index 8b2efa9622..b73f02f93c 100644
--- a/browser/src/layer/marker/TextInput.js
+++ b/browser/src/layer/marker/TextInput.js
@@ -676,7 +676,7 @@ L.TextInput = L.Layer.extend({
this._emptyArea();
},
- // Sends the given (UTF-8) string of text to loolwsd, as IME (text composition)
+ // Sends the given (UTF-8) string of text to coolwsd, as IME (text composition)
// messages
_sendText: function(text) {
if (false) {
@@ -689,7 +689,7 @@ L.TextInput = L.Layer.extend({
s = s + ']';
console.log('L.TextInput._sendText: ' + s);
}
- this._fancyLog('send-text-to-loolwsd', text);
+ this._fancyLog('send-text-to-coolwsd', text);
// MSIE/Edge cannot compare a string to "\n" for whatever reason,
// so compare charcode as well
@@ -825,7 +825,7 @@ L.TextInput = L.Layer.extend({
_removeTextContent: function(before, after) {
console.log('Remove ' + before + ' before, and ' + after + ' after');
- /// TODO: rename the event to 'removetextcontent' as soon as loolwsd supports it
+ /// TODO: rename the event to 'removetextcontent' as soon as coolwsd supports it
/// TODO: Ask Marco about it
app.socket.sendMessage(
'removetextcontext id=' +
diff --git a/browser/src/layer/tile/CanvasTileLayer.js b/browser/src/layer/tile/CanvasTileLayer.js
index 48d636d983..70f8abcc84 100644
--- a/browser/src/layer/tile/CanvasTileLayer.js
+++ b/browser/src/layer/tile/CanvasTileLayer.js
@@ -1720,7 +1720,7 @@ L.CanvasTileLayer = L.Layer.extend({
_onCellAddressMsg: function (textMsg) {
// When the user moves the focus to a different cell, a 'cellformula'
- // message is received from loolwsd, *then* a 'celladdress' message.
+ // message is received from coolwsd, *then* a 'celladdress' message.
var address = textMsg.substring(13);
if (this._map._clip && !this._map['wopi'].DisableCopy) {
this._map._clip.setTextSelectionText(this._lastFormula);
@@ -1729,10 +1729,10 @@ L.CanvasTileLayer = L.Layer.extend({
},
_onCellFormulaMsg: function (textMsg) {
- // When a 'cellformula' message from loolwsd is received,
+ // When a 'cellformula' message from coolwsd is received,
// store the text contents of the cell, but don't push
// them to the clipboard container (yet).
- // This is done because loolwsd will send several 'cellformula'
+ // This is done because coolwsd will send several 'cellformula'
// messages during text composition, and resetting the contents
// of the clipboard container mid-composition will easily break it.
var formula = textMsg.substring(13);
@@ -3244,14 +3244,14 @@ L.CanvasTileLayer = L.Layer.extend({
}
},
- // Given a character code and a UNO keycode, send a "key" message to loolwsd.
+ // Given a character code and a UNO keycode, send a "key" message to coolwsd.
//
// "type" is either "input" for key presses (akin to the DOM "keypress"
// / "beforeinput" events) and "up" for key releases (akin to the DOM
// "keyup" event).
//
// PageUp/PageDown and select column & row are handled as special cases for spreadsheets - in
- // addition of sending messages to loolwsd, they move the cell cursor around.
+ // addition of sending messages to coolwsd, they move the cell cursor around.
postKeyboardEvent: function(type, charCode, unoKeyCode) {
if (!this._map._docLoaded)
return;
diff --git a/browser/src/map/handler/Map.Keyboard.js b/browser/src/map/handler/Map.Keyboard.js
index 29deeaf431..1e0773f2de 100644
--- a/browser/src/map/handler/Map.Keyboard.js
+++ b/browser/src/map/handler/Map.Keyboard.js
@@ -269,7 +269,7 @@ L.Map.Keyboard = L.Handler.extend({
},
// _handleKeyEvent - checks if the given keyboard event shall trigger
- // a message to loolwsd, and calls the given keyEventFn(type, charcode, keycode)
+ // a message to coolwsd, and calls the given keyEventFn(type, charcode, keycode)
// callback if so.
// Called from _onKeyDown
_handleKeyEvent: function (ev, keyEventFn) {
@@ -449,7 +449,7 @@ L.Map.Keyboard = L.Handler.extend({
},
// Given a DOM keyboard event that happened while the Control key was depressed,
- // triggers the appropriate action or loolwsd message.
+ // triggers the appropriate action or coolwsd message.
_handleCtrlCommand: function (e) {
if (this._map.uiManager.isUIBlocked())
return;
diff --git a/browser/test/bootstrap.js b/browser/test/bootstrap.js
index 1aeacf017b..0ac8cc9685 100644
--- a/browser/test/bootstrap.js
+++ b/browser/test/bootstrap.js
@@ -33,18 +33,18 @@ let ssl_args = [
if (ssl_flag === 'true')
args = [...args, ...ssl_args];
-const loolwsd = spawn(`${top_builddir}/loolwsd`, args);
+const coolwsd = spawn(`${top_builddir}/coolwsd`, args);
/*
-loolwsd.stdout.on('data', (data) => {
+coolwsd.stdout.on('data', (data) => {
//console.log(`stdout: ${data}`);
});
-loolwsd.stderr.on('data', (data) => {
+coolwsd.stderr.on('data', (data) => {
//console.error(`stderr: ${data}`);
});
*/
-loolwsd.on('exit', (code) => {
- console.log(`loolwsd process exited with code ${code}`);
+coolwsd.on('exit', (code) => {
+ console.log(`coolwsd process exited with code ${code}`);
});
let childNodes = [];
@@ -66,7 +66,7 @@ if(single_view !== "true") {
function vacuumCleaner(kill, message, code) {
console.log(message);
childNodes.forEach(n => n.kill(kill));
- loolwsd.kill(kill);
+ coolwsd.kill(kill);
console.log(`Process exited with code ${code}`);
}
diff --git a/common/Common.hpp b/common/Common.hpp
index 3e3304ca3d..4eb5cf75cf 100644
--- a/common/Common.hpp
+++ b/common/Common.hpp
@@ -42,10 +42,10 @@ constexpr long READ_BUFFER_SIZE = 64 * 1024;
constexpr int MAX_MESSAGE_SIZE = 2 * 1024 * READ_BUFFER_SIZE;
constexpr const char JAILED_DOCUMENT_ROOT[] = "/tmp/user/docs/";
-constexpr const char CHILD_URI[] = "/loolws/child?";
-constexpr const char NEW_CHILD_URI[] = "/loolws/newchild";
+constexpr const char CHILD_URI[] = "/coolws/child?";
+constexpr const char NEW_CHILD_URI[] = "/coolws/newchild";
constexpr const char LO_JAIL_SUBPATH[] = "lo";
-constexpr const char FORKIT_URI[] = "/loolws/forkit";
+constexpr const char FORKIT_URI[] = "/coolws/forkit";
constexpr const char CAPABILITIES_END_POINT[] = "/hosting/capabilities";
@@ -56,7 +56,7 @@ constexpr const char UPLOADING_SUFFIX[] = "ing";
/// A shared threadname suffix in both the WSD and Kit processes
/// is highly helpful for filtering the logs for the same document
-/// by simply grepping for this shared suffix+ID. e.g. 'grep "broker_123" loolwsd.log'
+/// by simply grepping for this shared suffix+ID. e.g. 'grep "broker_123" coolwsd.log'
/// Unfortunately grepping for only "_123" would include more noise than desirable.
/// This also makes the threadname symmetric and the entries aligned.
/// The choice of "broker" as the suffix is historic: it implies the controller
@@ -69,15 +69,15 @@ constexpr const char UPLOADING_SUFFIX[] = "ing";
#define SHARED_DOC_THREADNAME_SUFFIX "broker_"
/// The HTTP request User-Agent. Used only in Requests.
-#define HTTP_AGENT_STRING "LOOLWSD HTTP Agent " LOOLWSD_VERSION
+#define HTTP_AGENT_STRING "COOLWSD HTTP Agent " COOLWSD_VERSION
/// The WOPI User-Agent. Depricated: use HTTP_AGENT_STRING.
#define WOPI_AGENT_STRING HTTP_AGENT_STRING
/// The HTTP response Server. Used only in Responses.
-#define HTTP_SERVER_STRING "LOOLWSD HTTP Server " LOOLWSD_VERSION
+#define HTTP_SERVER_STRING "COOLWSD HTTP Server " COOLWSD_VERSION
-// The client port number, both loolwsd and the kits have this.
+// The client port number, both coolwsd and the kits have this.
extern int ClientPortNumber;
extern std::string MasterLocation;
diff --git a/common/JailUtil.cpp b/common/JailUtil.cpp
index bdf7163365..b334a1aa19 100644
--- a/common/JailUtil.cpp
+++ b/common/JailUtil.cpp
@@ -73,7 +73,7 @@ bool unmount(const std::string& target)
// This file signifies that we copied instead of mounted.
// NOTE: jail cleanup helpers are called from forkit and
-// loolwsd, and they may have bind-mounting enabled, but the
+// coolwsd, and they may have bind-mounting enabled, but the
// kit could have had it removed when falling back to copying.
// In such cases, we cannot safely know whether the jail was
// copied or not, since the bind envar will be present and
@@ -196,21 +196,21 @@ void setupJails(bool bindMount, const std::string& jailRoot, const std::string&
{
// Test mounting to verify it actually works,
// as it might not function in some systems.
- const std::string target = Poco::Path(jailRoot, "lool_test_mount").toString();
+ const std::string target = Poco::Path(jailRoot, "cool_test_mount").toString();
if (bind(sysTemplate, target))
{
enableBindMounting();
safeRemoveDir(target);
LOG_INF("Enabling Bind-Mounting of jail contents for better performance per "
- "mount_jail_tree config in loolwsd.xml.");
+ "mount_jail_tree config in coolwsd.xml.");
}
else
LOG_ERR("Bind-Mounting fails and will be disabled for this run. To disable permanently "
- "set mount_jail_tree config entry in loolwsd.xml to false.");
+ "set mount_jail_tree config entry in coolwsd.xml to false.");
}
else
LOG_INF("Disabling Bind-Mounting of jail contents per "
- "mount_jail_tree config in loolwsd.xml.");
+ "mount_jail_tree config in coolwsd.xml.");
}
// This is the second stage of setting up /dev/[u]random
@@ -264,7 +264,7 @@ void setupJailDevNodes(const std::string& root)
}
/// The envar name used to control bind-mounting of systemplate/jails.
-constexpr const char* BIND_MOUNTING_ENVAR_NAME = "LOOL_BIND_MOUNT";
+constexpr const char* BIND_MOUNTING_ENVAR_NAME = "COOL_BIND_MOUNT";
void enableBindMounting()
{
diff --git a/common/Log.cpp b/common/Log.cpp
index 6c2ee241f3..9e5a5d549b 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -328,7 +328,7 @@ namespace Log
if (logToFile)
{
- channel = static_cast<Poco::Channel*>(new FileChannel("loolwsd.log"));
+ channel = static_cast<Poco::Channel*>(new FileChannel("coolwsd.log"));
for (const auto& pair : config)
{
channel->setProperty(pair.first, pair.second);
diff --git a/common/Log.hpp b/common/Log.hpp
index 6b52a19aa0..9bf6deb83d 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -282,7 +282,7 @@ namespace Log
std::ostringstream oss_(Log::prefix<sizeof(b_) - 1>(b_, LVL), std::ostringstream::ate); \
oss_ << std::boolalpha << X; \
LOG_END(oss_, FILEP); \
- ((void)__android_log_print(ANDROID_LOG_DEBUG, "loolwsd", "%s %s", LVL, oss_.str().c_str()))
+ ((void)__android_log_print(ANDROID_LOG_DEBUG, "coolwsd", "%s %s", LVL, oss_.str().c_str()))
#else
diff --git a/common/Message.hpp b/common/Message.hpp
index cb9daf5e34..f9acc2ac74 100644
--- a/common/Message.hpp
+++ b/common/Message.hpp
@@ -84,12 +84,12 @@ public:
bool getTokenInteger(const std::string& name, int& value)
{
- return LOOLProtocol::getTokenInteger(_tokens, name, value);
+ return COOLProtocol::getTokenInteger(_tokens, name, value);
}
/// Return the abbreviated message for logging purposes.
std::string abbr() const {
- return _id + ' ' + LOOLProtocol::getAbbreviatedMessage(_data.data(), _data.size());
+ return _id + ' ' + COOLProtocol::getAbbreviatedMessage(_data.data(), _data.size());
}
const std::string& id() const { return _id; }
@@ -124,7 +124,7 @@ public:
if (func(_data))
{
// Check - just the body.
- assert(_firstLine == LOOLProtocol::getFirstLine(_data.data(), _data.size()));
+ assert(_firstLine == COOLProtocol::getFirstLine(_data.data(), _data.size()));
assert(_type == detectType());
}
}
@@ -142,7 +142,7 @@ private:
{
if(_firstLine.empty())
{
- _firstLine = LOOLProtocol::getFirstLine(_data.data(), _data.size());
+ _firstLine = COOLProtocol::getFirstLine(_data.data(), _data.size());
}
}
@@ -167,7 +167,7 @@ private:
std::string getForwardToken(const char* buffer, int length)
{
- std::string forward = LOOLProtocol::getFirstToken(buffer, length);
+ std::string forward = COOLProtocol::getFirstToken(buffer, length);
return (forward.find('-') != std::string::npos ? forward : std::string());
}
diff --git a/common/MessageQueue.cpp b/common/MessageQueue.cpp
index d41bcb9321..e32df3e185 100644
--- a/common/MessageQueue.cpp
+++ b/common/MessageQueue.cpp
@@ -22,12 +22,12 @@
void TileQueue::put_impl(const Payload& value)
{
- const std::string firstToken = LOOLProtocol::getFirstToken(value);
+ const std::string firstToken = COOLProtocol::getFirstToken(value);
if (firstToken == "canceltiles")
{
const std::string msg = std::string(value.data(), value.size());
- LOG_TRC("Processing [" << LOOLProtocol::getAbbreviatedMessage(msg)
+ LOG_TRC("Processing [" << COOLProtocol::getAbbreviatedMessage(msg)
<< "]. Before canceltiles have " << getQueue().size()
<< " in queue.");
const std::string seqs = msg.substr(12);
@@ -100,7 +100,7 @@ void TileQueue::put_impl(const Payload& value)
void TileQueue::removeTileDuplicate(const std::string& tileMsg)
{
- assert(LOOLProtocol::matchPrefix("tile", tileMsg, /*ignoreWhitespace*/ true));
+ assert(COOLProtocol::matchPrefix("tile", tileMsg, /*ignoreWhitespace*/ true));
// Ver is always provided at this point and it is necessary to
// return back to clients the last rendered version of a tile
@@ -118,7 +118,7 @@ void TileQueue::removeTileDuplicate(const std::string& tileMsg)
if (it.size() > newMsgPos &&
strncmp(tileMsg.data(), it.data(), newMsgPos) == 0)
{
- LOG_TRC("Remove duplicate tile request: " << std::string(it.data(), it.size()) << " -> " << LOOLProtocol::getAbbreviatedMessage(tileMsg));
+ LOG_TRC("Remove duplicate tile request: " << std::string(it.data(), it.size()) << " -> " << COOLProtocol::getAbbreviatedMessage(tileMsg));
getQueue().erase(getQueue().begin() + i);
break;
}
@@ -142,7 +142,7 @@ std::string extractViewId(const std::string& origMsg, const StringVector& tokens
/// Extract the .uno: command ID from the potential command.
std::string extractUnoCommand(const std::string& command)
{
- if (!LOOLProtocol::matchPrefix(".uno:", command))
+ if (!COOLProtocol::matchPrefix(".uno:", command))
return std::string();
size_t equalPos = command.find('=');
@@ -186,7 +186,7 @@ bool extractRectangle(const StringVector& tokens, int& x, int& y, int& w, int& h
std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg)
{
- assert(LOOLProtocol::matchPrefix("callback", callbackMsg, /*ignoreWhitespace*/ true));
+ assert(COOLProtocol::matchPrefix("callback", callbackMsg, /*ignoreWhitespace*/ true));
StringVector tokens = Util::tokenize(callbackMsg);
@@ -354,7 +354,7 @@ std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg)
{
LOG_TRC("Remove obsolete uno command: "
<< std::string(it.data(), it.size()) << " -> "
- << LOOLProtocol::getAbbreviatedMessage(callbackMsg));
+ << COOLProtocol::getAbbreviatedMessage(callbackMsg));
getQueue().erase(getQueue().begin() + i);
break;
}
@@ -383,7 +383,7 @@ std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg)
const auto& it = getQueue()[i];
// skip non-callbacks quickly
- if (!LOOLProtocol::matchPrefix("callback", it))
+ if (!COOLProtocol::matchPrefix("callback", it))
continue;
StringVector queuedTokens = Util::tokenize(it.data(), it.size());
@@ -395,7 +395,7 @@ std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg)
{
LOG_TRC("Remove obsolete callback: "
<< std::string(it.data(), it.size()) << " -> "
- << LOOLProtocol::getAbbreviatedMessage(callbackMsg));
+ << COOLProtocol::getAbbreviatedMessage(callbackMsg));
getQueue().erase(getQueue().begin() + i);
break;
}
@@ -413,7 +413,7 @@ std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg)
{
LOG_TRC("Remove obsolete view callback: "
<< std::string(it.data(), it.size()) << " -> "
- << LOOLProtocol::getAbbreviatedMessage(callbackMsg));
+ << COOLProtocol::getAbbreviatedMessage(callbackMsg));
getQueue().erase(getQueue().begin() + i);
break;
}
@@ -454,8 +454,8 @@ void TileQueue::deprioritizePreviews()
// stop at the first non-tile or non-'id' (preview) message
std::string id;
- if (!LOOLProtocol::matchPrefix("tile", message) ||
- !LOOLProtocol::getTokenStringFromMessage(message, "id", id))
+ if (!COOLProtocol::matchPrefix("tile", message) ||
+ !COOLProtocol::getTokenStringFromMessage(message, "id", id))
{
break;
}
@@ -474,12 +474,12 @@ TileQueue::Payload TileQueue::get_impl()
std::string msg(front.data(), front.size());
std::string id;
- bool isTile = LOOLProtocol::matchPrefix("tile", msg);
- bool isPreview = isTile && LOOLProtocol::getTokenStringFromMessage(msg, "id", id);
+ bool isTile = COOLProtocol::matchPrefix("tile", msg);
+ bool isPreview = isTile && COOLProtocol::getTokenStringFromMessage(msg, "id", id);
if (!isTile || isPreview)
{
// Don't combine non-tiles or tiles with id.
- LOG_TRC("MessageQueue res: " << LOOLProtocol::getAbbreviatedMessage(msg));
+ LOG_TRC("MessageQueue res: " << COOLProtocol::getAbbreviatedMessage(msg));
getQueue().erase(getQueue().begin());
// de-prioritize the other tiles with id - usually the previews in
@@ -502,8 +502,8 @@ TileQueue::Payload TileQueue::get_impl()
// avoid starving - stop the search when we reach a non-tile,
// otherwise we may keep growing the queue of unhandled stuff (both
// tiles and non-tiles)
- if (!LOOLProtocol::matchPrefix("tile", prio) ||
- LOOLProtocol::getTokenStringFromMessage(prio, "id", id))
+ if (!COOLProtocol::matchPrefix("tile", prio) ||
+ COOLProtocol::getTokenStringFromMessage(prio, "id", id))
{
break;
}
@@ -533,8 +533,8 @@ TileQueue::Payload TileQueue::get_impl()
{
auto& it = getQueue()[i];
msg = std::string(it.data(), it.size());
- if (!LOOLProtocol::matchPrefix("tile", msg) ||
- LOOLProtocol::getTokenStringFromMessage(msg, "id", id))
+ if (!COOLProtocol::matchPrefix("tile", msg) ||
+ COOLProtocol::getTokenStringFromMessage(msg, "id", id))
{
// Don't combine non-tiles or tiles with id.
++i;
@@ -542,7 +542,7 @@ TileQueue::Payload TileQueue::get_impl()
}
TileDesc tile2 = TileDesc::parse(msg);
- LOG_TRC("Combining candidate: " << LOOLProtocol::getAbbreviatedMessage(msg));
+ LOG_TRC("Combining candidate: " << COOLProtocol::getAbbreviatedMessage(msg));
// Check if it's on the same row.
if (tiles[0].canCombine(tile2))
@@ -561,12 +561,12 @@ TileQueue::Payload TileQueue::get_impl()
if (tiles.size() == 1)
{
msg = tiles[0].serialize("tile");
- LOG_TRC("MessageQueue res: " << LOOLProtocol::getAbbreviatedMessage(msg));
+ LOG_TRC("MessageQueue res: " << COOLProtocol::getAbbreviatedMessage(msg));
return Payload(msg.data(), msg.data() + msg.size());
}
std::string tileCombined = TileCombined::create(tiles).serialize("tilecombine");
- LOG_TRC("MessageQueue res: " << LOOLProtocol::getAbbreviatedMessage(tileCombined));
+ LOG_TRC("MessageQueue res: " << COOLProtocol::getAbbreviatedMessage(tileCombined));
return Payload(tileCombined.data(), tileCombined.data() + tileCombined.size());
}
diff --git a/common/MessageQueue.hpp b/common/MessageQueue.hpp
index acd1d595b7..9aca776741 100644
--- a/common/MessageQueue.hpp
+++ b/common/MessageQueue.hpp
@@ -134,8 +134,8 @@ protected:
{
std::string id;
std::string text;
- if (!LOOLProtocol::getTokenString(tokens, "id", id) ||
- !LOOLProtocol::getTokenString(tokens, "text", text))
+ if (!COOLProtocol::getTokenString(tokens, "id", id) ||
+ !COOLProtocol::getTokenString(tokens, "text", text))
return std::string();
int i = getQueue().size() - 1;
@@ -160,9 +160,9 @@ protected:
std::string queuedText;
if (queuedTokens.equals(0, tokens, 0) &&
queuedTokens.equals(1, "textinput") &&
- LOOLProtocol::getTokenString(queuedTokens, "id", queuedId) &&
+ COOLProtocol::getTokenString(queuedTokens, "id", queuedId) &&
queuedId == id &&
- LOOLProtocol::getTokenString(queuedTokens, "text", queuedText))
+ COOLProtocol::getTokenString(queuedTokens, "text", queuedText))
{
// Remove the queued textinput message and combine it with the current one
getQueue().erase(getQueue().begin() + i);
@@ -192,9 +192,9 @@ protected:
std::string id;
int before;
int after;
- if (!LOOLProtocol::getTokenString(tokens, "id", id) ||
- !LOOLProtocol::getTokenInteger(tokens, "before", before) ||
- !LOOLProtocol::getTokenInteger(tokens, "after", after))
+ if (!COOLProtocol::getTokenString(tokens, "id", id) ||
+ !COOLProtocol::getTokenInteger(tokens, "before", before) ||
+ !COOLProtocol::getTokenInteger(tokens, "after", after))
return std::string();
int i = getQueue().size() - 1;
@@ -220,10 +220,10 @@ protected:
int queuedAfter;
if (queuedTokens.equals(0, tokens, 0) &&
queuedTokens.equals(1, "removetextcontext") &&
- LOOLProtocol::getTokenStringFromMessage(queuedMessage, "id", queuedId) &&
+ COOLProtocol::getTokenStringFromMessage(queuedMessage, "id", queuedId) &&
queuedId == id &&
- LOOLProtocol::getTokenIntegerFromMessage(queuedMessage, "before", queuedBefore) &&
- LOOLProtocol::getTokenIntegerFromMessage(queuedMessage, "after", queuedAfter))
+ COOLProtocol::getTokenIntegerFromMessage(queuedMessage, "before", queuedBefore) &&
+ COOLProtocol::getTokenIntegerFromMessage(queuedMessage, "after", queuedAfter))
{
// Remove the queued removetextcontext message and combine it with the current one
getQueue().erase(getQueue().begin() + i);
diff --git a/common/Protocol.cpp b/common/Protocol.cpp
index c078b8e92c..f1df38d8be 100644
--- a/common/Protocol.cpp
+++ b/common/Protocol.cpp
@@ -17,7 +17,7 @@
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-namespace LOOLProtocol
+namespace COOLProtocol
{
std::tuple<int, int, std::string> ParseVersion(const std::string& version)
{
diff --git a/common/Protocol.hpp b/common/Protocol.hpp
index 3d206f54e8..ebffe81c32 100644
--- a/common/Protocol.hpp
+++ b/common/Protocol.hpp
@@ -22,7 +22,7 @@
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-namespace LOOLProtocol
+namespace COOLProtocol
{
// Protocol Version Number.
// See protocol.txt.
diff --git a/common/Session.cpp b/common/Session.cpp
index a42f217e74..1acfe19fa4 100644
--- a/common/Session.cpp
+++ b/common/Session.cpp
@@ -35,7 +35,7 @@
#include "Util.hpp"
#include "Unit.hpp"
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::Exception;
@@ -98,7 +98,7 @@ void Session::parseDocOptions(const StringVector& tokens, int& part, std::string
{
std::string name;
std::string value;
- if (!LOOLProtocol::parseNameValuePair(tokens[i], name, value))
+ if (!COOLProtocol::parseNameValuePair(tokens[i], name, value))
{
LOG_WRN("Unexpected doc options token [" << tokens[i] << "]. Skipping.");
continue;
diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp
index 5b00b7a7ba..5a0653c23e 100644
--- a/common/SigUtil.cpp
+++ b/common/SigUtil.cpp
@@ -299,7 +299,7 @@ namespace SigUtil
#endif
#if !ENABLE_DEBUG
- if (std::getenv("LOOL_DEBUG"))
+ if (std::getenv("COOL_DEBUG"))
#endif
{
Log::signalLog(FatalGdbString);
diff --git a/common/Unit.cpp b/common/Unit.cpp
index e37497d3c5..a114292da9 100644
--- a/common/Unit.cpp
+++ b/common/Unit.cpp
@@ -81,7 +81,7 @@ bool UnitBase::init(UnitType type, const std::string &unitLibPath)
#if !MOBILEAPP
assert(!get(type));
#else
- // The LOOLWSD initialization is called in a loop on mobile, allow reuse
+ // The COOLWSD initialization is called in a loop on mobile, allow reuse
if (get(type))
return true;
#endif
diff --git a/common/Unit.hpp b/common/Unit.hpp
index 5583412061..f9770d1d44 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -304,7 +304,7 @@ public:
virtual void configure(Poco::Util::LayeredConfiguration& /* config */);
/// Main-loop reached, time for testing.
- /// Invoked from loolwsd's main thread.
+ /// Invoked from coolwsd's main thread.
void invokeTest()
{
try
diff --git a/common/Util.cpp b/common/Util.cpp
index 6aa77605fe..79009c93d0 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -612,8 +612,8 @@ namespace Util
void getVersionInfo(std::string& version, std::string& hash)
{
- version = std::string(LOOLWSD_VERSION);
- hash = std::string(LOOLWSD_VERSION_HASH);
+ version = std::string(COOLWSD_VERSION);
+ hash = std::string(COOLWSD_VERSION_HASH);
hash.resize(std::min(8, (int)hash.length()));
}
@@ -631,7 +631,7 @@ namespace Util
return
"{ \"Version\": \"" + version + "\", "
"\"Hash\": \"" + hash + "\", "
- "\"Protocol\": \"" + LOOLProtocol::GetProtocolVersion() + "\", "
+ "\"Protocol\": \"" + COOLProtocol::GetProtocolVersion() + "\", "
"\"Id\": \"" + Util::getProcessIdentifier() + "\" }";
}
diff --git a/common/Util.hpp b/common/Util.hpp
index f6cc308e38..0af3a3e6f9 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -132,9 +132,9 @@ namespace Util
void alertAllUsers(const std::string& msg);
/// Send a 'error:' message with the specified cmd and kind parameters to all connected
- /// clients. This function can be called either in loolwsd or loolkit processes, even if only
- /// loolwsd obviously has contact with the actual clients; in loolkit it will be forwarded to
- /// loolwsd for redistribution. (This function must be implemented separately in each program
+ /// clients. This function can be called either in coolwsd or coolkit processes, even if only
+ /// coolwsd obviously has contact with the actual clients; in coolkit it will be forwarded to
+ /// coolwsd for redistribution. (This function must be implemented separately in each program
/// that uses it, it is not in Util.cpp.)
void alertAllUsers(const std::string& cmd, const std::string& kind);
#else
diff --git a/configure.ac b/configure.ac
index 4daae751a8..252a371506 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ([2.63])
-AC_INIT([loolwsd], [21.11.0.1], [https://github.com/CollaboraOnline/online/issues], [loolwsd], [https://collaboraonline.github.io/])
+AC_INIT([coolwsd], [21.11.0.1], [https://github.com/CollaboraOnline/online/issues], [coolwsd], [https://collaboraonline.github.io/])
LT_INIT([shared, disable-static, dlopen])
AM_INIT_AUTOMAKE([1.10 foreign subdir-objects tar-pax -Wno-portability])
@@ -13,10 +13,10 @@ AC_CONFIG_MACRO_DIR([m4])
# We don't want to require pkg-config and PKG_CHECK_MODULES on macOS
m4_if(m4_esyscmd_s([uname -s]),Darwin,[m4_define([PKG_CHECK_MODULES],[])],[])
-LOOLWSD_VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'`
-LOOLWSD_VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'`
-LOOLWSD_VERSION_MICRO=`echo $VERSION | awk -F. '{print $3}'`
-LOOLWSD_VERSION_NANO=`echo $VERSION | awk -F. '{print $4}'`
+COOLWSD_VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'`
+COOLWSD_VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'`
+COOLWSD_VERSION_MICRO=`echo $VERSION | awk -F. '{print $3}'`
+COOLWSD_VERSION_NANO=`echo $VERSION | awk -F. '{print $4}'`
ANDROID_PACKAGE_VERSIONCODE=
if test "$enable_androidapp" = "yes"; then
@@ -25,10 +25,10 @@ if test "$enable_androidapp" = "yes"; then
ANDROID_PACKAGE_VERSIONCODE="1"
AC_MSG_RESULT([not set, using $ANDROID_PACKAGE_VERSIONCODE])
else
- LOOLWSD_VERSION_MAJOR=`echo $with_android_package_versioncode | awk -F. '{print $1}'`
- LOOLWSD_VERSION_MINOR=`echo $with_android_package_versioncode | awk -F. '{print $2}'`
- LOOLWSD_VERSION_MICRO=`echo $with_android_package_versioncode | awk -F. '{print $3}'`
- LOOLWSD_VERSION_NANO=`echo $with_android_package_versioncode | awk -F. '{print $4}' | awk -F- '{print $1}'`
+ COOLWSD_VERSION_MAJOR=`echo $with_android_package_versioncode | awk -F. '{print $1}'`
+ COOLWSD_VERSION_MINOR=`echo $with_android_package_versioncode | awk -F. '{print $2}'`
+ COOLWSD_VERSION_MICRO=`echo $with_android_package_versioncode | awk -F. '{print $3}'`
+ COOLWSD_VERSION_NANO=`echo $with_android_package_versioncode | awk -F. '{print $4}' | awk -F- '{print $1}'`
ANDROID_PACKAGE_VERSIONCODE=`echo $with_android_package_versioncode | awk -F- '{print $2}'`
AC_MSG_RESULT([$ANDROID_PACKAGE_VERSIONCODE])
@@ -36,27 +36,27 @@ if test "$enable_androidapp" = "yes"; then
fi
AC_SUBST(ANDROID_PACKAGE_VERSIONCODE)
-LOOLWSD_VERSION="$LOOLWSD_VERSION_MAJOR.$LOOLWSD_VERSION_MINOR.$LOOLWSD_VERSION_MICRO.$LOOLWSD_VERSION_NANO"
+COOLWSD_VERSION="$COOLWSD_VERSION_MAJOR.$COOLWSD_VERSION_MINOR.$COOLWSD_VERSION_MICRO.$COOLWSD_VERSION_NANO"
-AC_SUBST([LOOLWSD_VERSION_MAJOR])
-AC_SUBST([LOOLWSD_VERSION_MINOR])
-AC_SUBST([LOOLWSD_VERSION_MICRO])
-AC_SUBST([LOOLWSD_VERSION_NANO])
-AC_SUBST([LOOLWSD_VERSION])
+AC_SUBST([COOLWSD_VERSION_MAJOR])
+AC_SUBST([COOLWSD_VERSION_MINOR])
+AC_SUBST([COOLWSD_VERSION_MICRO])
+AC_SUBST([COOLWSD_VERSION_NANO])
+AC_SUBST([COOLWSD_VERSION])
-AC_DEFINE_UNQUOTED([LOOLWSD_VERSION],[["$LOOLWSD_VERSION"]],[Collabora Online WebSocket server version])
+AC_DEFINE_UNQUOTED([COOLWSD_VERSION],[["$COOLWSD_VERSION"]],[Collabora Online WebSocket server version])
# try to add a git hash for a version if we're developing
-LOOLWSD_VERSION_HASH="$LOOLWSD_VERSION"
+COOLWSD_VERSION_HASH="$COOLWSD_VERSION"
git_hash=`cd ${srcdir} && ( cat dist_git_hash 2> /dev/null || git log -1 --format=%h 2> /dev/null )`
if test "z$git_hash" != "z"; then
- LOOLWSD_VERSION_HASH=$git_hash
+ COOLWSD_VERSION_HASH=$git_hash
fi
-AC_SUBST([LOOLWSD_VERSION_HASH])
+AC_SUBST([COOLWSD_VERSION_HASH])
-AC_DEFINE_UNQUOTED([LOOLWSD_VERSION_HASH],[["$LOOLWSD_VERSION_HASH"]],[Collabora Online git hash if present])
+AC_DEFINE_UNQUOTED([COOLWSD_VERSION_HASH],[["$COOLWSD_VERSION_HASH"]],[Collabora Online git hash if present])
-AC_CONFIG_SRCDIR([wsd/LOOLWSD.cpp])
+AC_CONFIG_SRCDIR([wsd/COOLWSD.cpp])
AC_CONFIG_HEADERS([config.h])
@@ -150,7 +150,7 @@ AC_ARG_ENABLE([gtkapp],
AC_ARG_ENABLE(fuzzers,
AS_HELP_STRING([--enable-fuzzers],
[Enables building libfuzzer targets for fuzz testing. It is useful to enable this switch
- only in a separate build tree, since the switch disables the creation of a loolwsd
+ only in a separate build tree, since the switch disables the creation of a coolwsd
binary.])
)
@@ -292,7 +292,7 @@ AC_ARG_WITH([feedback-location],
AC_ARG_ENABLE(welcome-message,
AS_HELP_STRING([--enable-welcome-message],
- [Enables welcome message on version update. Can be changed later in loolwsd.xml.])
+ [Enables welcome message on version update. Can be changed later in coolwsd.xml.])
)
AC_ARG_ENABLE(feedback,
@@ -357,11 +357,11 @@ AS_IF([test "$enable_debug" = yes -a -n "$with_poco_libs"],
ENABLE_DEBUG=false
ENABLE_DEBUG_PROTOCOL=false
ENABLE_BUNDLE=true
-LOOLWSD_LOGLEVEL="warning"
-LOOLWSD_LOG_TO_FILE="false"
-LOOLWSD_LOGFILE="/var/log/loolwsd.log"
-LOOLWSD_TRACEEVENTFILE="/var/log/loolwsd.trace.json"
-LOOLWSD_ANONYMIZE_USER_DATA=false
+COOLWSD_LOGLEVEL="warning"
+COOLWSD_LOG_TO_FILE="false"
+COOLWSD_LOGFILE="/var/log/coolwsd.log"
+COOLWSD_TRACEEVENTFILE="/var/log/coolwsd.trace.json"
+COOLWSD_ANONYMIZE_USER_DATA=false
BROWSER_LOGGING="false"
debug_msg="secure mode: product build"
anonym_msg=""
@@ -370,11 +370,11 @@ if test "$enable_debug" = "yes"; then
AC_DEFINE([ENABLE_DEBUG],1,[Whether to compile in some extra debugging support code and disable some security pieces])
ENABLE_DEBUG=true
ENABLE_DEBUG_PROTOCOL=true
- LOOLWSD_LOGLEVEL="trace"
- LOOLWSD_LOG_TO_FILE="true"
- LOOLWSD_LOGFILE="/tmp/loolwsd.log"
- LOOLWSD_TRACEEVENTFILE="/tmp/loolwsd.trace.json"
- LOOLWSD_ANONYMIZE_USER_DATA=false
+ COOLWSD_LOGLEVEL="trace"
+ COOLWSD_LOG_TO_FILE="true"
+ COOLWSD_LOGFILE="/tmp/coolwsd.log"
+ COOLWSD_TRACEEVENTFILE="/tmp/coolwsd.trace.json"
+ COOLWSD_ANONYMIZE_USER_DATA=false
BROWSER_LOGGING="true"
debug_msg="low security debugging mode"
if test "$enable_bundle" != "yes"; then
@@ -386,8 +386,8 @@ else
fi
AC_SUBST(ENABLE_DEBUG)
AC_SUBST(ENABLE_BUNDLE)
-AC_SUBST(LOOLWSD_LOGLEVEL)
-AC_SUBST(LOOLWSD_LOG_TO_FILE)
+AC_SUBST(COOLWSD_LOGLEVEL)
+AC_SUBST(COOLWSD_LOG_TO_FILE)
AC_SUBST(BROWSER_LOGGING)
if test "$enable_debug_protocol" = no; then
@@ -404,22 +404,22 @@ fi
AC_SUBST(ENABLE_BROWSERSYNC)
if test -n "$with_logfile" ; then
- LOOLWSD_LOGFILE="$with_logfile"
+ COOLWSD_LOGFILE="$with_logfile"
fi
-AC_SUBST(LOOLWSD_LOGFILE)
+AC_SUBST(COOLWSD_LOGFILE)
if test -n "$with_trace_event_file" ; then
- LOOLWSD_TRACEEVENTFILE="$with_trace_event_file"
+ COOLWSD_TRACEEVENTFILE="$with_trace_event_file"
fi
-AC_SUBST(LOOLWSD_TRACEEVENTFILE)
-AC_DEFINE_UNQUOTED([LOOLWSD_TRACEEVENTFILE], [["]$LOOLWSD_TRACEEVENTFILE["]], [Destination for Trace Event output])
+AC_SUBST(COOLWSD_TRACEEVENTFILE)
+AC_DEFINE_UNQUOTED([COOLWSD_TRACEEVENTFILE], [["]$COOLWSD_TRACEEVENTFILE["]], [Destination for Trace Event output])
if test "$enable_anonymization" = "yes" ; then
- LOOLWSD_ANONYMIZE_USER_DATA=true
+ COOLWSD_ANONYMIZE_USER_DATA=true
anonym_msg="anonymization of user-data is enabled"
fi
-AC_DEFINE_UNQUOTED([LOOLWSD_ANONYMIZE_USER_DATA],[$LOOLWSD_ANONYMIZE_USER_DATA],[Enable permanent anonymization in logs])
-AC_SUBST(LOOLWSD_ANONYMIZE_USER_DATA)
+AC_DEFINE_UNQUOTED([COOLWSD_ANONYMIZE_USER_DATA],[$COOLWSD_ANONYMIZE_USER_DATA],[Enable permanent anonymization in logs])
+AC_SUBST(COOLWSD_ANONYMIZE_USER_DATA)
if test -z "$anonym_msg"; then
anonym_msg="anonymization of user-data is disabled"
@@ -1162,19 +1162,19 @@ AS_IF([test `uname -s` = "FreeBSD"],
# need this after the other stuff that uses the compiler because we don't want to run configure-tests with the plugins enabled
AS_IF([test -n "$with_compiler_plugins"],
- [CPPFLAGS="$CPPFLAGS -Xclang -load -Xclang ${with_compiler_plugins}/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang --lool-base-path=\${abs_top_srcdir}"])
+ [CPPFLAGS="$CPPFLAGS -Xclang -load -Xclang ${with_compiler_plugins}/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang --cool-base-path=\${abs_top_srcdir}"])
-LOOLWSD_CONFIGDIR=${sysconfdir}/${PACKAGE}
-AC_SUBST(LOOLWSD_CONFIGDIR)
+COOLWSD_CONFIGDIR=${sysconfdir}/${PACKAGE}
+AC_SUBST(COOLWSD_CONFIGDIR)
-LOOLWSD_DATADIR=${datadir}/${PACKAGE}
-AC_SUBST(LOOLWSD_DATADIR)
+COOLWSD_DATADIR=${datadir}/${PACKAGE}
+AC_SUBST(COOLWSD_DATADIR)
COOL_USER_ID="cool"
if test -n "$with_user_id"; then
COOL_USER_ID="$with_user_id"
fi
-AC_DEFINE_UNQUOTED([COOL_USER_ID],["$COOL_USER_ID"],[The user-name which is allowed to run loolwsd and its tools])
+AC_DEFINE_UNQUOTED([COOL_USER_ID],["$COOL_USER_ID"],[The user-name which is allowed to run coolwsd and its tools])
AM_CONDITIONAL([ENABLE_SETCAP], [test "$enable_setcap" != "no" -a `uname -s` = "Linux"])
@@ -1256,7 +1256,7 @@ AS_IF([test "$ENABLE_IOSAPP" = "true"],
# iOS app.
touch ios/Mobile/Branding/branding.css
fi
- cp loolkitconfig-mobile.xcu ios/Mobile/loolkitconfig.xcu
+ cp coolkitconfig-mobile.xcu ios/Mobile/coolkitconfig.xcu
fi
])
AC_SUBST(IOSAPP_FONTS)
@@ -1407,10 +1407,10 @@ AC_CONFIG_FILES([Makefile
test/Makefile
browser/Makefile
browser/npm-shrinkwrap.json
- loolkitconfig.xcu
- loolwsd.spec
- loolwsd.xml
- debian/loolwsd.postinst])
+ coolkitconfig.xcu
+ coolwsd.spec
+ coolwsd.xml
+ debian/coolwsd.postinst])
if test "$enable_iosapp" = "yes"; then
AC_CONFIG_FILES([ios/config.h
@@ -1501,7 +1501,7 @@ Configuration:
\$ make # to compile"
if test -n "$with_lo_path"; then
-echo " \$ make run # to start loolwsd
+echo " \$ make run # to start coolwsd
\$ make sync-writer|calc|impress # to start browsersync with specified app
"
fi
diff --git a/loolkitconfig-mobile.xcu b/coolkitconfig-mobile.xcu
index a2436d20f2..a2436d20f2 100644
--- a/loolkitconfig-mobile.xcu
+++ b/coolkitconfig-mobile.xcu
diff --git a/loolkitconfig.xcu.in b/coolkitconfig.xcu.in
index e6372f8e17..e6372f8e17 100644
--- a/loolkitconfig.xcu.in
+++ b/coolkitconfig.xcu.in
diff --git a/coolwsd-generate-proof-key b/coolwsd-generate-proof-key
index fb75b47f34..294a197446 100755
--- a/coolwsd-generate-proof-key
+++ b/coolwsd-generate-proof-key
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
SUDO=''
-if [ ! -w "/etc/loolwsd" ]; then
+if [ ! -w "/etc/coolwsd" ]; then
if (( $EUID != 0 )); then
if hash sudo 2>/dev/null; then
SUDO='sudo'
@@ -12,20 +12,20 @@ if [ ! -w "/etc/loolwsd" ]; then
fi
fi
-if [ -f /etc/loolwsd/proof_key ]; then
- echo "/etc/loolwsd/proof_key exists already."
+if [ -f /etc/coolwsd/proof_key ]; then
+ echo "/etc/coolwsd/proof_key exists already."
exit 0
fi
if hash ssh-keygen 2>/dev/null; then
- $SUDO ssh-keygen -t rsa -N "" -m PEM -f /etc/loolwsd/proof_key
+ $SUDO ssh-keygen -t rsa -N "" -m PEM -f /etc/coolwsd/proof_key
if [ $? -ne 0 ] ; then
exit $?
fi
if id -u cool >/dev/null 2>&1; then
- $SUDO chown cool: /etc/loolwsd/proof_key
+ $SUDO chown cool: /etc/coolwsd/proof_key
else
- echo "User cool does not exist. Please reinstall loolwsd package, or in case of manual installation from source, create the cool user manually."
+ echo "User cool does not exist. Please reinstall coolwsd package, or in case of manual installation from source, create the cool user manually."
fi
else
echo "ssh-keygen command not found. Please install openssh client tools."
diff --git a/loolwsd.init.rhel6 b/coolwsd.init.rhel6
index e40587204c..e6bf4bb74b 100644
--- a/loolwsd.init.rhel6
+++ b/coolwsd.init.rhel6
@@ -1,28 +1,28 @@
#!/bin/bash
#
# chkconfig: 35 90 12
-# description: loolwsd server
+# description: coolwsd server
#
# Get function from functions library
. /etc/init.d/functions
-# Start the service loolwsd
+# Start the service coolwsd
start() {
- echo -n $"Starting loolwsd server: "
- su cool -c "/usr/bin/loolwsd --version --o:logging.file[@enable]=true" &
+ echo -n $"Starting coolwsd server: "
+ su cool -c "/usr/bin/coolwsd --version --o:logging.file[@enable]=true" &
### Create the lock file ###
- touch /var/lock/subsys/loolwsd
- success $"loolwsd server startup"
+ touch /var/lock/subsys/coolwsd
+ success $"coolwsd server startup"
echo
}
-# Stop the service loolwsd
+# Stop the service coolwsd
stop() {
- echo -n $"Stopping loolwsd server: "
- killproc loolwsd
+ echo -n $"Stopping coolwsd server: "
+ killproc coolwsd
### Now, delete the lock file ###
- rm -f /var/lock/subsys/loolwsd
+ rm -f /var/lock/subsys/coolwsd
echo
}
@@ -35,7 +35,7 @@ case "$1" in
stop
;;
status)
- status loolwsd
+ status coolwsd
;;
restart|reload|condrestart)
stop
diff --git a/debian/loolwsd.service b/coolwsd.service
index bfea55fa3f..a452f33e01 100644
--- a/debian/loolwsd.service
+++ b/coolwsd.service
@@ -3,8 +3,8 @@ Description=Collabora Online WebSocket Daemon
After=network.target
[Service]
-EnvironmentFile=-/etc/sysconfig/loolwsd
-ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/loolwsd
+EnvironmentFile=-/etc/sysconfig/coolwsd
+ExecStart=/usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd
KillSignal=SIGINT
TimeoutStopSec=120
User=cool
diff --git a/loolwsd.spec.in b/coolwsd.spec.in
index 727d49679f..d1eadacd6c 100644
--- a/loolwsd.spec.in
+++ b/coolwsd.spec.in
@@ -1,4 +1,4 @@
-# spec file for package loolwsd
+# spec file for package coolwsd
#
# Copyright (c) 2015 Collabora
#
@@ -16,7 +16,7 @@ Release: 1%{?dist}
Vendor: %{vendor}
Summary: Collabora Online WebSocket Daemon
License: EULA
-Source0: loolwsd-@PACKAGE_VERSION@.tar.gz
+Source0: coolwsd-@PACKAGE_VERSION@.tar.gz
BuildRequires: libcap-devel libpng-devel pam-devel gcc-c++ cppunit-devel pam-devel fontconfig make
# Red Hat and CentOS
@@ -36,14 +36,14 @@ BuildRequires: libcap-progs linux-glibc-devel systemd-rpm-macros python3-polib
Requires: collaboraoffice collaboraoffice-ure collaboraofficebasis-core collaboraofficebasis-writer collaboraofficebasis-impress collaboraofficebasis-graphicfilter collaboraofficebasis-en-US collaboraofficebasis-calc collaboraofficebasis-ooofonts collaboraofficebasis-images collaboraofficebasis-draw collaboraofficebasis-extension-pdf-import collaboraofficebasis-ooolinguistic collaboraofficebasis-math
Requires(post): coreutils grep sed cpio
%if 0%{?rhel}
-# loolwsd dependencies
+# coolwsd dependencies
Requires: systemd expat keyutils-libs krb5-libs libattr libcap libcom_err libgcc libpng libselinux openssh-clients openssl-libs pcre xz-libs zlib
# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies)
Requires: expat fontconfig freetype libuuid bzip2-libs
%endif
%if 0%{?suse_version}
-# loolwsd dependencies
+# coolwsd dependencies
Requires(post): libcap-progs
Requires: systemd libopenssl1_0_0 libpcre1 libz1 libcap2 libpng12-0 %{fillup_prereq}
# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies)
@@ -51,13 +51,16 @@ Requires: systemd libopenssl1_0_0 libpcre1 libz1 libcap2 libpng12-0 %{fill
Requires: fontconfig libbz2-1 libexpat1 libfreetype6 libpng16-16 libuuid1 openssh
%endif
+Provides: loolwsd
+Obsoletes: loolwsd
+
%description
%if 0%{?suse_version}
%debug_package
%endif
%prep
-%setup -n loolwsd-@PACKAGE_VERSION@
+%setup -n coolwsd-@PACKAGE_VERSION@
%build
%configure \
@@ -78,23 +81,23 @@ env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot}
install -d -m 755 %{buildroot}/var/adm/fillup-templates
%if 0%{?rhel}
-install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
+install -D -m 444 coolwsd.service %{buildroot}%{_unitdir}/coolwsd.service
# systemd in RHEL 7 does not understand these options
%if 0%{?rhel} <= 7
-sed -i "/^ReadWritePaths/d;/^ProtectControlGroups/d;/^ProtectSystem/d" %{buildroot}%{_unitdir}/loolwsd.service
+sed -i "/^ReadWritePaths/d;/^ProtectControlGroups/d;/^ProtectSystem/d" %{buildroot}%{_unitdir}/coolwsd.service
%endif
-install -D -m 644 sysconfig.loolwsd %{buildroot}/etc/sysconfig/loolwsd
+install -D -m 644 sysconfig.coolwsd %{buildroot}/etc/sysconfig/coolwsd
install -d -m 755 %{buildroot}/etc/httpd/conf
-install -D -m 755 etc/apache2/loolwsd.conf %{buildroot}/etc/httpd/conf
-rm %{buildroot}/etc/apache2/conf-available/loolwsd.conf
+install -D -m 755 etc/apache2/coolwsd.conf %{buildroot}/etc/httpd/conf
+rm %{buildroot}/etc/apache2/conf-available/coolwsd.conf
%endif
%if 0%{?suse_version}
-install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
-install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates
+install -D -m 444 coolwsd.service %{buildroot}%{_unitdir}/coolwsd.service
+install -D -m 644 sysconfig.coolwsd %{buildroot}/var/adm/fillup-templates
%endif
mkdir -p %{buildroot}/etc/pam.d
-echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/loolwsd
-echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
+echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/coolwsd
+echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/coolwsd
%files
%defattr(-,root,root,-)
@@ -104,47 +107,47 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
/usr/bin/coolforkit
/usr/bin/coolconvert
/usr/bin/coolconfig
-/usr/bin/loolconfig
+/usr/bin/coolconfig
/usr/bin/coolmount
-/usr/share/loolwsd/discovery.xml
-/usr/share/loolwsd/favicon.ico
-/usr/share/loolwsd/browser
-/usr/share/doc/loolwsd/README
-/usr/share/doc/loolwsd/README.vars
-/usr/share/doc/loolwsd/metrics.txt
-/usr/share/doc/loolwsd/protocol.txt
-/usr/share/doc/loolwsd/reference.md
-/usr/share/man/man1/loolwsd.1.gz
+/usr/share/coolwsd/discovery.xml
+/usr/share/coolwsd/favicon.ico
+/usr/share/coolwsd/browser
+/usr/share/doc/coolwsd/README
+/usr/share/doc/coolwsd/README.vars
+/usr/share/doc/coolwsd/metrics.txt
+/usr/share/doc/coolwsd/protocol.txt
+/usr/share/doc/coolwsd/reference.md
+/usr/share/man/man1/coolwsd.1.gz
/usr/share/man/man1/coolforkit.1.gz
/usr/share/man/man1/coolconvert.1.gz
/usr/share/man/man1/coolconfig.1.gz
/usr/share/man/man1/coolwsd-systemplate-setup.1.gz
/usr/share/man/man1/coolwsd-generate-proof-key.1.gz
/usr/share/man/man1/coolmount.1.gz
-%{_unitdir}/loolwsd.service
+%{_unitdir}/coolwsd.service
%if 0%{?rhel}
-%config(noreplace) /etc/sysconfig/loolwsd
+%config(noreplace) /etc/sysconfig/coolwsd
%endif
%if 0%{?suse_version}
-/var/adm/fillup-templates/sysconfig.loolwsd
+/var/adm/fillup-templates/sysconfig.coolwsd
%endif
-%config(noreplace) /etc/pam.d/loolwsd
-%config(noreplace) %attr(640, cool, root) /etc/loolwsd/loolwsd.xml
-%config /etc/loolwsd/loolkitconfig.xcu
-%config(noreplace) /etc/nginx/snippets/loolwsd.conf
+%config(noreplace) /etc/pam.d/coolwsd
+%config(noreplace) %attr(640, cool, root) /etc/coolwsd/coolwsd.xml
+%config /etc/coolwsd/coolkitconfig.xcu
+%config(noreplace) /etc/nginx/snippets/coolwsd.conf
%if 0%{?suse_version} > 0
-%config(noreplace) /etc/apache2/conf-available/loolwsd.conf
+%config(noreplace) /etc/apache2/conf-available/coolwsd.conf
%endif
%if 0%{?rhel} > 0
-%config(noreplace) /etc/httpd/conf/loolwsd.conf
+%config(noreplace) /etc/httpd/conf/coolwsd.conf
%endif
%doc README.md
%pre
%if 0%{?suse_version}
-%service_add_pre loolwsd.service
+%service_add_pre coolwsd.service
%endif
getent group cool >/dev/null || groupadd -r cool
@@ -153,29 +156,29 @@ getent passwd cool >/dev/null || useradd -g cool -r cool -d /opt/cool -s /bin/ba
# for filename in `find /opt/cool/systemplate -type f`;do stripped=$(echo -ne $filename | sed -e "s|/opt/cool/systemplate||");rpm -qf --qf="%{NAME}\n" $stripped;done | grep -v devel | grep -v 32bit | grep -v -- -fonts | sort | uniq
%triggerin -- expat fontconfig freetype freetype2 glibc glibc-locale kernel keyutils-libs krb5 krb5-libs libbz2-1 libcap libcap-ng libcap2 libexpat1 libfreetype6 libgcc libgcc_s1 libgcrypt libiscsi libpng libpng12 libpng12-0 libpng15-15 libpng16-16 libstdc++ libstdc++6 libuuid libuuid1 libz1 lsb nss-mdns nss-softokn-freebl pcre sssd sssd-client systemd-libs timezone tzdata zlib
-echo -ne "Triggered update of loolwsd systemplate..."
+echo -ne "Triggered update of coolwsd systemplate..."
%if 0%{?rhel} >= 7 || 0%{?suse_version} >= 1300
-systemctl is-active -q loolwsd && LOOLWSD_IS_ACTIVE=1 || LOOLWSD_IS_ACTIVE=0
-if [ $LOOLWSD_IS_ACTIVE == "1" ]; then systemctl stop loolwsd; fi
+systemctl is-active -q coolwsd && COOLWSD_IS_ACTIVE=1 || COOLWSD_IS_ACTIVE=0
+if [ $COOLWSD_IS_ACTIVE == "1" ]; then systemctl stop coolwsd; fi
%endif
# Figure out where LO is installed, let's hope it is not a mount point
-# Create a directory for loolwsd on the same file system
+# Create a directory for coolwsd on the same file system
loroot=/opt/collaboraoffice
-loolparent=`cd ${loroot} && cd .. && /bin/pwd`
+coolparent=`cd ${loroot} && cd .. && /bin/pwd`
-rm -rf ${loolparent}/cool
-mkdir -p ${loolparent}/cool/child-roots
-chown cool:cool ${loolparent}/cool
-chown cool:cool ${loolparent}/cool/child-roots
+rm -rf ${coolparent}/cool
+mkdir -p ${coolparent}/cool/child-roots
+chown cool:cool ${coolparent}/cool
+chown cool:cool ${coolparent}/cool/child-roots
fc-cache ${loroot}/share/fonts/truetype
-coolwsd-systemplate-setup ${loolparent}/cool/systemplate ${loroot} >/dev/null 2>&1
+coolwsd-systemplate-setup ${coolparent}/cool/systemplate ${loroot} >/dev/null 2>&1
coolwsd-generate-proof-key >/dev/null 2>&1
%if 0%{?rhel} || 0%{?suse_version}
-if [ $LOOLWSD_IS_ACTIVE == "1" ]; then systemctl start loolwsd; fi
+if [ $COOLWSD_IS_ACTIVE == "1" ]; then systemctl start coolwsd; fi
%endif
echo " Done."
@@ -185,30 +188,30 @@ setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
setcap cap_sys_admin=ep /usr/bin/coolmount
%if 0%{?rhel} >= 7
-%systemd_post loolwsd.service
+%systemd_post coolwsd.service
%else
%if 0%{?suse_version}
-%service_add_post loolwsd.service
-%{fillup_only -n loolwsd}
+%service_add_post coolwsd.service
+%{fillup_only -n coolwsd}
%endif
%endif
%preun
%if 0%{?rhel} >= 7
-%systemd_preun loolwsd.service
+%systemd_preun coolwsd.service
%else
%if 0%{?suse_version}
-%service_del_preun loolwsd.service
+%service_del_preun coolwsd.service
%endif
%endif
%postun
%if 0%{?rhel} >= 7
-%systemd_postun loolwsd.service
+%systemd_postun coolwsd.service
%else
%if 0%{?suse_version}
-%service_del_postun loolwsd.service
+%service_del_postun coolwsd.service
%endif
%endif
diff --git a/coolwsd.xml b/coolwsd.xml
deleted file mode 120000
index 9611a29ad4..0000000000
--- a/coolwsd.xml
+++ /dev/null
@@ -1 +0,0 @@
-loolwsd.xml \ No newline at end of file
diff --git a/loolwsd.xml.in b/coolwsd.xml.in
index e84bcfa3b6..5ca749bc9e 100644
--- a/loolwsd.xml.in
+++ b/coolwsd.xml.in
@@ -13,7 +13,7 @@
<child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="jails"></child_root_path>
<mount_jail_tree desc="Controls whether the systemplate and lotemplate contents are mounted or not, which is much faster than the default of linking/copying each file." type="bool" default="true"></mount_jail_tree>
- <server_name desc="External hostname:port of the server running loolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default=""></server_name>
+ <server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default=""></server_name>
<file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing cool." type="path" relative="true" default="browser/../"></file_server_root_path>
<hexify_embedded_urls desc="Enable to protect encoded URLs from getting decoded by intermediate hops. Particularly useful on Azure deployments" type="bool" default="false"></hexify_embedded_urls>
@@ -43,7 +43,7 @@
<idle_time_secs desc="Minimum idle time for a document to be candidate for bad state" type="uint" default="300">300</idle_time_secs>
<limit_dirty_mem_mb desc="Minimum memory usage for a document to be candidate for bad state" type="uint" default="3072">3072</limit_dirty_mem_mb>
<limit_cpu_per desc="Minimum CPU usage for a document to be candidate for bad state" type="uint" default="85">85</limit_cpu_per>
- <lost_kit_grace_period_secs desc="The minimum grace period for a lost kit process (not referenced by loolwsd) to resolve its lost status before it is terminated. To disable the cleanup of lost kits use value 0" default="120">120</lost_kit_grace_period_secs>
+ <lost_kit_grace_period_secs desc="The minimum grace period for a lost kit process (not referenced by coolwsd) to resolve its lost status before it is terminated. To disable the cleanup of lost kits use value 0" default="120">120</lost_kit_grace_period_secs>
</cleanup>
</per_document>
@@ -58,19 +58,19 @@
<color type="bool">true</color>
<!--
Note to developers: When you do "make run", the logging.level will be set on the
- loolwsd command line, so if you want to change it for your testing, do it in
+ coolwsd command line, so if you want to change it for your testing, do it in
Makefile.am, not here.
-->
- <level type="string" desc="Can be 0-8 (with the lowest numbers being the least verbose), or none (turns off logging), fatal, critical, error, warning, notice, information, debug, trace" default="@LOOLWSD_LOGLEVEL@">@LOOLWSD_LOGLEVEL@</level>
+ <level type="string" desc="Can be 0-8 (with the lowest numbers being the least verbose), or none (turns off logging), fatal, critical, error, warning, notice, information, debug, trace" default="@COOLWSD_LOGLEVEL@">@COOLWSD_LOGLEVEL@</level>
<most_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from the client can not set a more verbose log level than this" default="notice">notice</most_verbose_level_settable_from_client>
<least_verbose_level_settable_from_client type="string" desc="A loggingleveloverride message from a client can not set a less verbose log level than this" default="fatal">fatal</least_verbose_level_settable_from_client>
<protocol type="bool" desc="Enable minimal client-site JS protocol logging from the start">@ENABLE_DEBUG_PROTOCOL@</protocol>
<!-- lokit_sal_log example: Log WebDAV-related messages, that is interesting for debugging Insert - Image operation: "+TIMESTAMP+INFO.ucb.ucp.webdav+WARN.ucb.ucp.webdav"
See also: https://docs.libreoffice.org/sal/html/sal_log.html -->
<lokit_sal_log type="string" desc="Fine tune log messages from LOKit. Default is to suppress log messages from LOKit." default="-INFO-WARN">-INFO-WARN</lokit_sal_log>
- <file enable="@LOOLWSD_LOG_TO_FILE@">
- <!-- If you use other path than /var/log and you run loolwsd from systemd, make sure that you enable that path in loolwsd.service (ReadWritePaths). -->
- <property name="path" desc="Log file path.">@LOOLWSD_LOGFILE@</property>
+ <file enable="@COOLWSD_LOG_TO_FILE@">
+ <!-- If you use other path than /var/log and you run coolwsd from systemd, make sure that you enable that path in coolwsd.service (ReadWritePaths). -->
+ <property name="path" desc="Log file path.">@COOLWSD_LOGFILE@</property>
<property name="rotation" desc="Log file rotation strategy. See Poco FileChannel.">never</property>
<property name="archive" desc="Append either timestamp or number to the archived log filename.">timestamp</property>
<property name="compress" desc="Enable/disable log file compression.">true</property>
@@ -80,24 +80,24 @@
<property name="flush" desc="Enable/disable flushing after logging each line. May harm performance. Note that without flushing after each line, the log lines from the different processes will not appear in chronological order.">false</property>
</file>
<anonymize>
- <anonymize_user_data type="bool" desc="Enable to anonymize/obfuscate of user-data in logs. If default is true, it was forced at compile-time and cannot be disabled." default="@LOOLWSD_ANONYMIZE_USER_DATA@">@LOOLWSD_ANONYMIZE_USER_DATA@</anonymize_user_data>
+ <anonymize_user_data type="bool" desc="Enable to anonymize/obfuscate of user-data in logs. If default is true, it was forced at compile-time and cannot be disabled." default="@COOLWSD_ANONYMIZE_USER_DATA@">@COOLWSD_ANONYMIZE_USER_DATA@</anonymize_user_data>
<anonymization_salt type="uint" desc="The salt used to anonymize/obfuscate user-data in logs. Use a secret 64-bit random number." default="82589933">82589933</anonymization_salt>
</anonymize>
</logging>
<!--
Note to developers: When you do "make run", the trace_event[@enable] will be set on the
- loolwsd command line, so if you want to change it for your testing, do it in Makefile.am,
+ coolwsd command line, so if you want to change it for your testing, do it in Makefile.am,
not here.
-->
<trace_event desc="The possibility to turn on generation of a Chrome Trace Event file" enable="false">
- <path desc="Output path for the Trace Event file, to which they will be written if turned on at run-time" type="string" default="@LOOLWSD_TRACEEVENTFILE@">@LOOLWSD_TRACEEVENTFILE@</path>
+ <path desc="Output path for the Trace Event file, to which they will be written if turned on at run-time" type="string" default="@COOLWSD_TRACEEVENTFILE@">@COOLWSD_TRACEEVENTFILE@</path>
</trace_event>
<browser_logging desc="Logging in the browser console" default="@BROWSER_LOGGING@">@BROWSER_LOGGING@</browser_logging>
<trace desc="Dump commands and notifications for replay. When 'snapshot' is true, the source file is copied to the path first." enable="false">
- <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/looltrace-%.gz" compress="true" snapshot="false"></path>
+ <path desc="Output path to hold trace file and docs. Use '%' for timestamp to avoid overwriting. For example: /some/path/to/cooltrace-%.gz" compress="true" snapshot="false"></path>
<filter>
<message desc="Regex pattern of messages to exclude"></message>
</filter>
@@ -107,10 +107,10 @@
</trace>
<net desc="Network settings">
- <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, loolwsd unexpectedly listens on [::1] only.
+ <!-- On systems where localhost resolves to IPv6 [::1] address first, when net.proto is all and net.listen is loopback, coolwsd unexpectedly listens on [::1] only.
You need to change net.proto to IPv4, if you want to use 127.0.0.1. -->
<proto type="string" default="all" desc="Protocol to use IPv4, IPv6 or all for both">all</proto>
- <listen type="string" default="any" desc="Listen address that loolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
+ <listen type="string" default="any" desc="Listen address that coolwsd binds to. Can be 'any' or 'loopback'.">any</listen>
<!-- this allows you to shift all of our URLs into a sub-path from
https://my.com/browser/a123... to https://my.com/my/sub/path/browser/a123... -->
<service_root type="path" default="" desc="Prefix all the pages, websockets, etc. with this path."></service_root>
@@ -125,8 +125,8 @@
<host desc="The IPv4 private 10.0.0.0/8 subnet (Podman).">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="Ditto, but as IPv4-mapped IPv6 addresses">::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
</post_allow>
- <frame_ancestors desc="Specify who is allowed to embed the LO Online iframe (loolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
- <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by loolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>
+ <frame_ancestors desc="Specify who is allowed to embed the LO Online iframe (coolwsd and WOPI host are always allowed). Separate multiple hosts by space."></frame_ancestors>
+ <connection_timeout_secs desc="Specifies the connection, send, recv timeout in seconds for connections initiated by coolwsd (such as WOPI connections)." type="int" default="30"></connection_timeout_secs>
<!-- this setting radically changes how online works, it should not be used in a production environment -->
<proxy_prefix type="bool" default="false" desc="Enable a ProxyPrefix to be passed int through which to redirect requests"></proxy_prefix>
@@ -134,12 +134,12 @@
<ssl desc="SSL settings">
<!-- switches from https:// + wss:// to http:// + ws:// -->
- <enable type="bool" desc="Controls whether SSL encryption between loolwsd and the network is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="@ENABLE_SSL@">@ENABLE_SSL@</enable>
+ <enable type="bool" desc="Controls whether SSL encryption between coolwsd and the network is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="@ENABLE_SSL@">@ENABLE_SSL@</enable>
<!-- SSL off-load can be done in a proxy, if so disable SSL, and enable termination below in production -->
- <termination desc="Connection via proxy where loolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
- <cert_file_path desc="Path to the cert file" relative="false">/etc/loolwsd/cert.pem</cert_file_path>
- <key_file_path desc="Path to the key file" relative="false">/etc/loolwsd/key.pem</key_file_path>
- <ca_file_path desc="Path to the ca file" relative="false">/etc/loolwsd/ca-chain.cert.pem</ca_file_path>
+ <termination desc="Connection via proxy where coolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
+ <cert_file_path desc="Path to the cert file" relative="false">/etc/coolwsd/cert.pem</cert_file_path>
+ <key_file_path desc="Path to the key file" relative="false">/etc/coolwsd/key.pem</key_file_path>
+ <ca_file_path desc="Path to the ca file" relative="false">/etc/coolwsd/ca-chain.cert.pem</ca_file_path>
<cipher_list desc="List of OpenSSL ciphers to accept" default="ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"></cipher_list>
<hpkp desc="Enable HTTP Public key pinning" enable="false" report_only="false">
<max_age desc="HPKP's max-age directive - time in seconds browser should remember the pins" enable="true">1000</max_age>
@@ -191,7 +191,7 @@
</wopi>
<ssl desc="SSL settings">
<as_scheme type="bool" default="true" desc="When set we exclusively use the WOPI URI's scheme to enable SSL for storage">true</as_scheme>
- <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and loolwsd. When empty this defaults to following the ssl.enable setting"></enable>
+ <enable type="bool" desc="If as_scheme is false or not set, this can be set to force SSL encryption between storage and coolwsd. When empty this defaults to following the ssl.enable setting"></enable>
<cert_file_path desc="Path to the cert file" relative="false"></cert_file_path>
<key_file_path desc="Path to the key file" relative="false"></key_file_path>
<ca_file_path desc="Path to the ca file. If this is not empty, then SSL verification will be strict, otherwise cert of storage (WOPI-like host) will not be verified." relative="false"></ca_file_path>
diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index ba086a8b62..f6144335fc 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -12,10 +12,10 @@ CAPABILITIES = $(if @ENABLE_SETCAP@,true,false)
PARALLEL_SCRIPT = $(abs_srcdir)/run_parallel.sh
-PID_FILE=$(abs_builddir)/workdir/loolwsd.pid
+PID_FILE=$(abs_builddir)/workdir/coolwsd.pid
ERROR_LOG=$(abs_builddir)/workdir/error.log
-LOOLWSD_LOG=$(abs_builddir)/cypress/wsd_logs/loolwsd.log
-LOOLWSD_OUTPUT=$(abs_builddir)/cypress/wsd_logs/loolwsd_output.log
+COOLWSD_LOG=$(abs_builddir)/cypress/wsd_logs/coolwsd.log
+COOLWSD_OUTPUT=$(abs_builddir)/cypress/wsd_logs/coolwsd_output.log
SUPPORT_FILE_ABS = $(abs_srcdir)/support/index.js
SUPPORT_FILE = $(if $(findstring $(abs_srcdir),$(abs_builddir)),support/index.js,$(SUPPORT_FILE_ABS))
@@ -101,7 +101,7 @@ $(PID_FILE): @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
$(if $(HEADLESS_BUILD),$(call start_Xvfb),)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(MOBILE_TEST_FILES_DONE): $(PID_FILE) $(DESKTOP_TEST_FILES_DONE)
$(if $(PARALLEL_BUILD),\
@@ -149,7 +149,7 @@ define run_JS_error_check
@echo
endef
-define start_loolwsd
+define start_coolwsd
$(eval FREE_PORT:=$(shell $(GET_PORT_BINARY) --host=127.0.0.1 $(ALLOWED_PORTS)))
$(if $(findstring php-proxy, $(CYPRESS_INTEGRATION)),\
$(if $(findstring $(PHP_PROXY_PORT),$(FREE_PORT)),,$(error CypressError: $(PHP_PROXY_PORT) port is unavailable!)))
@@ -160,7 +160,7 @@ define start_loolwsd
@echo "Launching coolwsd..."
@fc-cache "@LO_PATH@"/share/fonts/truetype
@echo
- @mkdir -p $(dir $(LOOLWSD_OUTPUT))
+ @mkdir -p $(dir $(COOLWSD_OUTPUT))
../coolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
--o:security.capabilities="$(CAPABILITIES)" \
@@ -175,9 +175,9 @@ define start_loolwsd
--o:security.enable_macros_execution=true \
--port=$(FREE_PORT) \
--pidfile=$(PID_FILE) \
- --o:logging.file.property[0]=$(LOOLWSD_LOG) \
+ --o:logging.file.property[0]=$(COOLWSD_LOG) \
$(if $(findstring php-proxy, $(CYPRESS_INTEGRATION)),--o:net.proxy_prefix=true) \
- > $(LOOLWSD_OUTPUT) 2>&1 &
+ > $(COOLWSD_OUTPUT) 2>&1 &
@$(WAIT_ON_BINARY) http://localhost:$(FREE_PORT) --timeout 60000
@echo
endef
@@ -224,14 +224,14 @@ clean-local:
check-mobile: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_mobile_tests,$(spec))
@$(KILL_COMMAND) || true
run-mobile: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_interactive_mobile,$(spec)) || true
@$(KILL_COMMAND) || true
@@ -239,7 +239,7 @@ MOBILE_CONFIG = \
integrationFolder=$(MOBILE_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(MOBILE_USER_AGENT)
MOBILE_ENV = \
- DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MOBILE_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
+ DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MOBILE_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
# Run one mobile test / all mobile tests in interactive test runner.
# Parameters:
@@ -283,14 +283,14 @@ endef
check-desktop: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_desktop_tests,$(spec))
@$(KILL_COMMAND) || true
run-desktop: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_interactive_desktop,$(spec)) || true
@$(KILL_COMMAND) || true
@@ -298,7 +298,7 @@ DESKTOP_CONFIG = \
integrationFolder=$(DESKTOP_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(DESKTOP_USER_AGENT)
DESKTOP_ENV = \
- DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(DESKTOP_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
+ DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(DESKTOP_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
# Run one desktop test / all desktop tests in interactive test runner.
# Parameters:
@@ -341,7 +341,7 @@ endef
check-multi: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(if $(spec), \
$(call run_multiuser_test,$(spec)), \
$(call run_all_multiuser_tests))
@@ -350,7 +350,7 @@ check-multi: @JAILS_PATH@ $(NODE_BINS)
run-multi: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_interactive_multiuser,$(spec)) || true
@$(KILL_COMMAND) || true
@@ -358,7 +358,7 @@ MULTIUSER_CONFIG = \
integrationFolder=$(MULTIUSER_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(DESKTOP_USER_AGENT),defaultCommandTimeout=30000,retries=0
MULTIUSER_ENV = \
- DATA_FOLDER=$(MULTIUSER_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
+ DATA_FOLDER=$(MULTIUSER_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
# Run all multi-user tests in headless mode.
# Parameters:
@@ -409,7 +409,7 @@ do-interfer-mobile-check-log: do-interfer-mobile-check
do-interfer-mobile-check: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(if $(spec), \
$(call run_mobile_interference_test,$(spec)), \
$(call run_mobile_interference_tests))
@@ -418,7 +418,7 @@ do-interfer-mobile-check: @JAILS_PATH@ $(NODE_BINS)
run-interfer-mobile: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
@echo
@echo "Running interfer mobile test in interactive test runner..."
@echo
@@ -437,13 +437,13 @@ INTERFER_MOBILE_CONFIG1 = \
integrationFolder=$(MOBILE_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(MOBILE_USER_AGENT),defaultCommandTimeout=30000
INTERFER_MOBILE_ENV1 = \
- DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION),INTERFERENCE_TEST=true
+ DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION),INTERFERENCE_TEST=true
INTERFER_MOBILE_CONFIG2 = \
supportFile=$(SUPPORT_FILE),userAgent=$(MOBILE_USER_AGENT),defaultCommandTimeout=30000,retries=0
INTERFER_MOBILE_ENV2 = \
- DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
+ DATA_FOLDER=$(MOBILE_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
# Run all mobile interference tests in headless mode.
define run_mobile_interference_tests
@@ -482,7 +482,7 @@ do-interfer-desktop-check-log: do-interfer-desktop-check
do-interfer-desktop-check: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(if $(spec), \
$(call run_desktop_interference_test,$(spec)), \
$(call run_desktop_interference_tests))
@@ -491,7 +491,7 @@ do-interfer-desktop-check: @JAILS_PATH@ $(NODE_BINS)
run-interfer-desktop: @JAILS_PATH@ $(NODE_BINS)
$(call cleanup_before_run)
$(call run_JS_error_check)
- $(call start_loolwsd)
+ $(call start_coolwsd)
@echo
@echo "Running interfer desktop test in interactive test runner..."
@echo
@@ -510,13 +510,13 @@ INTERFER_DESKTOP_CONFIG1 = \
integrationFolder=$(DESKTOP_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(DESKTOP_USER_AGENT),defaultCommandTimeout=30000
INTERFER_DESKTOP_ENV1 = \
- DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION),INTERFERENCE_TEST=true
+ DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION),INTERFERENCE_TEST=true
INTERFER_DESKTOP_CONFIG2 = \
supportFile=$(SUPPORT_FILE),userAgent=$(DESKTOP_USER_AGENT),defaultCommandTimeout=30000,retries=0
INTERFER_DESKTOP_ENV2 = \
- DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(LOOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
+ DATA_FOLDER=$(DESKTOP_DATA_FOLDER),DATA_WORKDIR=$(MULTIUSER_DATA_WORKDIR),WSD_VERSION_HASH=$(COOLWSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)",INTEGRATION=$(CYPRESS_INTEGRATION)
# Run all desktop interference test in headless mode.
define run_desktop_interference_tests
@@ -563,7 +563,7 @@ do-run-cov: @JAILS_PATH@ $(NODE_BINS)
@echo "Run all tests..."
@echo
$(call cleanup_before_run)
- $(call start_loolwsd)
+ $(call start_coolwsd)
$(call run_desktop_tests,,,COVERAGE_RUN="1")
$(call run_mobile_tests,,,COVERAGE_RUN="1")
$(call run_all_multiuser_tests,COVERAGE_RUN="1")
diff --git a/cypress_test/README b/cypress_test/README
index c02d54d574..030d82c4fd 100644
--- a/cypress_test/README
+++ b/cypress_test/README
@@ -324,9 +324,9 @@ Used Packages
test code.
- get-port-cli:
- Used by the build system to find an available port to use as loolwsd's
+ Used by the build system to find an available port to use as coolwsd's
communication port.
- wait-on:
- Used by the build system to wait on loolwsd server to start before
+ Used by the build system to wait on coolwsd server to start before
tests are started.
diff --git a/debian/changelog b/debian/changelog
index a06771169f..9c402a4a93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,16 @@
-loolwsd (21.11.0.1-1) unstable; urgency=medium
+coolwsd (21.11.0.1-1) unstable; urgency=medium
* https://github.com/CollaboraOnline/online/releases/tag/cp-21.11.0-1
-- Andras Timar <andras.timar@collabora.com> Thu, 11 Nov 2021 15:40:00 +0100
-loolwsd (21.11.0.0-1) unstable; urgency=medium
+coolwsd (21.11.0.0-1) unstable; urgency=medium
* https://github.com/CollaboraOnline/online/releases/tag/cp-21.11.0-0
-- Andras Timar <andras.timar@collabora.com> Tue, 26 Oct 2021 13:40:00 +0100
-loolwsd (21.06.2.0-1) unstable; urgency=medium
+coolwsd (21.06.2.0-1) unstable; urgency=medium
* https://github.com/CollaboraOnline/online/releases/tag/cp-21.06.2-0
diff --git a/debian/control b/debian/control
index ffcca5f52f..88bf7dae3c 100644
--- a/debian/control
+++ b/debian/control
@@ -1,11 +1,11 @@
-Source: loolwsd
+Source: coolwsd
Section: web
Priority: optional
Maintainer: Andras Timar <andras.timar@collabora.com>
Build-Depends: debhelper (>= 9.20160709) | dh-systemd (>= 1.3), libcap-dev, libcap2-bin, libpcre3-dev, libpng-dev, linux-libc-dev, nodejs, python3-polib, python3-lxml, fontconfig, libpam-dev, libcppunit-dev, pkg-config, devscripts, m4
Standards-Version: 3.9.7
-Package: loolwsd
+Package: coolwsd
Section: web
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
@@ -24,6 +24,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
collaboraofficebasis-extension-pdf-import,
collaboraofficebasis-ooolinguistic,
collaboraofficebasis-math
+Conflicts: loolwsd
+Replaces: loolwsd
Description: Collabora Online WebSocket Daemon
- LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
+ COOLWSD is a daemon that talks to web browser clients and provides LibreOffice
services.
diff --git a/debian/loolwsd.postinst.in b/debian/coolwsd.postinst.in
index 1e550db614..608028bfc9 100644
--- a/debian/loolwsd.postinst.in
+++ b/debian/coolwsd.postinst.in
@@ -8,8 +8,8 @@ case "$1" in
setcap cap_sys_admin=ep /usr/bin/coolmount || true
adduser --quiet --system --group --home /opt/cool cool
- chown cool: /etc/loolwsd/loolwsd.xml
- chmod 640 /etc/loolwsd/loolwsd.xml
+ chown cool: /etc/coolwsd/coolwsd.xml
+ chmod 640 /etc/coolwsd/coolwsd.xml
# We assume that the LibreOffice to be used is built TDF-style
# and installs in @LO_PATH@, and that /opt/cool is
@@ -24,9 +24,9 @@ case "$1" in
coolwsd-systemplate-setup /opt/cool/systemplate @LO_PATH@ >/dev/null 2>&1
coolwsd-generate-proof-key >/dev/null 2>&1
- cat << EOF > /etc/apt/apt.conf.d/25loolwsd
+ cat << EOF > /etc/apt/apt.conf.d/25coolwsd
// Rebuild systemplate of @APP_NAME@
-DPkg::Post-Invoke { "echo Updating loolwsd systemplate;coolwsd-systemplate-setup /opt/cool/systemplate @LO_PATH@ >/dev/null 2>&1 || true"; };
+DPkg::Post-Invoke { "echo Updating coolwsd systemplate;coolwsd-systemplate-setup /opt/cool/systemplate @LO_PATH@ >/dev/null 2>&1 || true"; };
EOF
;;
diff --git a/debian/coolwsd.postrm b/debian/coolwsd.postrm
new file mode 100644
index 0000000000..9f486f9808
--- /dev/null
+++ b/debian/coolwsd.postrm
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+rm -f /etc/apt/apt.conf.d/25coolwsd
diff --git a/debian/coolwsd.preinst b/debian/coolwsd.preinst
new file mode 100644
index 0000000000..b8e1c7be4c
--- /dev/null
+++ b/debian/coolwsd.preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# Stop any running coolwsd process
+if [ -d /run/systemd/system ]; then
+ deb-systemd-invoke stop coolwsd.service >/dev/null || true
+fi
+
+#DEBHELPER#
diff --git a/loolwsd.service b/debian/coolwsd.service
index bfea55fa3f..a452f33e01 100644
--- a/loolwsd.service
+++ b/debian/coolwsd.service
@@ -3,8 +3,8 @@ Description=Collabora Online WebSocket Daemon
After=network.target
[Service]
-EnvironmentFile=-/etc/sysconfig/loolwsd
-ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/loolwsd
+EnvironmentFile=-/etc/sysconfig/coolwsd
+ExecStart=/usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd
KillSignal=SIGINT
TimeoutStopSec=120
User=cool
diff --git a/debian/copyright b/debian/copyright
index 949a953ac5..abe4b12cb5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,5 +1,5 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
-Name: loolwsd
+Name: coolwsd
Maintainer: Andras Timar <andras.timar@collabora.com>
Source: https://github.com/CollaboraOnline/online.git
diff --git a/debian/loolwsd.postrm b/debian/loolwsd.postrm
deleted file mode 100644
index 784ad65bab..0000000000
--- a/debian/loolwsd.postrm
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-set -e
-
-rm -f /etc/apt/apt.conf.d/25loolwsd
diff --git a/debian/loolwsd.preinst b/debian/loolwsd.preinst
deleted file mode 100644
index 2778ec73b4..0000000000
--- a/debian/loolwsd.preinst
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Stop any running loolwsd process
-if [ -d /run/systemd/system ]; then
- deb-systemd-invoke stop loolwsd.service >/dev/null || true
-fi
-
-#DEBHELPER#
diff --git a/docker/from-packages/scripts/install-collabora-online-rhel8.sh b/docker/from-packages/scripts/install-collabora-online-rhel8.sh
index d454d59831..d86e352661 100755
--- a/docker/from-packages/scripts/install-collabora-online-rhel8.sh
+++ b/docker/from-packages/scripts/install-collabora-online-rhel8.sh
@@ -44,7 +44,7 @@ else
corever=6.4
fi
-dnf install -y loolwsd collaboraoffice$corever-dict* collaboraofficebasis$corever-ar collaboraofficebasis$corever-as collaboraofficebasis$corever-ast collaboraofficebasis$corever-bg collaboraofficebasis$corever-bn-IN collaboraofficebasis$corever-br collaboraofficebasis$corever-ca collaboraofficebasis$corever-calc collaboraofficebasis$corever-ca-valencia collaboraofficebasis$corever-core collaboraofficebasis$corever-cs collaboraofficebasis$corever-cy collaboraofficebasis$corever-da collaboraofficebasis$corever-de collaboraofficebasis$corever-draw collaboraofficebasis$corever-el collaboraofficebasis$corever-en-GB collaboraofficebasis$corever-en-US collaboraofficebasis$corever-es collaboraofficebasis$corever-et collaboraofficebasis$corever-eu collaboraofficebasis$corever-extension-pdf-import collaboraofficebasis$corever-fi collaboraofficebasis$corever-fr collaboraofficebasis$corever-ga collaboraofficebasis$corever-gd collaboraofficebasis$corever-gl collaboraofficebasis$corever-graphicfilter collaboraofficebasis$corever-gu collaboraofficebasis$corever-he collaboraofficebasis$corever-hi collaboraofficebasis$corever-hr collaboraofficebasis$corever-hu collaboraofficebasis$corever-id collaboraofficebasis$corever-images collaboraofficebasis$corever-impress collaboraofficebasis$corever-is collaboraofficebasis$corever-it collaboraofficebasis$corever-ja collaboraofficebasis$corever-km collaboraofficebasis$corever-kn collaboraofficebasis$corever-ko collaboraofficebasis$corever-lt collaboraofficebasis$corever-lv collaboraofficebasis$corever-ml collaboraofficebasis$corever-mr collaboraofficebasis$corever-nb collaboraofficebasis$corever-nl collaboraofficebasis$corever-nn collaboraofficebasis$corever-oc collaboraofficebasis$corever-ooofonts collaboraofficebasis$corever-ooolinguistic collaboraofficebasis$corever-or collaboraofficebasis$corever-pa-IN collaboraofficebasis$corever-pl collaboraofficebasis$corever-pt collaboraofficebasis$corever-pt-BR collaboraofficebasis$corever-ro collaboraofficebasis$corever-ru collaboraofficebasis$corever-sk collaboraofficebasis$corever-sl collaboraofficebasis$corever-sr collaboraofficebasis$corever-sr-Latn collaboraofficebasis$corever-sv collaboraofficebasis$corever-ta collaboraofficebasis$corever-te collaboraofficebasis$corever-tr collaboraofficebasis$corever-uk collaboraofficebasis$corever-vi collaboraofficebasis$corever-writer collaboraofficebasis$corever-zh-CN collaboraofficebasis$corever-zh-TW
+dnf install -y coolwsd collaboraoffice$corever-dict* collaboraofficebasis$corever-ar collaboraofficebasis$corever-as collaboraofficebasis$corever-ast collaboraofficebasis$corever-bg collaboraofficebasis$corever-bn-IN collaboraofficebasis$corever-br collaboraofficebasis$corever-ca collaboraofficebasis$corever-calc collaboraofficebasis$corever-ca-valencia collaboraofficebasis$corever-core collaboraofficebasis$corever-cs collaboraofficebasis$corever-cy collaboraofficebasis$corever-da collaboraofficebasis$corever-de collaboraofficebasis$corever-draw collaboraofficebasis$corever-el collaboraofficebasis$corever-en-GB collaboraofficebasis$corever-en-US collaboraofficebasis$corever-es collaboraofficebasis$corever-et collaboraofficebasis$corever-eu collaboraofficebasis$corever-extension-pdf-import collaboraofficebasis$corever-fi collaboraofficebasis$corever-fr collaboraofficebasis$corever-ga collaboraofficebasis$corever-gd collaboraofficebasis$corever-gl collaboraofficebasis$corever-graphicfilter collaboraofficebasis$corever-gu collaboraofficebasis$corever-he collaboraofficebasis$corever-hi collaboraofficebasis$corever-hr collaboraofficebasis$corever-hu collaboraofficebasis$corever-id collaboraofficebasis$corever-images collaboraofficebasis$corever-impress collaboraofficebasis$corever-is collaboraofficebasis$corever-it collaboraofficebasis$corever-ja collaboraofficebasis$corever-km collaboraofficebasis$corever-kn collaboraofficebasis$corever-ko collaboraofficebasis$corever-lt collaboraofficebasis$corever-lv collaboraofficebasis$corever-ml collaboraofficebasis$corever-mr collaboraofficebasis$corever-nb collaboraofficebasis$corever-nl collaboraofficebasis$corever-nn collaboraofficebasis$corever-oc collaboraofficebasis$corever-ooofonts collaboraofficebasis$corever-ooolinguistic collaboraofficebasis$corever-or collaboraofficebasis$corever-pa-IN collaboraofficebasis$corever-pl collaboraofficebasis$corever-pt collaboraofficebasis$corever-pt-BR collaboraofficebasis$corever-ro collaboraofficebasis$corever-ru collaboraofficebasis$corever-sk collaboraofficebasis$corever-sl collaboraofficebasis$corever-sr collaboraofficebasis$corever-sr-Latn collaboraofficebasis$corever-sv collaboraofficebasis$corever-ta collaboraofficebasis$corever-te collaboraofficebasis$corever-tr collaboraofficebasis$corever-uk collaboraofficebasis$corever-vi collaboraofficebasis$corever-writer collaboraofficebasis$corever-zh-CN collaboraofficebasis$corever-zh-TW
if [ "$type" == "cool" ] || [ "$type" == "key" ]; then
dnf -y install collabora-online-brand
@@ -52,7 +52,7 @@ else
dnf -y install CODE-brand
fi
-# Install inotifywait and killall to automatic restart loolwsd, if loolwsd.xml changes
+# Install inotifywait and killall to automatic restart coolwsd, if coolwsd.xml changes
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y inotify-tools psmisc perl
@@ -60,12 +60,12 @@ dnf install -y inotify-tools psmisc perl
dnf clean all
# Remove WOPI Proof key generated by the package, we need unique key for each container
-rm -rf /etc/loolwsd/proof_key*
+rm -rf /etc/coolwsd/proof_key*
# Fix permissions
# cf. start-collabora-online.sh that is run by cool user
# # Fix domain name resolution from jails
# cp /etc/resolv.conf /etc/hosts /opt/cool/systemplate/etc/
chown cool:cool /opt/cool/systemplate/etc/hosts /opt/cool/systemplate/etc/resolv.conf
-# generated ssl cert/key and WOPI proof key go into /etc/loolwsd
-chown cool:cool /etc/loolwsd
+# generated ssl cert/key and WOPI proof key go into /etc/coolwsd
+chown cool:cool /etc/coolwsd
diff --git a/docker/from-packages/scripts/install-collabora-online-ubuntu.sh b/docker/from-packages/scripts/install-collabora-online-ubuntu.sh
index 28e4d0278f..5d1976b8f9 100755
--- a/docker/from-packages/scripts/install-collabora-online-ubuntu.sh
+++ b/docker/from-packages/scripts/install-collabora-online-ubuntu.sh
@@ -60,7 +60,7 @@ else
corever=6.4
fi
-apt-get -y install loolwsd collaboraoffice$corever-dict* collaboraofficebasis$corever-ar collaboraofficebasis$corever-as collaboraofficebasis$corever-ast collaboraofficebasis$corever-bg collaboraofficebasis$corever-bn-in collaboraofficebasis$corever-br collaboraofficebasis$corever-ca collaboraofficebasis$corever-calc collaboraofficebasis$corever-ca-valencia collaboraofficebasis$corever-core collaboraofficebasis$corever-cs collaboraofficebasis$corever-cy collaboraofficebasis$corever-da collaboraofficebasis$corever-de collaboraofficebasis$corever-draw collaboraofficebasis$corever-el collaboraofficebasis$corever-en-gb collaboraofficebasis$corever-en-us collaboraofficebasis$corever-es collaboraofficebasis$corever-et collaboraofficebasis$corever-eu collaboraofficebasis$corever-extension-pdf-import collaboraofficebasis$corever-fi collaboraofficebasis$corever-fr collaboraofficebasis$corever-ga collaboraofficebasis$corever-gd collaboraofficebasis$corever-gl collaboraofficebasis$corever-graphicfilter collaboraofficebasis$corever-gu collaboraofficebasis$corever-he collaboraofficebasis$corever-hi collaboraofficebasis$corever-hr collaboraofficebasis$corever-hu collaboraofficebasis$corever-id collaboraofficebasis$corever-images collaboraofficebasis$corever-impress collaboraofficebasis$corever-is collaboraofficebasis$corever-it collaboraofficebasis$corever-ja collaboraofficebasis$corever-km collaboraofficebasis$corever-kn collaboraofficebasis$corever-ko collaboraofficebasis$corever-lt collaboraofficebasis$corever-lv collaboraofficebasis$corever-ml collaboraofficebasis$corever-mr collaboraofficebasis$corever-nb collaboraofficebasis$corever-nl collaboraofficebasis$corever-nn collaboraofficebasis$corever-oc collaboraofficebasis$corever-ooofonts collaboraofficebasis$corever-ooolinguistic collaboraofficebasis$corever-or collaboraofficebasis$corever-pa-in collaboraofficebasis$corever-pl collaboraofficebasis$corever-pt collaboraofficebasis$corever-pt-br collaboraofficebasis$corever-ro collaboraofficebasis$corever-ru collaboraofficebasis$corever-sk collaboraofficebasis$corever-sl collaboraofficebasis$corever-sr collaboraofficebasis$corever-sr-latn collaboraofficebasis$corever-sv collaboraofficebasis$corever-ta collaboraofficebasis$corever-te collaboraofficebasis$corever-tr collaboraofficebasis$corever-uk collaboraofficebasis$corever-vi collaboraofficebasis$corever-writer collaboraofficebasis$corever-zh-cn collaboraofficebasis$corever-zh-tw
+apt-get -y install coolwsd collaboraoffice$corever-dict* collaboraofficebasis$corever-ar collaboraofficebasis$corever-as collaboraofficebasis$corever-ast collaboraofficebasis$corever-bg collaboraofficebasis$corever-bn-in collaboraofficebasis$corever-br collaboraofficebasis$corever-ca collaboraofficebasis$corever-calc collaboraofficebasis$corever-ca-valencia collaboraofficebasis$corever-core collaboraofficebasis$corever-cs collaboraofficebasis$corever-cy collaboraofficebasis$corever-da collaboraofficebasis$corever-de collaboraofficebasis$corever-draw collaboraofficebasis$corever-el collaboraofficebasis$corever-en-gb collaboraofficebasis$corever-en-us collaboraofficebasis$corever-es collaboraofficebasis$corever-et collaboraofficebasis$corever-eu collaboraofficebasis$corever-extension-pdf-import collaboraofficebasis$corever-fi collaboraofficebasis$corever-fr collaboraofficebasis$corever-ga collaboraofficebasis$corever-gd collaboraofficebasis$corever-gl collaboraofficebasis$corever-graphicfilter collaboraofficebasis$corever-gu collaboraofficebasis$corever-he collaboraofficebasis$corever-hi collaboraofficebasis$corever-hr collaboraofficebasis$corever-hu collaboraofficebasis$corever-id collaboraofficebasis$corever-images collaboraofficebasis$corever-impress collaboraofficebasis$corever-is collaboraofficebasis$corever-it collaboraofficebasis$corever-ja collaboraofficebasis$corever-km collaboraofficebasis$corever-kn collaboraofficebasis$corever-ko collaboraofficebasis$corever-lt collaboraofficebasis$corever-lv collaboraofficebasis$corever-ml collaboraofficebasis$corever-mr collaboraofficebasis$corever-nb collaboraofficebasis$corever-nl collaboraofficebasis$corever-nn collaboraofficebasis$corever-oc collaboraofficebasis$corever-ooofonts collaboraofficebasis$corever-ooolinguistic collaboraofficebasis$corever-or collaboraofficebasis$corever-pa-in collaboraofficebasis$corever-pl collaboraofficebasis$corever-pt collaboraofficebasis$corever-pt-br collaboraofficebasis$corever-ro collaboraofficebasis$corever-ru collaboraofficebasis$corever-sk collaboraofficebasis$corever-sl collaboraofficebasis$corever-sr collaboraofficebasis$corever-sr-latn collaboraofficebasis$corever-sv collaboraofficebasis$corever-ta collaboraofficebasis$corever-te collaboraofficebasis$corever-tr collaboraofficebasis$corever-uk collaboraofficebasis$corever-vi collaboraofficebasis$corever-writer collaboraofficebasis$corever-zh-cn collaboraofficebasis$corever-zh-tw
if [ "$type" == "cool" ] || [ "$type" == "key" ]; then
apt-get -y install collabora-online-brand
@@ -68,19 +68,19 @@ else
apt-get -y install code-brand
fi
-# Install inotifywait and killall to automatic restart loolwsd, if loolwsd.xml changes
+# Install inotifywait and killall to automatic restart coolwsd, if coolwsd.xml changes
apt-get -y install inotify-tools psmisc
# Cleanup
rm -rf /var/lib/apt/lists/*
# Remove WOPI Proof key generated by the package, we need unique key for each container
-rm -rf /etc/loolwsd/proof_key*
+rm -rf /etc/coolwsd/proof_key*
# Fix permissions
# cf. start-collabora-online.sh that is run by cool user
# # Fix domain name resolution from jails
# cp /etc/resolv.conf /etc/hosts /opt/cool/systemplate/etc/
chown cool:cool /opt/cool/systemplate/etc/hosts /opt/cool/systemplate/etc/resolv.conf
-# generated ssl cert/key and WOPI proof key go into /etc/loolwsd
-chown cool:cool /etc/loolwsd
+# generated ssl cert/key and WOPI proof key go into /etc/coolwsd
+chown cool:cool /etc/coolwsd
diff --git a/docker/from-packages/scripts/start-collabora-online.sh b/docker/from-packages/scripts/start-collabora-online.sh
index 301fadbb59..9fc2d6e987 100755
--- a/docker/from-packages/scripts/start-collabora-online.sh
+++ b/docker/from-packages/scripts/start-collabora-online.sh
@@ -24,9 +24,9 @@ else
openssl req -key certs/servers/localhost/privkey.pem -new -sha256 -out certs/tmp/localhost.csr.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=${cert_domain}"
fi
openssl x509 -req -in certs/tmp/localhost.csr.pem -CA certs/ca/root.crt.pem -CAkey certs/ca/root.key.pem -CAcreateserial -out certs/servers/localhost/cert.pem -days 9131
-mv certs/servers/localhost/privkey.pem /etc/loolwsd/key.pem
-mv certs/servers/localhost/cert.pem /etc/loolwsd/cert.pem
-mv certs/ca/root.crt.pem /etc/loolwsd/ca-chain.cert.pem
+mv certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
+mv certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
+mv certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
fi
# Disable warning/info messages of LOKit by default
@@ -36,19 +36,19 @@ fi
# Replace trusted host and set admin username and password - only if they are set
if test -n "${domain}"; then
- perl -pi -e "s/localhost<\/host>/${domain}<\/host>/g" /etc/loolwsd/loolwsd.xml
+ perl -pi -e "s/localhost<\/host>/${domain}<\/host>/g" /etc/coolwsd/coolwsd.xml
fi
if test -n "${username}"; then
- perl -pi -e "s/<username (.*)>.*<\/username>/<username \1>${username}<\/username>/" /etc/loolwsd/loolwsd.xml
+ perl -pi -e "s/<username (.*)>.*<\/username>/<username \1>${username}<\/username>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${password}"; then
- perl -pi -e "s/<password (.*)>.*<\/password>/<password \1>${password}<\/password>/" /etc/loolwsd/loolwsd.xml
+ perl -pi -e "s/<password (.*)>.*<\/password>/<password \1>${password}<\/password>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${server_name}"; then
- perl -pi -e "s/<server_name (.*)>.*<\/server_name>/<server_name \1>${server_name}<\/server_name>/" /etc/loolwsd/loolwsd.xml
+ perl -pi -e "s/<server_name (.*)>.*<\/server_name>/<server_name \1>${server_name}<\/server_name>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${dictionaries}"; then
- perl -pi -e "s/<allowed_languages (.*)>.*<\/allowed_languages>/<allowed_languages \1>${dictionaries:-de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru}<\/allowed_languages>/" /etc/loolwsd/loolwsd.xml
+ perl -pi -e "s/<allowed_languages (.*)>.*<\/allowed_languages>/<allowed_languages \1>${dictionaries:-de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru}<\/allowed_languages>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${user_interface_mode}"; then
extra_params="${extra_params} --o:user_interface.mode=${user_interface_mode}"
@@ -56,15 +56,15 @@ else
extra_params="${extra_params} --o:user_interface.mode=notebookbar"
fi
-# Restart when /etc/loolwsd/loolwsd.xml changes
+# Restart when /etc/coolwsd/coolwsd.xml changes
[ -x /usr/bin/inotifywait -a /usr/bin/killall ] && (
- /usr/bin/inotifywait -e modify /etc/loolwsd/loolwsd.xml
- echo "$(ls -l /etc/loolwsd/loolwsd.xml) modified --> restarting"
- /usr/bin/killall -1 loolwsd
+ /usr/bin/inotifywait -e modify /etc/coolwsd/coolwsd.xml
+ echo "$(ls -l /etc/coolwsd/coolwsd.xml) modified --> restarting"
+ /usr/bin/killall -1 coolwsd
) &
# Generate WOPI proof key
coolwsd-generate-proof-key
-# Start loolwsd
-exec /usr/bin/loolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/loolwsd --o:logging.color=false ${extra_params}
+# Start coolwsd
+exec /usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:logging.color=false ${extra_params}
diff --git a/docker/from-source/Debian b/docker/from-source/Debian
index 9fcb2734a4..2a5451acb4 100644
--- a/docker/from-source/Debian
+++ b/docker/from-source/Debian
@@ -19,7 +19,7 @@ RUN apt-get update && \
# copy freshly built LOKit and Collabora Online
COPY /instdir /
-# copy the shell script which can start Collabora Online (loolwsd)
+# copy the shell script which can start Collabora Online (coolwsd)
COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
@@ -30,10 +30,10 @@ RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
- touch /var/log/loolwsd.log && \
- chown cool:cool /var/log/loolwsd.log && \
+ touch /var/log/coolwsd.log && \
+ chown cool:cool /var/log/coolwsd.log && \
chown -R cool:cool /opt/ && \
- chown -R cool:cool /etc/loolwsd
+ chown -R cool:cool /etc/coolwsd
EXPOSE 9980
diff --git a/docker/from-source/Ubuntu b/docker/from-source/Ubuntu
index eb3a89fac8..5cffc124e6 100644
--- a/docker/from-source/Ubuntu
+++ b/docker/from-source/Ubuntu
@@ -20,7 +20,7 @@ RUN apt-get update && \
# copy freshly built LOKit and Collabora Online
COPY /instdir /
-# copy the shell script which can start Collabora Online (loolwsd)
+# copy the shell script which can start Collabora Online (coolwsd)
COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
@@ -31,10 +31,10 @@ RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
- touch /var/log/loolwsd.log && \
- chown cool:cool /var/log/loolwsd.log && \
+ touch /var/log/coolwsd.log && \
+ chown cool:cool /var/log/coolwsd.log && \
chown -R cool:cool /opt/ && \
- chown -R cool:cool /etc/loolwsd
+ chown -R cool:cool /etc/coolwsd
EXPOSE 9980
diff --git a/docker/from-source/build.sh b/docker/from-source/build.sh
index 478ae57643..862cfff4aa 100755
--- a/docker/from-source/build.sh
+++ b/docker/from-source/build.sh
@@ -117,7 +117,7 @@ fi
mkdir -p "$INSTDIR"/opt/
cp -a core/instdir "$INSTDIR"/opt/lokit
-##### loolwsd & cool #####
+##### coolwsd & cool #####
# build
( cd online && ./autogen.sh ) || exit 1
diff --git a/docker/from-source/openSUSE b/docker/from-source/openSUSE
index 4d08e1eaa0..567a414765 100644
--- a/docker/from-source/openSUSE
+++ b/docker/from-source/openSUSE
@@ -14,7 +14,7 @@ RUN zypper ref && \
# copy freshly built LOKit and Collabora Online
COPY /instdir /
-# copy the shell script which can start Collabora Online (loolwsd)
+# copy the shell script which can start Collabora Online (coolwsd)
COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
@@ -26,10 +26,10 @@ RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
- touch /var/log/loolwsd.log && \
- chown cool:cool /var/log/loolwsd.log && \
+ touch /var/log/coolwsd.log && \
+ chown cool:cool /var/log/coolwsd.log && \
chown -R cool:cool /opt/ && \
- chown -R cool:cool /etc/loolwsd
+ chown -R cool:cool /etc/coolwsd
EXPOSE 9980
diff --git a/etc/apache2/loolwsd.conf b/etc/apache2/coolwsd.conf
index 0d6b3802d9..4796f5e5d5 100644
--- a/etc/apache2/loolwsd.conf
+++ b/etc/apache2/coolwsd.conf
@@ -1,5 +1,5 @@
# Apache2 reverse proxy configuration for Collabora Online
-# Internet <-- SSL --> Reverse Proxy <-- No SSL --> loolwsd
+# Internet <-- SSL --> Reverse Proxy <-- No SSL --> coolwsd
# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, and proxy_http.
# Create a virtual host for Collabora Online and include this configuration file.
@@ -11,7 +11,7 @@
# keep the host
ProxyPreserveHost On
- # static html, js, images, etc. served from loolwsd
+ # static html, js, images, etc. served from coolwsd
# browser is the client part of Collabora Online
ProxyPass /browser http://127.0.0.1:9980/browser retry=0
ProxyPassReverse /browser http://127.0.0.1:9980/browser
diff --git a/etc/nginx/loolwsd.conf b/etc/nginx/coolwsd.conf
index b0fb7105bd..b0fb7105bd 100644
--- a/etc/nginx/loolwsd.conf
+++ b/etc/nginx/coolwsd.conf
diff --git a/fuzzer/ClientSession.cpp b/fuzzer/ClientSession.cpp
index e7a3f30584..068be6faa5 100644
--- a/fuzzer/ClientSession.cpp
+++ b/fuzzer/ClientSession.cpp
@@ -6,7 +6,7 @@
bool DoInitialization()
{
- LOOLWSD::ChildRoot = "/fuzz/child-root";
+ COOLWSD::ChildRoot = "/fuzz/child-root";
return true;
}
diff --git a/fuzzer/README b/fuzzer/README
index 9425e56c94..656a6e0869 100644
--- a/fuzzer/README
+++ b/fuzzer/README
@@ -3,7 +3,7 @@ environment (currently enables both asan and ubsan).
online.git can be built the usual way, just the additional `--enable-fuzzers`
flag is needed to build the fuzzers. It is useful to do this in a separate
-build tree, since the fuzzers config doesn't produce a `loolwsd` binary.
+build tree, since the fuzzers config doesn't produce a `coolwsd` binary.
Run the fuzzers like this:
diff --git a/fuzzer/data/loolclient b/fuzzer/data/coolclient
index 4c2015d21b..4c2015d21b 100644
--- a/fuzzer/data/loolclient
+++ b/fuzzer/data/coolclient
diff --git a/fuzzer/data/crash-70dbba08f3353e34ddf3b12d78f8204e104b20bd b/fuzzer/data/crash-70dbba08f3353e34ddf3b12d78f8204e104b20bd
index 27ae758098..b1c188edae 100644
--- a/fuzzer/data/crash-70dbba08f3353e34ddf3b12d78f8204e104b20bd
+++ b/fuzzer/data/crash-70dbba08f3353e34ddf3b12d78f8204e104b20bd
Binary files differ
diff --git a/fuzzer/data/crash-ee6440c94cb4f4f7f902d3b28d607870639d910f b/fuzzer/data/crash-ee6440c94cb4f4f7f902d3b28d607870639d910f
index 6dd695dc86..19f8add348 100644
--- a/fuzzer/data/crash-ee6440c94cb4f4f7f902d3b28d607870639d910f
+++ b/fuzzer/data/crash-ee6440c94cb4f4f7f902d3b28d607870639d910f
Binary files differ
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index c0bbcbb3b4..df7a59360e 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -6,8 +6,8 @@ warning_flags = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-var
define_flags = -DMOBILEAPP=1
AM_CPPFLAGS = -pthread \
- -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
- -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
+ -DCOOLWSD_DATADIR='"@COOLWSD_DATADIR@"' \
+ -DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \
-DTOPSRCDIR='"'$(realpath ${top_srcdir})'"' \
-DGTKAPP \
${define_flags} \
@@ -38,7 +38,7 @@ net_sources = ../net/FakeSocket.cpp \
wsd_sources = ../wsd/ClientSession.cpp \
../wsd/DocumentBroker.cpp \
- ../wsd/LOOLWSD.cpp \
+ ../wsd/COOLWSD.cpp \
../wsd/RequestDetails.cpp \
../wsd/Storage.cpp \
../wsd/TileCache.cpp
diff --git a/gtk/gtk.hpp b/gtk/gtk.hpp
index 52c4b12549..1875115aa1 100644
--- a/gtk/gtk.hpp
+++ b/gtk/gtk.hpp
@@ -5,6 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-extern int loolwsd_server_socket_fd;
+extern int coolwsd_server_socket_fd;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/gtk/mobile.cpp b/gtk/mobile.cpp
index 2802fa9d87..538bd5b731 100644
--- a/gtk/mobile.cpp
+++ b/gtk/mobile.cpp
@@ -21,16 +21,16 @@
#include "FakeSocket.hpp"
#include "Log.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "Protocol.hpp"
#include "Util.hpp"
const int SHOW_JS_MAXLEN = 70;
-int loolwsd_server_socket_fd = -1;
+int coolwsd_server_socket_fd = -1;
static std::string fileURL;
-static LOOLWSD *loolwsd = nullptr;
+static COOLWSD *coolwsd = nullptr;
static int fakeClientFd;
static int closeNotificationPipeForForwardingThread[2];
static WebKitWebView *webView;
@@ -44,7 +44,7 @@ static void send2JS_ready_callback(GObject *source_object,
static void send2JS(const std::vector<char>& buffer)
{
- LOG_TRC_NOFILE("Send to JS: " << LOOLProtocol::getAbbreviatedMessage(buffer.data(), buffer.size()));
+ LOG_TRC_NOFILE("Send to JS: " << COOLProtocol::getAbbreviatedMessage(buffer.data(), buffer.size()));
std::string js;
@@ -145,7 +145,7 @@ static void handle_message(const char * type, WebKitJavascriptResult *js_result)
g_free(string_value);
}
-static void handle_lool_message(WebKitUserContentManager *manager,
+static void handle_cool_message(WebKitUserContentManager *manager,
WebKitJavascriptResult *js_result,
gpointer user_data)
{
@@ -159,10 +159,10 @@ static void handle_lool_message(WebKitUserContentManager *manager,
{
// Now we know that the JS has started completely
- // Contact the permanently (during app lifetime) listening LOOLWSD server
+ // Contact the permanently (during app lifetime) listening COOLWSD server
// "public" socket
- assert(loolwsd_server_socket_fd != -1);
- int rc = fakeSocketConnect(fakeClientFd, loolwsd_server_socket_fd);
+ assert(coolwsd_server_socket_fd != -1);
+ int rc = fakeSocketConnect(fakeClientFd, coolwsd_server_socket_fd);
assert(rc != -1);
// Create a socket pair to notify the below thread when the document has been closed
@@ -288,17 +288,17 @@ int main(int argc, char* argv[])
std::thread([]
{
- assert(loolwsd == nullptr);
+ assert(coolwsd == nullptr);
char *argv[2];
argv[0] = strdup("mobile");
argv[1] = nullptr;
Util::setThreadName("app");
while (true)
{
- loolwsd = new LOOLWSD();
- loolwsd->run(1, argv);
- delete loolwsd;
- LOG_TRC("One run of LOOLWSD completed");
+ coolwsd = new COOLWSD();
+ coolwsd->run(1, argv);
+ delete coolwsd;
+ LOG_TRC("One run of COOLWSD completed");
}
}).detach();
@@ -313,7 +313,7 @@ int main(int argc, char* argv[])
WebKitUserContentManager *userContentManager = WEBKIT_USER_CONTENT_MANAGER(webkit_user_content_manager_new());
g_signal_connect(userContentManager, "script-message-received::debug", G_CALLBACK(handle_debug_message), nullptr);
- g_signal_connect(userContentManager, "script-message-received::cool", G_CALLBACK(handle_lool_message), nullptr);
+ g_signal_connect(userContentManager, "script-message-received::cool", G_CALLBACK(handle_cool_message), nullptr);
g_signal_connect(userContentManager, "script-message-received::error", G_CALLBACK(handle_error_message), nullptr);
webkit_user_content_manager_register_script_message_handler(userContentManager, "debug");
diff --git a/ios/Mobile.xcodeproj/project.pbxproj b/ios/Mobile.xcodeproj/project.pbxproj
index 4798e93a7b..2e1f3315a5 100644
--- a/ios/Mobile.xcodeproj/project.pbxproj
+++ b/ios/Mobile.xcodeproj/project.pbxproj
@@ -27,14 +27,14 @@
BE5EB5C8213FE29900E0826C /* FileUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5C0213FE29900E0826C /* FileUtil.cpp */; };
BE5EB5CF213FE2D000E0826C /* ClientSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5CC213FE2D000E0826C /* ClientSession.cpp */; };
BE5EB5D0213FE2D000E0826C /* TileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5CD213FE2D000E0826C /* TileCache.cpp */; };
- BE5EB5D22140039100E0826C /* LOOLWSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D12140039100E0826C /* LOOLWSD.cpp */; };
+ BE5EB5D22140039100E0826C /* COOLWSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D12140039100E0826C /* COOLWSD.cpp */; };
BE5EB5D421400DC100E0826C /* DocumentBroker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */; };
BE5EB5D621401E0F00E0826C /* Storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D521401E0F00E0826C /* Storage.cpp */; };
BE5EB5DA2140363100E0826C /* ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D92140363100E0826C /* ios.mm */; };
BE5EB5DC2140480B00E0826C /* ICU.dat in Resources */ = {isa = PBXBuildFile; fileRef = BE5EB5DB2140480B00E0826C /* ICU.dat */; };
BE6362C22153B5B500F4237E /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE6362C12153B5B500F4237E /* CoreServices.framework */; };
BE7228E22417BC9F000ADABD /* StringVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE7228E02417BC9F000ADABD /* StringVector.cpp */; };
- BE7D6A6B23FAA8B500C2E605 /* loolkitconfig.xcu in Resources */ = {isa = PBXBuildFile; fileRef = BE7D6A6A23FAA8B500C2E605 /* loolkitconfig.xcu */; };
+ BE7D6A6B23FAA8B500C2E605 /* coolkitconfig.xcu in Resources */ = {isa = PBXBuildFile; fileRef = BE7D6A6A23FAA8B500C2E605 /* coolkitconfig.xcu */; };
BE80E43221AD92F700859C97 /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = BE80E43121AD92F600859C97 /* Fonts */; };
BE80E45821B68F5700859C97 /* TemplateCollectionViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE80E45721B68F5700859C97 /* TemplateCollectionViewController.mm */; };
BE80E45E21B6CEF200859C97 /* TemplateSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE80E45D21B6CEF200859C97 /* TemplateSectionHeaderView.m */; };
@@ -560,7 +560,7 @@
BE5EB5C0213FE29900E0826C /* FileUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileUtil.cpp; sourceTree = "<group>"; };
BE5EB5CC213FE2D000E0826C /* ClientSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientSession.cpp; sourceTree = "<group>"; };
BE5EB5CD213FE2D000E0826C /* TileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TileCache.cpp; sourceTree = "<group>"; };
- BE5EB5D12140039100E0826C /* LOOLWSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LOOLWSD.cpp; sourceTree = "<group>"; };
+ BE5EB5D12140039100E0826C /* COOLWSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COOLWSD.cpp; sourceTree = "<group>"; };
BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentBroker.cpp; sourceTree = "<group>"; };
BE5EB5D521401E0F00E0826C /* Storage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Storage.cpp; sourceTree = "<group>"; };
BE5EB5D92140363100E0826C /* ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios.mm; path = ../../ios/ios.mm; sourceTree = "<group>"; };
@@ -675,7 +675,7 @@
BE7D6A6523FA9C2700C2E605 /* defaultprovider.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = defaultprovider.hxx; path = "../../ios-device/configmgr/source/defaultprovider.hxx"; sourceTree = "<group>"; };
BE7D6A6623FA9C2700C2E605 /* parser.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = parser.hxx; path = "../../ios-device/configmgr/source/parser.hxx"; sourceTree = "<group>"; };
BE7D6A6723FA9C2700C2E605 /* rootnode.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = rootnode.cxx; path = "../../ios-device/configmgr/source/rootnode.cxx"; sourceTree = "<group>"; };
- BE7D6A6A23FAA8B500C2E605 /* loolkitconfig.xcu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = loolkitconfig.xcu; path = ../loolkitconfig.xcu; sourceTree = "<group>"; };
+ BE7D6A6A23FAA8B500C2E605 /* coolkitconfig.xcu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = coolkitconfig.xcu; path = ../coolkitconfig.xcu; sourceTree = "<group>"; };
BE7E5B7623AD07BE00F9462A /* SvxPresetListBox.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SvxPresetListBox.cxx; path = "../../ios-device/svx/source/tbxctrls/SvxPresetListBox.cxx"; sourceTree = "<group>"; };
BE7E5B7723AD07BE00F9462A /* tbxcolor.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = tbxcolor.cxx; path = "../../ios-device/svx/source/tbxctrls/tbxcolor.cxx"; sourceTree = "<group>"; };
BE7E5B7823AD07BE00F9462A /* tbxdrctl.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = tbxdrctl.cxx; path = "../../ios-device/svx/source/tbxctrls/tbxdrctl.cxx"; sourceTree = "<group>"; };
@@ -1503,7 +1503,7 @@
BE00F8922139494E001CE2D4 /* Resources */ = {
isa = PBXGroup;
children = (
- BE7D6A6A23FAA8B500C2E605 /* loolkitconfig.xcu */,
+ BE7D6A6A23FAA8B500C2E605 /* coolkitconfig.xcu */,
BE18C7DD226DE09A001AD27E /* Branding */,
BEB0E5D821C7CA800085A0CF /* Settings.bundle */,
BE80E46721B7066C00859C97 /* Templates */,
@@ -2222,7 +2222,7 @@
BE5EB5CC213FE2D000E0826C /* ClientSession.cpp */,
BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */,
BE484B71228D8622001EE76C /* DocumentBroker.hpp */,
- BE5EB5D12140039100E0826C /* LOOLWSD.cpp */,
+ BE5EB5D12140039100E0826C /* COOLWSD.cpp */,
BE5EB5D521401E0F00E0826C /* Storage.cpp */,
BE5EB5CD213FE2D000E0826C /* TileCache.cpp */,
);
@@ -3631,7 +3631,7 @@
BE00F8A721396585001CE2D4 /* cool-help.html in Resources */,
BE8D773D2136762600AC58EA /* LaunchScreen.storyboard in Resources */,
BE00F8A121396585001CE2D4 /* bundle.css in Resources */,
- BE7D6A6B23FAA8B500C2E605 /* loolkitconfig.xcu in Resources */,
+ BE7D6A6B23FAA8B500C2E605 /* coolkitconfig.xcu in Resources */,
BE8D85CF214055F3009F1860 /* udkapi.rdb in Resources */,
BE18C7DE226DE09A001AD27E /* Branding in Resources */,
BE8D85D5214055F3009F1860 /* unorc in Resources */,
@@ -3661,7 +3661,7 @@
BEA283582146945500848631 /* ChildSession.cpp in Sources */,
BE80E45E21B6CEF200859C97 /* TemplateSectionHeaderView.m in Sources */,
BE5EB5C3213FE29900E0826C /* Session.cpp in Sources */,
- BE5EB5D22140039100E0826C /* LOOLWSD.cpp in Sources */,
+ BE5EB5D22140039100E0826C /* COOLWSD.cpp in Sources */,
BEFB1EE121C29CC70081D757 /* L10n.mm in Sources */,
BEDCC8992456FFAD00FB02BD /* SceneDelegate.m in Sources */,
BE5EB5C6213FE29900E0826C /* SigUtil.cpp in Sources */,
@@ -3842,7 +3842,7 @@
"IOS=IOS",
"DISABLE_DYNLOADING=1",
"DEBUG=1",
- "LOOLWSD_CONFIGDIR='\".\"'",
+ "COOLWSD_CONFIGDIR='\".\"'",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
HEADER_SEARCH_PATHS = (
@@ -3901,7 +3901,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"IOS=IOS",
"DISABLE_DYNLOADING=1",
- "LOOLWSD_CONFIGDIR='\".\"'",
+ "COOLWSD_CONFIGDIR='\".\"'",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
HEADER_SEARCH_PATHS = (
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index d0ab3fc284..c64b9e8bfc 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -25,7 +25,7 @@
#import "FakeSocket.hpp"
#import "Kit.hpp"
#import "Log.hpp"
-#import "LOOLWSD.hpp"
+#import "COOLWSD.hpp"
#import "SetupKitEnvironment.hpp"
#import "Util.hpp"
@@ -180,7 +180,7 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- auto trace = std::getenv("LOOL_LOGLEVEL");
+ auto trace = std::getenv("COOL_LOGLEVEL");
if (!trace)
trace = strdup("warning");
@@ -198,18 +198,18 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
NSString *cacheDirectory = [userDirectory stringByAppendingPathComponent:@"cache"];
NSString *coreVersionHashFile = [cacheDirectory stringByAppendingPathComponent:@"core_version_hash"];
- NSString *loolwsdVersionHashFile = [cacheDirectory stringByAppendingPathComponent:@"loolwsd_version_hash"];
+ NSString *coolwsdVersionHashFile = [cacheDirectory stringByAppendingPathComponent:@"coolwsd_version_hash"];
NSData *oldCoreVersionHash = [NSData dataWithContentsOfFile:coreVersionHashFile];
- NSData *oldLoolwsdVersionHash = [NSData dataWithContentsOfFile:loolwsdVersionHashFile];
+ NSData *oldCoolwsdVersionHash = [NSData dataWithContentsOfFile:coolwsdVersionHashFile];
NSData *coreVersionHash = [NSData dataWithBytes:CORE_VERSION_HASH length:strlen(CORE_VERSION_HASH)];
- NSData *loolwsdVersionHash = [NSData dataWithBytes:LOOLWSD_VERSION_HASH length:strlen(LOOLWSD_VERSION_HASH)];
+ NSData *coolwsdVersionHash = [NSData dataWithBytes:COOLWSD_VERSION_HASH length:strlen(COOLWSD_VERSION_HASH)];
if (oldCoreVersionHash == nil
|| ![oldCoreVersionHash isEqualToData:coreVersionHash]
- || oldLoolwsdVersionHash == nil
- || ![oldLoolwsdVersionHash isEqualToData:loolwsdVersionHash]) {
+ || oldCoolwsdVersionHash == nil
+ || ![oldCoolwsdVersionHash isEqualToData:coolwsdVersionHash]) {
[[NSFileManager defaultManager] removeItemAtPath:cacheDirectory error:nil];
@@ -219,8 +219,8 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
if (![[NSFileManager defaultManager] createFileAtPath:coreVersionHashFile contents:coreVersionHash attributes:nil])
NSLog(@"Could not create %@", coreVersionHashFile);
- if (![[NSFileManager defaultManager] createFileAtPath:loolwsdVersionHashFile contents:loolwsdVersionHash attributes:nil])
- NSLog(@"Could not create %@", loolwsdVersionHashFile);
+ if (![[NSFileManager defaultManager] createFileAtPath:coolwsdVersionHashFile contents:coolwsdVersionHash attributes:nil])
+ NSLog(@"Could not create %@", coolwsdVersionHashFile);
}
// Having LANG in the environment is expected to happen only when debugging from Xcode. When
@@ -313,8 +313,8 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
argv[0] = strdup([[NSBundle mainBundle].executablePath UTF8String]);
argv[1] = nullptr;
Util::setThreadName("app");
- auto loolwsd = new LOOLWSD();
- loolwsd->run(1, argv);
+ auto coolwsd = new COOLWSD();
+ coolwsd->run(1, argv);
// Should never return
assert(false);
diff --git a/ios/Mobile/CODocument.mm b/ios/Mobile/CODocument.mm
index 4fc2a5b09b..13335b484e 100644
--- a/ios/Mobile/CODocument.mm
+++ b/ios/Mobile/CODocument.mm
@@ -29,7 +29,7 @@
#import "Kit.hpp"
#import "KitHelper.hpp"
#import "Log.hpp"
-#import "LOOLWSD.hpp"
+#import "COOLWSD.hpp"
#import "MobileApp.hpp"
#import "Protocol.hpp"
@@ -87,7 +87,7 @@ static std::atomic<unsigned> appDocIdCounter(1);
}
- (void)send2JS:(const char *)buffer length:(int)length {
- LOG_TRC("To JS: " << LOOLProtocol::getAbbreviatedMessage(buffer, length).c_str());
+ LOG_TRC("To JS: " << COOLProtocol::getAbbreviatedMessage(buffer, length).c_str());
NSString *js;
diff --git a/ios/Mobile/DocumentViewController.mm b/ios/Mobile/DocumentViewController.mm
index 0fa5c802f0..39ddd79ba0 100644
--- a/ios/Mobile/DocumentViewController.mm
+++ b/ios/Mobile/DocumentViewController.mm
@@ -18,7 +18,7 @@
#import "ios.h"
#import "FakeSocket.hpp"
-#import "LOOLWSD.hpp"
+#import "COOLWSD.hpp"
#import "Log.hpp"
#import "MobileApp.hpp"
#import "SigUtil.hpp"
@@ -302,10 +302,10 @@ static IMP standardImpOfInputAccessoryView = nil;
if ([message.body isEqualToString:@"HULLO"]) {
// Now we know that the JS has started completely
- // Contact the permanently (during app lifetime) listening LOOLWSD server
+ // Contact the permanently (during app lifetime) listening COOLWSD server
// "public" socket
- assert(loolwsd_server_socket_fd != -1);
- rc = fakeSocketConnect(self.document->fakeClientFd, loolwsd_server_socket_fd);
+ assert(coolwsd_server_socket_fd != -1);
+ rc = fakeSocketConnect(self.document->fakeClientFd, coolwsd_server_socket_fd);
assert(rc != -1);
// Create a socket pair to notify the below thread when the document has been closed
diff --git a/ios/Mobile/Info.plist.in b/ios/Mobile/Info.plist.in
index 97e44f3a73..09d6408078 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -229,7 +229,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<!--
- Why not use LOOLWSD_VERSION (surrounded by atsigns) here, you ask? Because in case one
+ Why not use COOLWSD_VERSION (surrounded by atsigns) here, you ask? Because in case one
build has been approved for release on the App Store, when you want to release a
following version, it has to have a different version number here in Info.plist. And we
don't necessarily want to bump the version number in configure.ac for something that
diff --git a/ios/Mobile/Resources/Settings.bundle/Root.plist.in b/ios/Mobile/Resources/Settings.bundle/Root.plist.in
index d1221a11d8..5645a7a15c 100644
--- a/ios/Mobile/Resources/Settings.bundle/Root.plist.in
+++ b/ios/Mobile/Resources/Settings.bundle/Root.plist.in
@@ -20,7 +20,7 @@
<key>Key</key>
<string>onlineVersion</string>
<key>DefaultValue</key>
- <string>@LOOLWSD_VERSION_HASH@</string>
+ <string>@COOLWSD_VERSION_HASH@</string>
</dict>
<dict>
<key>Type</key>
diff --git a/ios/config.h.in b/ios/config.h.in
index f7988aeaec..4e56bfd80a 100644
--- a/ios/config.h.in
+++ b/ios/config.h.in
@@ -77,10 +77,10 @@
#define HAVE_UNISTD_H 1
/* Collabora Online WebSocket server version */
-#define LOOLWSD_VERSION "@LOOLWSD_VERSION@"
+#define COOLWSD_VERSION "@COOLWSD_VERSION@"
/* Collabora Online git hash if present */
-#define LOOLWSD_VERSION_HASH "@LOOLWSD_VERSION_HASH@"
+#define COOLWSD_VERSION_HASH "@COOLWSD_VERSION_HASH@"
/* Path to LibreOffice installation */
#define LO_PATH "."
diff --git a/ios/ios.h b/ios/ios.h
index 9b9919e205..ff6928c7a2 100644
--- a/ios/ios.h
+++ b/ios/ios.h
@@ -9,7 +9,7 @@
extern const char *user_name;
-extern int loolwsd_server_socket_fd;
+extern int coolwsd_server_socket_fd;
extern LibreOfficeKit *lo_kit;
diff --git a/ios/ios.mm b/ios/ios.mm
index c750358273..696b10cb61 100644
--- a/ios/ios.mm
+++ b/ios/ios.mm
@@ -15,7 +15,7 @@ extern "C" {
const char *user_name = nullptr;
-int loolwsd_server_socket_fd = -1;
+int coolwsd_server_socket_fd = -1;
LibreOfficeKit *lo_kit;
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index b6783b6952..b842fbfecd 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -53,7 +53,7 @@ using Poco::JSON::Object;
using Poco::JSON::Parser;
using Poco::URI;
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
bool ChildSession::NoCapsForKit = false;
UnoCommandsRecorder ChildSession::unoCommandsRecorder;
@@ -147,7 +147,7 @@ bool ChildSession::_handleInput(const char *buffer, int length)
const std::string firstLine = getFirstLine(buffer, length);
const StringVector tokens = Util::tokenize(firstLine.data(), firstLine.size());
- if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
+ if (COOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
{
// Keep track of timestamps of incoming client messages that indicate user activity.
updateLastActivityTime();
@@ -1979,7 +1979,7 @@ bool ChildSession::resizeWindow(const char* /*buffer*/, int /*length*/, const St
std::string size;
if (tokens.size() > 2 && getTokenString(tokens[2], "size", size))
{
- const std::vector<int> sizeParts = LOOLProtocol::tokenizeInts(size, ',');
+ const std::vector<int> sizeParts = COOLProtocol::tokenizeInts(size, ',');
if (sizeParts.size() == 2)
{
getLOKitDocument()->resizeWindow(winId, sizeParts[0], sizeParts[1]);
@@ -2637,7 +2637,7 @@ void ChildSession::rememberEventsForInactiveUser(const int type, const std::stri
{
std::string name;
std::string value;
- if (LOOLProtocol::parseNameValuePair(payload, name, value, '='))
+ if (COOLProtocol::parseNameValuePair(payload, name, value, '='))
{
_stateRecorder.recordState(name, payload);
}
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 4b9535ac2c..a8ab066b6d 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -159,7 +159,7 @@ protected:
else if (tokens.size() == 2 && tokens.equals(0, "setloglevel"))
{
// Set environment variable so that new children will also set their log levels accordingly.
- setenv("LOOL_LOGLEVEL", tokens[1].c_str(), 1);
+ setenv("COOL_LOGLEVEL", tokens[1].c_str(), 1);
Log::logger().setLevel(tokens[1]);
}
else if (tokens.size() == 3 && tokens.equals(0, "setconfig"))
@@ -357,7 +357,7 @@ static int createLibreOfficeKit(const std::string& childRoot,
// Used to label the spare kit instances
static size_t spareKitId = 0;
++spareKitId;
- LOG_DBG("Forking a loolkit process with jailId: " << jailId << " as spare loolkit #"
+ LOG_DBG("Forking a coolkit process with jailId: " << jailId << " as spare coolkit #"
<< spareKitId << '.');
const pid_t pid = fork();
@@ -365,7 +365,7 @@ static int createLibreOfficeKit(const std::string& childRoot,
{
// Child
- // Close the pipe from loolwsd
+ // Close the pipe from coolwsd
close(0);
#ifndef KIT_IN_PROCESS
@@ -447,7 +447,7 @@ static void printArgumentHelp()
{
std::cout << "Usage: coolforkit [OPTION]..." << std::endl;
std::cout << " Single-threaded process that spawns lok instances" << std::endl;
- std::cout << " Note: Running this standalone is not possible. It is spawned by loolwsd" << std::endl;
+ std::cout << " Note: Running this standalone is not possible. It is spawned by coolwsd" << std::endl;
std::cout << " and is controlled via a pipe." << std::endl;
std::cout << "" << std::endl;
}
@@ -458,12 +458,12 @@ int main(int argc, char** argv)
/*WARNING*/ // early check for avoiding the security check for username 'cool'
/*WARNING*/ // (deliberately only this, not moving the entire parameter parsing here)
- /*WARNING*/ bool checkLoolUser = true;
- /*WARNING*/ std::string disableLoolUserChecking("--disable-cool-user-checking");
- /*WARNING*/ for (int i = 1; checkLoolUser && (i < argc); ++i)
+ /*WARNING*/ bool checkCoolUser = true;
+ /*WARNING*/ std::string disableCoolUserChecking("--disable-cool-user-checking");
+ /*WARNING*/ for (int i = 1; checkCoolUser && (i < argc); ++i)
/*WARNING*/ {
- /*WARNING*/ if (disableLoolUserChecking == argv[i])
- /*WARNING*/ checkLoolUser = false;
+ /*WARNING*/ if (disableCoolUserChecking == argv[i])
+ /*WARNING*/ checkCoolUser = false;
/*WARNING*/ }
/*WARNING*/ if (!hasCorrectUID("coolforkit"))
@@ -481,7 +481,7 @@ int main(int argc, char** argv)
/*WARNING*/ }
/*WARNING*/ else if (hasAnyCapability())
/*WARNING*/ {
- /*WARNING*/ if (!checkLoolUser)
+ /*WARNING*/ if (!checkCoolUser)
/*WARNING*/ LOG_FTL("Security: --disable-cool-user-checking failed, coolforkit has some capabilities set.");
/*WARNING*/ LOG_FTL("Aborting.");
@@ -490,7 +490,7 @@ int main(int argc, char** argv)
/*WARNING*/ // even without the capabilities, don't run unless the user really knows
/*WARNING*/ // what they are doing, and provided a --disable-cool-user-checking
- /*WARNING*/ if (checkLoolUser)
+ /*WARNING*/ if (checkCoolUser)
/*WARNING*/ {
/*WARNING*/ LOG_FTL("Aborting.");
/*WARNING*/ return EX_SOFTWARE;
@@ -521,17 +521,17 @@ int main(int argc, char** argv)
}
#ifndef FUZZER
- SigUtil::setFatalSignals("forkit startup of " LOOLWSD_VERSION " " LOOLWSD_VERSION_HASH);
+ SigUtil::setFatalSignals("forkit startup of " COOLWSD_VERSION " " COOLWSD_VERSION_HASH);
SigUtil::setTerminationSignals();
#endif
Util::setApplicationPath(Poco::Path(argv[0]).parent().toString());
// Initialization
- const bool logToFile = std::getenv("LOOL_LOGFILE");
- const char* logFilename = std::getenv("LOOL_LOGFILENAME");
- const char* logLevel = std::getenv("LOOL_LOGLEVEL");
- const char* logColor = std::getenv("LOOL_LOGCOLOR");
+ const bool logToFile = std::getenv("COOL_LOGFILE");
+ const char* logFilename = std::getenv("COOL_LOGFILENAME");
+ const char* logLevel = std::getenv("COOL_LOGLEVEL");
+ const char* logColor = std::getenv("COOL_LOGCOLOR");
std::map<std::string, std::string> logProperties;
if (logToFile && logFilename)
{
@@ -689,7 +689,7 @@ int main(int argc, char** argv)
#if !MOBILEAPP
// Parse the configuration.
- const auto conf = std::getenv("LOOL_CONFIG");
+ const auto conf = std::getenv("COOL_CONFIG");
config::initialize(std::string(conf ? conf : std::string()));
#endif
@@ -699,7 +699,7 @@ int main(int argc, char** argv)
// We must have at least one child, more are created dynamically.
// Ask this first child to send version information to master process and trace startup.
- ::setenv("LOOL_TRACE_STARTUP", "1", 1);
+ ::setenv("COOL_TRACE_STARTUP", "1", 1);
const pid_t forKitPid
= createLibreOfficeKit(childRoot, sysTemplate, loTemplate, loSubPath, true);
if (forKitPid < 0)
@@ -710,7 +710,7 @@ int main(int argc, char** argv)
}
// No need to trace subsequent children.
- ::unsetenv("LOOL_TRACE_STARTUP");
+ ::unsetenv("COOL_TRACE_STARTUP");
if (LogLevel != "trace")
{
LOG_INF("Forkit initialization complete: setting log-level to [" << LogLevel << "] as configured.");
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 53b018294c..3a8ccd33b7 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -86,11 +86,11 @@
#ifdef FUZZER
#include <kit/DummyLibreOfficeKit.hpp>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
#endif
#if MOBILEAPP
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#endif
#ifdef IOS
@@ -111,7 +111,7 @@ using Poco::URI;
using Poco::Path;
#endif
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
extern "C" { void dump_kit_state(void); /* easy for gdb */ }
@@ -554,7 +554,7 @@ namespace
/// Manages the lifetime of a document.
/// Technically, we can host multiple documents
/// per process. But for security reasons don't.
-/// However, we could have a loolkit instance
+/// However, we could have a coolkit instance
/// per user or group of users (a trusted circle).
class Document final : public DocumentManagerInterface
{
@@ -1437,7 +1437,7 @@ private:
std::string name;
std::string sessionId;
- if (LOOLProtocol::parseNameValuePair(prefix, name, sessionId, '-') && name == "child")
+ if (COOLProtocol::parseNameValuePair(prefix, name, sessionId, '-') && name == "child")
{
const auto it = _sessions.find(sessionId);
if (it != _sessions.end())
@@ -1573,7 +1573,7 @@ public:
const TileQueue::Payload input = _tileQueue->pop();
- LOG_TRC("Kit handling queue message: " << LOOLProtocol::getAbbreviatedMessage(input));
+ LOG_TRC("Kit handling queue message: " << COOLProtocol::getAbbreviatedMessage(input));
const StringVector tokens = Util::tokenize(input.data(), input.size());
@@ -1615,7 +1615,7 @@ public:
{
broadcast = true;
}
- else if (LOOLProtocol::matchPrefix("except-", target))
+ else if (COOLProtocol::matchPrefix("except-", target))
{
exceptViewId = std::stoi(target.substr(7));
broadcast = true;
@@ -1673,12 +1673,12 @@ public:
}
else
{
- LOG_ERR("Invalid callback message: [" << LOOLProtocol::getAbbreviatedMessage(input) << "].");
+ LOG_ERR("Invalid callback message: [" << COOLProtocol::getAbbreviatedMessage(input) << "].");
}
}
else
{
- LOG_ERR("Unexpected request: [" << LOOLProtocol::getAbbreviatedMessage(input) << "].");
+ LOG_ERR("Unexpected request: [" << COOLProtocol::getAbbreviatedMessage(input) << "].");
}
}
@@ -1854,7 +1854,7 @@ private:
#if !defined FUZZER && !defined BUILDING_TESTS && !MOBILEAPP
-// When building the fuzzer we link LOOLWSD.cpp into the same executable so the
+// When building the fuzzer we link COOLWSD.cpp into the same executable so the
// Protected::emitOneRecording() there gets used. When building the unit tests the one in
// TraceEvent.cpp gets used.
@@ -2264,7 +2264,7 @@ protected:
}
else if (tokens.equals(0, "tile") || tokens.equals(0, "tilecombine") || tokens.equals(0, "canceltiles") ||
tokens.equals(0, "paintwindow") || tokens.equals(0, "resizewindow") ||
- LOOLProtocol::getFirstToken(tokens[0], '-') == "child")
+ COOLProtocol::getFirstToken(tokens[0], '-') == "child")
{
if (_document)
{
@@ -2412,16 +2412,16 @@ void lokit_main(
#if !MOBILEAPP
#ifndef FUZZER
- SigUtil::setFatalSignals("kit startup of " LOOLWSD_VERSION " " LOOLWSD_VERSION_HASH);
+ SigUtil::setFatalSignals("kit startup of " COOLWSD_VERSION " " COOLWSD_VERSION_HASH);
SigUtil::setTerminationSignals();
#endif
Util::setThreadName("kit_spare_" + Util::encodeId(numericIdentifier, 3));
// Reinitialize logging when forked.
- const bool logToFile = std::getenv("LOOL_LOGFILE");
- const char* logFilename = std::getenv("LOOL_LOGFILENAME");
- const char* logLevel = std::getenv("LOOL_LOGLEVEL");
+ const bool logToFile = std::getenv("COOL_LOGFILE");
+ const char* logFilename = std::getenv("COOL_LOGFILENAME");
+ const char* logLevel = std::getenv("COOL_LOGLEVEL");
const bool logColor = config::getBool("logging.color", true) && isatty(fileno(stderr));
std::map<std::string, std::string> logProperties;
if (logToFile && logFilename)
@@ -2432,14 +2432,14 @@ void lokit_main(
Util::rng::reseed();
const std::string LogLevel = logLevel ? logLevel : "trace";
- const bool bTraceStartup = (std::getenv("LOOL_TRACE_STARTUP") != nullptr);
+ const bool bTraceStartup = (std::getenv("COOL_TRACE_STARTUP") != nullptr);
Log::initialize("kit", bTraceStartup ? "trace" : logLevel, logColor, logToFile, logProperties);
if (bTraceStartup && LogLevel != "trace")
{
LOG_INF("Setting log-level to [trace] and delaying setting to configured [" << LogLevel << "] until after Kit initialization.");
}
- const char* pAnonymizationSalt = std::getenv("LOOL_ANONYMIZATION_SALT");
+ const char* pAnonymizationSalt = std::getenv("COOL_ANONYMIZATION_SALT");
if (pAnonymizationSalt)
{
AnonymizationSalt = std::stoull(std::string(pAnonymizationSalt));
@@ -2631,7 +2631,7 @@ void lokit_main(
#else
kit = nullptr;
#ifdef FUZZER
- if (LOOLWSD::DummyLOK)
+ if (COOLWSD::DummyLOK)
kit = dummy_lok_init_2(instdir, userdir);
#endif
#endif
@@ -2700,7 +2700,7 @@ void lokit_main(
SigUtil::setVersionInfo(versionString);
// Add some parameters we want to pass to the client. Could not figure out how to get
- // the configuration parameters from LOOLWSD.cpp's initialize() or loolwsd.xml here, so
+ // the configuration parameters from COOLWSD.cpp's initialize() or coolwsd.xml here, so
// oh well, just have the value hardcoded in KitHelper.hpp. It isn't really useful to
// "tune" it at end-user installations anyway, I think.
auto versionJSON = Poco::JSON::Parser().parse(versionString).extract<Poco::JSON::Object::Ptr>();
@@ -2742,7 +2742,7 @@ void lokit_main(
static std::shared_ptr<lok::Office> loKit = std::make_shared<lok::Office>(kit);
assert(loKit);
- LOOLWSD::LOKitVersion = loKit->getVersionInfo();
+ COOLWSD::LOKitVersion = loKit->getVersionInfo();
// Dummies
const std::string jailId = "jailid";
@@ -2866,7 +2866,7 @@ std::string anonymizeUrl(const std::string& url)
bool globalPreinit(const std::string &loTemplate)
{
#ifdef FUZZER
- if (LOOLWSD::DummyLOK)
+ if (COOLWSD::DummyLOK)
return true;
#endif
const std::string libSofficeapp = loTemplate + "/program/" LIB_SOFFICEAPP;
diff --git a/kit/SetupKitEnvironment.hpp b/kit/SetupKitEnvironment.hpp
index f46697b331..ffa2fb3c69 100644
--- a/kit/SetupKitEnvironment.hpp
+++ b/kit/SetupKitEnvironment.hpp
@@ -23,14 +23,14 @@ inline void setupKitEnvironment(const std::string& userInterface)
"userext:${${BRAND_BASE_DIR}/program/lounorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini "
);
#ifdef IOS
- layers += "user:*${BRAND_BASE_DIR}/loolkitconfig.xcu ";
+ layers += "user:*${BRAND_BASE_DIR}/coolkitconfig.xcu ";
#elif ENABLE_DEBUG && !defined(ANDROID) // '*' denotes non-writable.
- layers += "user:*file://" DEBUG_ABSSRCDIR "/loolkitconfig.xcu ";
+ layers += "user:*file://" DEBUG_ABSSRCDIR "/coolkitconfig.xcu ";
#else
- if(::getenv("LOOLKITCONFIG_XCU"))
- layers += "user:*file://" + std::string(::getenv("LOOLKITCONFIG_XCU")) + " ";
+ if(::getenv("COOLKITCONFIG_XCU"))
+ layers += "user:*file://" + std::string(::getenv("COOLKITCONFIG_XCU")) + " ";
else
- layers += "user:*file://" LOOLWSD_CONFIGDIR "/loolkitconfig.xcu ";
+ layers += "user:*file://" COOLWSD_CONFIGDIR "/coolkitconfig.xcu ";
#endif
::setenv("CONFIGURATION_LAYERS", layers.c_str(),
1 /* override */);
diff --git a/kubernetes/helm/README.md b/kubernetes/helm/README.md
index 02d54285b2..170f409c55 100644
--- a/kubernetes/helm/README.md
+++ b/kubernetes/helm/README.md
@@ -46,18 +46,18 @@ helm install collabora-online ./kubernetes/helm/collabora-online/
C. Now in this case to make our hostname available we have to add following line into /etc/hosts:
```
- 192.168.0.106 loolwsd.public.example.com
+ 192.168.0.106 coolwsd.public.example.com
```
To check if everything is setup correctly you can run:
```
-curl -I -H 'Host: loolwsd.public.example.com' 'http://192.168.0.106:30536/'
+curl -I -H 'Host: coolwsd.public.example.com' 'http://192.168.0.106:30536/'
```
It should return a similar output as below:
```
HTTP/1.1 200 OK
last-modified: Tue, 18 May 2021 10:46:29
-user-agent: LOOLWSD WOPI Agent 6.4.8
+user-agent: COOLWSD WOPI Agent 6.4.8
content-length: 2
content-type: text/plain
```
@@ -75,7 +75,7 @@ collabora-online-5fb4869564-dnzmk 1/1 Running 0 28h
collabora-online-5fb4869564-fb4cf 1/1 Running 0 28h
collabora-online-5fb4869564-wbrv2 1/1 Running 0 28h
```
-* What is the outside host that multiple loolwsd servers actually answering ?
+* What is the outside host that multiple coolwsd servers actually answering ?
```
kubectl get ingress -n collabora
```
@@ -84,7 +84,7 @@ example output :
|-----------|------------------|--------------------------|------------------------|-------|
| NAMESPACE | NAME | HOSTS | ADDRESS | PORTS |
|-----------|------------------|--------------------------|------------------------|-------|
-| collabora | collabora-online |loolwsd.public.example.com| | 80 |
+| collabora | collabora-online |coolwsd.public.example.com| | 80 |
|-----------|------------------|--------------------------|------------------------|-------|
```
diff --git a/kubernetes/helm/collabora-online/templates/deployment.yaml b/kubernetes/helm/collabora-online/templates/deployment.yaml
index 20ef2b149d..ad84fe4818 100644
--- a/kubernetes/helm/collabora-online/templates/deployment.yaml
+++ b/kubernetes/helm/collabora-online/templates/deployment.yaml
@@ -67,9 +67,9 @@ spec:
successThreshold: {{ .Values.probes.readiness.successThreshold }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
{{- end }}
- {{- if .Values.environmentVariablesLool }}
+ {{- if .Values.environmentVariablesCool }}
env:
-{{ toYaml .Values.environmentVariablesLool | indent 12 }}
+{{ toYaml .Values.environmentVariablesCool | indent 12 }}
{{- end }}
volumeMounts:
- name: tmp
diff --git a/kubernetes/helm/collabora-online/values.yaml b/kubernetes/helm/collabora-online/values.yaml
index 545c82e253..aa8d37c02c 100644
--- a/kubernetes/helm/collabora-online/values.yaml
+++ b/kubernetes/helm/collabora-online/values.yaml
@@ -24,7 +24,7 @@ global:
ingress:
name: collabora-online
-replicaCount: 3 # This is the amount of how many instances of loolwsd will run
+replicaCount: 3 # This is the amount of how many instances of coolwsd will run
image:
pullPolicy: Always
@@ -58,7 +58,7 @@ deployment:
maxUnavailable: 0
maxSurge: 1
-environmentVariablesLool:
+environmentVariablesCool:
- name: extra_params
value: --o:ssl.enable=false
- name: username
@@ -75,7 +75,7 @@ hpa:
name: collabora-online
hosts:
- host: loolwsd.public.example.com
+ host: coolwsd.public.example.com
namespace:
collabora: collabora
diff --git a/man/coolconfig.1 b/man/coolconfig.1
index 658e0d8f0b..5008eb3db3 100644
--- a/man/coolconfig.1
+++ b/man/coolconfig.1
@@ -31,4 +31,4 @@ update\-system\-template
The \fBanonymize\fR command helps to read anonymized logs. If you know a document and/or a user had an issue, you can find their session in the logs by running this command with the username and/or document name and get the anonymized hash, which you use to search the logs with.
.PP
.SH "SEE ALSO"
-coolforkit(1), coolconvert(1), loolwsd(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolmount(1)
+coolforkit(1), coolconvert(1), coolwsd(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolmount(1)
diff --git a/man/coolforkit.1 b/man/coolforkit.1
index b42d1f6975..bcd074b49a 100644
--- a/man/coolforkit.1
+++ b/man/coolforkit.1
@@ -6,6 +6,6 @@ coolforkit OPTIONS
.SH DESCRIPTION
Single-threaded process that spawns LibreOfficeKit (LOK) instances.
.PP
-\fBNote\fR: Running this standalone is not possible. It is spawned by loolwsd and is controlled via a pipe.
+\fBNote\fR: Running this standalone is not possible. It is spawned by coolwsd and is controlled via a pipe.
.SH "SEE ALSO"
-loolwsd(1), coolconvert(1), coolconfig(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolmount(1)
+coolwsd(1), coolconvert(1), coolconfig(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolmount(1)
diff --git a/man/coolmount.1 b/man/coolmount.1
index cfc5e8e505..66cca3546f 100644
--- a/man/coolmount.1
+++ b/man/coolmount.1
@@ -6,6 +6,6 @@ coolmount OPTIONS
.SH DESCRIPTION
This is a very tiny helper to allow overlay mounting.
.PP
-\fBNote\fR: Running this standalone is not possible. It is used internally by loolwsd when it creates the jail for the document.
+\fBNote\fR: Running this standalone is not possible. It is used internally by coolwsd when it creates the jail for the document.
.SH "SEE ALSO"
-loolwsd(1), coolconvert(1), coolconfig(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolforkit(1)
+coolwsd(1), coolconvert(1), coolconfig(1), coolwsd-systemplate-setup(1), coolwsd-generate-proof-key(1), coolforkit(1)
diff --git a/man/coolwsd-generate-proof-key.1 b/man/coolwsd-generate-proof-key.1
index e1a95975d6..ae99bab6e1 100644
--- a/man/coolwsd-generate-proof-key.1
+++ b/man/coolwsd-generate-proof-key.1
@@ -1,9 +1,9 @@
-.TH LOOLWSD-GENERATE_PROOF_KEY "1" "April 2020" "coolwsd-generate-proof-key " "User Commands"
+.TH COOLWSD-GENERATE_PROOF_KEY "1" "April 2020" "coolwsd-generate-proof-key " "User Commands"
.SH NAME
coolwsd-generate-proof-key \- Utility that genarates WOPI Proof keys for Collabora Online
.SH SYNOPSIS
coolwsd-generate-proof-key
.SH DESCRIPTION
-coolwsd-generate-proof-key creates an RSA key pair in /etc/loolwsd for the WOPI Proof headers. The script is automatically run by the postinstall script of loolwsd package, but in case of failure sysadmins can run it manually.
+coolwsd-generate-proof-key creates an RSA key pair in /etc/coolwsd for the WOPI Proof headers. The script is automatically run by the postinstall script of coolwsd package, but in case of failure sysadmins can run it manually.
.SH "SEE ALSO"
-coolforkit(1), coolconvert(1), coolconfig(1), loolwsd(1), coolwsd-systemplate-setup(1), coolmount(1)
+coolforkit(1), coolconvert(1), coolconfig(1), coolwsd(1), coolwsd-systemplate-setup(1), coolmount(1)
diff --git a/man/coolwsd-systemplate-setup.1 b/man/coolwsd-systemplate-setup.1
index 062bab9b5c..73fe8f24f1 100644
--- a/man/coolwsd-systemplate-setup.1
+++ b/man/coolwsd-systemplate-setup.1
@@ -1,4 +1,4 @@
-.TH LOOLWSD-SYSTEMPLATE-SETUP "1" "May 2018" "coolwsd-systemplate-setup " "User Commands"
+.TH COOLWSD-SYSTEMPLATE-SETUP "1" "May 2018" "coolwsd-systemplate-setup " "User Commands"
.SH NAME
coolwsd-systemplate-setup \- Utility that sets up system template for Collabora Online
.SH SYNOPSIS
@@ -6,4 +6,4 @@ coolwsd-systemplate-setup <chroot template directory for system libs to create>
.SH DESCRIPTION
coolwsd-systemplate-setup creates a minimal system template for running the LibreOfficeKit in a chroot jail. The system template contains the bare minimum of system libraries to run LibreOfficeKit, and also fonts and locale data from the system.
.SH "SEE ALSO"
-coolforkit(1), coolconvert(1), coolconfig(1), loolwsd(1), coolwsd-generate-proof-key(1), coolmount(1)
+coolforkit(1), coolconvert(1), coolconfig(1), coolwsd(1), coolwsd-generate-proof-key(1), coolmount(1)
diff --git a/net/HttpHelper.cpp b/net/HttpHelper.cpp
index 1810672d07..1ed9980751 100644
--- a/net/HttpHelper.cpp
+++ b/net/HttpHelper.cpp
@@ -104,7 +104,7 @@ void sendFileAndShutdown(const std::shared_ptr<StreamSocket>& socket, const std:
{
// 60 * 60 * 24 * 128 (days) = 11059200
response->set("Cache-Control", "max-age=11059200");
- response->set("ETag", "\"" LOOLWSD_VERSION_HASH "\"");
+ response->set("ETag", "\"" COOLWSD_VERSION_HASH "\"");
}
else
{
diff --git a/net/HttpRequest.hpp b/net/HttpRequest.hpp
index dd8d448254..198babdaaa 100644
--- a/net/HttpRequest.hpp
+++ b/net/HttpRequest.hpp
@@ -28,7 +28,7 @@
#include "Log.hpp"
#include "Util.hpp"
-#ifndef LOOLWSD_VERSION
+#ifndef COOLWSD_VERSION
static_assert(false, "config.h must be included in the .cpp being compiled");
#endif
diff --git a/net/Socket.cpp b/net/Socket.cpp
index e168b197a9..9548bf23c8 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -56,7 +56,7 @@ std::atomic<bool> Socket::InhibitThreadChecks(false);
#ifdef __linux__
#define HAVE_ABSTRACT_UNIX_SOCKETS
#endif
-#define SOCKET_ABSTRACT_UNIX_NAME "0loolwsd-"
+#define SOCKET_ABSTRACT_UNIX_NAME "0coolwsd-"
int Socket::createSocket(Socket::Type type)
{
@@ -986,7 +986,7 @@ std::string LocalServerSocket::bind()
std::string socketAbstractUnixName(SOCKET_ABSTRACT_UNIX_NAME);
const char* snapInstanceName = std::getenv("SNAP_INSTANCE_NAME");
if (snapInstanceName && snapInstanceName[0])
- socketAbstractUnixName = std::string("0snap.") + snapInstanceName + ".loolwsd-";
+ socketAbstractUnixName = std::string("0snap.") + snapInstanceName + ".coolwsd-";
do
{
diff --git a/net/Socket.hpp b/net/Socket.hpp
index a014ea0545..2599ce1f61 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -372,7 +372,7 @@ protected:
#if !MOBILEAPP
#if ENABLE_DEBUG
- if (std::getenv("LOOL_ZERO_BUFFER_SIZE"))
+ if (std::getenv("COOL_ZERO_BUFFER_SIZE"))
{
const int oldSize = getSocketBufferSize();
setSocketBufferSize(0);
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 3a901f1a8c..5b160069b8 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -855,7 +855,7 @@ protected:
<< "], protocol: [" << wsProtocol << "].");
#if ENABLE_DEBUG
- if (std::getenv("LOOL_ZERO_BUFFER_SIZE"))
+ if (std::getenv("COOL_ZERO_BUFFER_SIZE"))
socket.setSocketBufferSize(0);
#endif
diff --git a/net/WebSocketSession.hpp b/net/WebSocketSession.hpp
index 25b49a9c36..d198b4d22f 100644
--- a/net/WebSocketSession.hpp
+++ b/net/WebSocketSession.hpp
@@ -279,7 +279,7 @@ public:
private:
void handleMessage(const std::vector<char>& data) override
{
- LOG_DBG("Got message: " << LOOLProtocol::getAbbreviatedMessage(data));
+ LOG_DBG("Got message: " << COOLProtocol::getAbbreviatedMessage(data));
{
std::unique_lock<std::mutex> lock(_inMutex);
_inQueue.put(data);
@@ -291,8 +291,8 @@ private:
bool matchMessage(const std::string& prefix, const std::vector<char>& message,
const std::string& context)
{
- const auto header = LOOLProtocol::getFirstLine(message);
- const bool match = LOOLProtocol::matchPrefix(prefix, header);
+ const auto header = COOLProtocol::getFirstLine(message);
+ const bool match = COOLProtocol::matchPrefix(prefix, header);
LOG_DBG(context << (match ? "Matched" : "Skipped") << " message [" << prefix
<< "]: " << header);
return match;
diff --git a/scripts/logparse.pl b/scripts/logparse.pl
index 75444effaf..2ff8834fb1 100755
--- a/scripts/logparse.pl
+++ b/scripts/logparse.pl
@@ -98,9 +98,9 @@ while (my $line = shift @input) {
}
}
- # systemd[1]: loolwsd.service: main process exited, code=killed, status=11/SEGV
- if ($line =~m/loolwsd.service: main process exited.*status=(.*)$/) {
- print "loolwsd exit: $1\n";
+ # systemd[1]: coolwsd.service: main process exited, code=killed, status=11/SEGV
+ if ($line =~m/coolwsd.service: main process exited.*status=(.*)$/) {
+ print "coolwsd exit: $1\n";
}
if ($line =~m/Initializing wsd/) {
@@ -110,25 +110,25 @@ while (my $line = shift @input) {
# different PIDs: ...
- # [loolbroker ] Spawned kit [1689].
- # [loolkit ] loolkit [1689] is ready.
- # [loolbroker ] Child 1536 terminated.
- # [loolbroker ] Child process [1689] exited with code: 0.
- if ($line =~ m/loolbroker.*Forked kit \[(\d+)\]./) {
+ # [coolbroker ] Spawned kit [1689].
+ # [coolkit ] coolkit [1689] is ready.
+ # [coolbroker ] Child 1536 terminated.
+ # [coolbroker ] Child process [1689] exited with code: 0.
+ if ($line =~ m/coolbroker.*Forked kit \[(\d+)\]./) {
my $pid = $1;
$lok_starting{$pid} = 1;
$pevent = "newkit\t\"$pid\"";
$pdetail = '';
}
- if ($line =~ m/loolkit \[(\d+)\] is ready./) {
+ if ($line =~ m/coolkit \[(\d+)\] is ready./) {
my $pid = $1;
delete $lok_starting{$pid};
$lok_running{$pid} = 1;
$pevent = "livekit\t\"$pid\"";
$pdetail = '';
}
- # [loolbroker ] Child process [1689] exited with code: 0.
- if ($line =~ m/loolbroker.*Child process \[(\d+)\]\s+(\S+)\s+.*with /) {
+ # [coolbroker ] Child process [1689] exited with code: 0.
+ if ($line =~ m/coolbroker.*Child process \[(\d+)\]\s+(\S+)\s+.*with /) {
my $pid = $1;
my $code = $2;
$code = 'exit' if ($code eq 'exited');
@@ -137,7 +137,7 @@ while (my $line = shift @input) {
$pdetail = '';
}
- # loolwsd:
+ # coolwsd:
if ($line =~ m/Loading new document from URI: \[([^\]]+)\].*for session \[([^\]]+)\]/) {
my ($doc_uri, $session) = ($1, $2);
$sessions{$session} = $doc_uri;
diff --git a/scripts/perftrace.pl b/scripts/perftrace.pl
index 5b27730782..680e6edd38 100755
--- a/scripts/perftrace.pl
+++ b/scripts/perftrace.pl
@@ -74,7 +74,7 @@ my @event_pairs = (
{
name => 'Initialize wsd.',
type => 'INF',
- emitter => '^loolwsd$',
+ emitter => '^coolwsd$',
start => 'Initializing wsd.\.*',
end => 'Listening to prisoner connections.*' },
{
@@ -354,7 +354,7 @@ while (my $line = $input[$lineno++]) {
$line =~ s/\r*\n*//g;
- # wsd-26974-26974 2019-03-27 03:45:46.735736 [ loolwsd ] INF Initializing wsd. Local time: Wed 2019-03-27 03:45:46+0000. Log level is [8].| common/Log.cpp:191
+ # wsd-26974-26974 2019-03-27 03:45:46.735736 [ coolwsd ] INF Initializing wsd. Local time: Wed 2019-03-27 03:45:46+0000. Log level is [8].| common/Log.cpp:191
if ($line =~ m/^(\w+)-(\d+)-(\d+)\s+\S+\s+(\S+)\s+\[\s+(\S+)\s+\]\s+(\S+)\s+(.+)\|\s+(\S+)$/) {
consume($lineno, $1, $2, $3, $4, $5, $6, $7, $8);
diff --git a/scripts/segv-catch.pl b/scripts/segv-catch.pl
index 658332643f..99f6e65cfa 100755
--- a/scripts/segv-catch.pl
+++ b/scripts/segv-catch.pl
@@ -9,14 +9,14 @@ while (<STDIN>) {
$line =~ m/Fatal signal received: (.*)$/ || next;
my $signal = $1;
- # 2016-04-12T20:06:49.626770+00:00 ip-172-31-34-231 loolwsd[5918]: kit-02721 Fatal signal received: SIGSEGV
+ # 2016-04-12T20:06:49.626770+00:00 ip-172-31-34-231 coolwsd[5918]: kit-02721 Fatal signal received: SIGSEGV
$line =~ m/(\d+-\d+-\d+)T(\d+:\d+:\d+\.)\S+\s+\S+\s+(\S+)\s+(.*)$/ || die "bad line: '$line'";
my ($day, $time, $process, $msg) = ($1, $2, $3, $4);
print "$day $time $process $signal\n";
}
-# 2016-04-12T20:06:49.627111+00:00 ip-172-31-34-231 loolwsd[5918]: Backtrace:
-# 2016-04-12T20:06:49.627455+00:00 ip-172-31-34-231 loolwsd[5918]: /usr/bin/coolforkit() [0x43e86d]
-# 2016-04-12T20:06:49.627795+00:00 ip-172-31-34-231 loolwsd[5918]: /lib64/libpthread.so.0(+0xf890) [0x7f9389f97890]
+# 2016-04-12T20:06:49.627111+00:00 ip-172-31-34-231 coolwsd[5918]: Backtrace:
+# 2016-04-12T20:06:49.627455+00:00 ip-172-31-34-231 coolwsd[5918]: /usr/bin/coolforkit() [0x43e86d]
+# 2016-04-12T20:06:49.627795+00:00 ip-172-31-34-231 coolwsd[5918]: /lib64/libpthread.so.0(+0xf890) [0x7f9389f97890]
diff --git a/sysconfig.loolwsd b/sysconfig.coolwsd
index f04b583705..c10dfcb9aa 100644
--- a/sysconfig.loolwsd
+++ b/sysconfig.coolwsd
@@ -1,6 +1,6 @@
-## Path: Network/Remote access/LOOLWSD
+## Path: Network/Remote access/COOLWSD
## Description: Collabora Online WebSocket Daemon settings
## Type: string
## Default: ""
-## ServiceRestart: loolwsd
+## ServiceRestart: coolwsd
#
diff --git a/test/HttpTestServer.hpp b/test/HttpTestServer.hpp
index 1184c76c6e..342dd811fc 100644
--- a/test/HttpTestServer.hpp
+++ b/test/HttpTestServer.hpp
@@ -15,7 +15,7 @@
#include <chrono>
#include <string>
-#ifndef LOOLWSD_VERSION
+#ifndef COOLWSD_VERSION
static_assert(false, "config.h must be included in the .cpp being compiled");
#endif
diff --git a/test/Makefile.am b/test/Makefile.am
index 583fbbec17..4ab0bb5b58 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,7 +2,7 @@
export MAX_CONCURRENCY=4
AUTOMAKE_OPTION = serial-tests
-# unittest: tests that run a captive loolwsd as part of themselves.
+# unittest: tests that run a captive coolwsd as part of themselves.
check_PROGRAMS = fakesockettest
noinst_PROGRAMS = fakesockettest unittest unithttplib
@@ -10,8 +10,8 @@ noinst_PROGRAMS = fakesockettest unittest unithttplib
AM_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTDOC=\"$(abs_top_srcdir)/test/data\" \
-I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit \
-I${top_srcdir} \
- -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
- -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
+ -pthread -DCOOLWSD_DATADIR='"@COOLWSD_DATADIR@"' \
+ -DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \
-DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
${include_paths}
diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index 331ad17293..86b0d82223 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -23,7 +23,7 @@
#include <Unit.hpp>
#include <Util.hpp>
-#include <countloolkits.hpp>
+#include <countcoolkits.hpp>
#include <helpers.hpp>
#include <test.hpp>
#include <sstream>
@@ -126,20 +126,20 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
void checkTiles(std::shared_ptr<http::WebSocketSession>& socket, const std::string& docType,
const std::string& testname);
- void checkTiles(std::shared_ptr<LOOLWebSocket>& socket, const std::string& type,
+ void checkTiles(std::shared_ptr<COOLWebSocket>& socket, const std::string& type,
const std::string& testname);
void requestTiles(std::shared_ptr<http::WebSocketSession>& socket, const std::string& docType,
const int part, const int docWidth, const int docHeight,
const std::string& testname);
- void requestTiles(std::shared_ptr<LOOLWebSocket>& socket, const std::string& docType,
+ void requestTiles(std::shared_ptr<COOLWebSocket>& socket, const std::string& docType,
const int part, const int docWidth, const int docHeight,
const std::string& testname);
void checkBlackTiles(std::shared_ptr<http::WebSocketSession>& socket, const int /*part*/,
const int /*docWidth*/, const int /*docHeight*/,
const std::string& testname);
- void checkBlackTiles(std::shared_ptr<LOOLWebSocket>& socket, const int part, const int docWidth,
+ void checkBlackTiles(std::shared_ptr<COOLWebSocket>& socket, const int part, const int docWidth,
const int docHeight, const std::string& testname);
void checkBlackTile(std::stringstream& tile);
@@ -169,7 +169,7 @@ public:
void setUp()
{
resetTestStartTime();
- testCountHowManyLoolkits();
+ testCountHowManyCoolkits();
resetTestStartTime();
_socketPoll->startThread();
}
@@ -178,7 +178,7 @@ public:
{
_socketPoll->joinThread();
resetTestStartTime();
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
resetTestStartTime();
}
};
@@ -322,7 +322,7 @@ void TileCacheTests::testCancelTiles()
TST_LOG("cancelTiles try #" << i);
// Wait to clear previous sessions.
- countLoolKitProcesses(InitialLoolKitCount);
+ countCoolKitProcesses(InitialCoolKitCount);
std::shared_ptr<http::WebSocketSession> socket
= loadDocAndGetSession(_socketPoll, "setclientpart.ods", _uri, testname);
@@ -367,7 +367,7 @@ void TileCacheTests::testCancelTilesMultiView()
TST_LOG("cancelTilesMultiView try #" << j);
// Wait to clear previous sessions.
- countLoolKitProcesses(InitialLoolKitCount);
+ countCoolKitProcesses(InitialCoolKitCount);
// Request a huge tile, and cancel immediately.
std::shared_ptr<http::WebSocketSession> socket1
@@ -449,7 +449,7 @@ void TileCacheTests::testDisconnectMultiView()
TST_LOG("disconnectMultiView try #" << j);
// Wait to clear previous sessions.
- countLoolKitProcesses(InitialLoolKitCount);
+ countCoolKitProcesses(InitialCoolKitCount);
// Request a huge tile, and cancel immediately.
std::shared_ptr<http::WebSocketSession> socket1
@@ -634,7 +634,7 @@ void TileCacheTests::testTilesRenderedJustOnce()
sendTextFrame(socket, "ping", testname);
const auto ping1 = assertResponseString(socket, "pong", testname);
int renderCount1 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping1, "rendercount", renderCount1));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping1, "rendercount", renderCount1));
LOK_ASSERT_EQUAL(i * 3, renderCount1);
// Modify.
@@ -651,31 +651,31 @@ void TileCacheTests::testTilesRenderedJustOnce()
sendTextFrame(socket, "ping", testname);
const auto ping2 = assertResponseString(socket, "pong", testname);
int renderCount2 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping2, "rendercount", renderCount2));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping2, "rendercount", renderCount2));
LOK_ASSERT_EQUAL((i+1) * 3, renderCount2);
// Get same 3 tiles.
sendTextFrame(socket, "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840,7680 tileposy=0,0,0 tilewidth=3840 tileheight=3840", testname);
const auto tile1 = assertResponseString(socket, "tile:", testname);
std::string renderId1;
- LOOLProtocol::getTokenStringFromMessage(tile1, "renderid", renderId1);
+ COOLProtocol::getTokenStringFromMessage(tile1, "renderid", renderId1);
LOK_ASSERT_EQUAL(std::string("cached"), renderId1);
const auto tile2 = assertResponseString(socket, "tile:", testname);
std::string renderId2;
- LOOLProtocol::getTokenStringFromMessage(tile2, "renderid", renderId2);
+ COOLProtocol::getTokenStringFromMessage(tile2, "renderid", renderId2);
LOK_ASSERT_EQUAL(std::string("cached"), renderId2);
const auto tile3 = assertResponseString(socket, "tile:", testname);
std::string renderId3;
- LOOLProtocol::getTokenStringFromMessage(tile3, "renderid", renderId3);
+ COOLProtocol::getTokenStringFromMessage(tile3, "renderid", renderId3);
LOK_ASSERT_EQUAL(std::string("cached"), renderId3);
// Get new rendercount.
sendTextFrame(socket, "ping", testname);
const auto ping3 = assertResponseString(socket, "pong", testname);
int renderCount3 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping3, "rendercount", renderCount3));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping3, "rendercount", renderCount3));
LOK_ASSERT_EQUAL(renderCount2, renderCount3);
}
@@ -720,7 +720,7 @@ void TileCacheTests::testTilesRenderedJustOnceMultiClient()
sendTextFrame(socket1, "ping", testname1);
const auto ping1 = assertResponseString(socket1, "pong", testname1);
int renderCount1 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping1, "rendercount", renderCount1));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping1, "rendercount", renderCount1));
LOK_ASSERT_EQUAL(i * 3, renderCount1);
// Modify.
@@ -755,31 +755,31 @@ void TileCacheTests::testTilesRenderedJustOnceMultiClient()
sendTextFrame(socket1, "ping", testname1);
const auto ping2 = assertResponseString(socket1, "pong", testname1);
int renderCount2 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping2, "rendercount", renderCount2));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping2, "rendercount", renderCount2));
LOK_ASSERT_EQUAL((i+1) * 3, renderCount2);
// Get same 3 tiles.
sendTextFrame(socket1, "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840,7680 tileposy=0,0,0 tilewidth=3840 tileheight=3840", testname1);
const auto tile1 = assertResponseString(socket1, "tile:", testname1);
std::string renderId1;
- LOOLProtocol::getTokenStringFromMessage(tile1, "renderid", renderId1);
+ COOLProtocol::getTokenStringFromMessage(tile1, "renderid", renderId1);
LOK_ASSERT_EQUAL(std::string("cached"), renderId1);
const auto tile2 = assertResponseString(socket1, "tile:", testname1);
std::string renderId2;
- LOOLProtocol::getTokenStringFromMessage(tile2, "renderid", renderId2);
+ COOLProtocol::getTokenStringFromMessage(tile2, "renderid", renderId2);
LOK_ASSERT_EQUAL(std::string("cached"), renderId2);
const auto tile3 = assertResponseString(socket1, "tile:", testname1);
std::string renderId3;
- LOOLProtocol::getTokenStringFromMessage(tile3, "renderid", renderId3);
+ COOLProtocol::getTokenStringFromMessage(tile3, "renderid", renderId3);
LOK_ASSERT_EQUAL(std::string("cached"), renderId3);
// Get new rendercount.
sendTextFrame(socket1, "ping", testname1);
const auto ping3 = assertResponseString(socket1, "pong", testname1);
int renderCount3 = 0;
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(ping3, "rendercount", renderCount3));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(ping3, "rendercount", renderCount3));
LOK_ASSERT_EQUAL(renderCount2, renderCount3);
}
@@ -825,9 +825,9 @@ void TileCacheTests::testSimultaneousTilesRenderedJustOnce()
if (!response1.empty() && !response2.empty())
{
std::string renderId1;
- LOOLProtocol::getTokenStringFromMessage(response1, "renderid", renderId1);
+ COOLProtocol::getTokenStringFromMessage(response1, "renderid", renderId1);
std::string renderId2;
- LOOLProtocol::getTokenStringFromMessage(response2, "renderid", renderId2);
+ COOLProtocol::getTokenStringFromMessage(response2, "renderid", renderId2);
LOK_ASSERT(renderId1 == renderId2 ||
(renderId1 == "cached" && renderId2 != "cached") ||
@@ -930,7 +930,7 @@ void TileCacheTests::checkBlackTiles(std::shared_ptr<http::WebSocketSession>& so
return;
}
- const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+ const std::string firstLine = COOLProtocol::getFirstLine(tile);
#if 0
std::fstream outStream("/tmp/black.png", std::ios::out);
@@ -944,7 +944,7 @@ void TileCacheTests::checkBlackTiles(std::shared_ptr<http::WebSocketSession>& so
checkBlackTile(streamTile);
}
-void TileCacheTests::checkBlackTiles(std::shared_ptr<LOOLWebSocket>& socket, const int /*part*/,
+void TileCacheTests::checkBlackTiles(std::shared_ptr<COOLWebSocket>& socket, const int /*part*/,
const int /*docWidth*/, const int /*docHeight*/,
const std::string& testname)
{
@@ -962,7 +962,7 @@ void TileCacheTests::checkBlackTiles(std::shared_ptr<LOOLWebSocket>& socket, con
return;
}
- const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+ const std::string firstLine = COOLProtocol::getFirstLine(tile);
#if 0
std::fstream outStream("/tmp/black.png", std::ios::out);
@@ -1033,7 +1033,7 @@ void TileCacheTests::testTileInvalidateWriterPage()
const auto res = assertResponseString(socket, "invalidatetiles:", testname);
int part = -1;
LOK_ASSERT_MESSAGE("No part# in invalidatetiles message.",
- LOOLProtocol::getTokenIntegerFromMessage(res, "part", part));
+ COOLProtocol::getTokenIntegerFromMessage(res, "part", part));
LOK_ASSERT_EQUAL(0, part);
socket->asyncShutdown();
@@ -1193,12 +1193,12 @@ void TileCacheTests::testTileInvalidatePartCalc()
const auto response1 = assertResponseString(socket1, "invalidatetiles:", testname1);
int value1;
- LOOLProtocol::getTokenIntegerFromMessage(response1, "part", value1);
+ COOLProtocol::getTokenIntegerFromMessage(response1, "part", value1);
LOK_ASSERT_EQUAL(2, value1);
const auto response2 = assertResponseString(socket2, "invalidatetiles:", testname2);
int value2;
- LOOLProtocol::getTokenIntegerFromMessage(response2, "part", value2);
+ COOLProtocol::getTokenIntegerFromMessage(response2, "part", value2);
LOK_ASSERT_EQUAL(5, value2);
}
@@ -1242,12 +1242,12 @@ void TileCacheTests::testTileInvalidatePartImpress()
const auto response1 = assertResponseString(socket1, "invalidatetiles:", testname1);
int value1;
- LOOLProtocol::getTokenIntegerFromMessage(response1, "part", value1);
+ COOLProtocol::getTokenIntegerFromMessage(response1, "part", value1);
LOK_ASSERT_EQUAL(2, value1);
const auto response2 = assertResponseString(socket2, "invalidatetiles:", testname2);
int value2;
- LOOLProtocol::getTokenIntegerFromMessage(response2, "part", value2);
+ COOLProtocol::getTokenIntegerFromMessage(response2, "part", value2);
LOK_ASSERT_EQUAL(5, value2);
}
@@ -1418,7 +1418,7 @@ void TileCacheTests::requestTiles(std::shared_ptr<http::WebSocketSession>& socke
TST_LOG("requestTiles for " << testname << " finished.");
}
-void TileCacheTests::checkTiles(std::shared_ptr<LOOLWebSocket>& socket, const std::string& docType,
+void TileCacheTests::checkTiles(std::shared_ptr<COOLWebSocket>& socket, const std::string& docType,
const std::string& testname)
{
const std::string current = "current=";
@@ -1503,7 +1503,7 @@ void TileCacheTests::checkTiles(std::shared_ptr<LOOLWebSocket>& socket, const st
}
}
-void TileCacheTests::requestTiles(std::shared_ptr<LOOLWebSocket>& socket,
+void TileCacheTests::requestTiles(std::shared_ptr<COOLWebSocket>& socket,
const std::string& , const int part, const int docWidth,
const int docHeight, const std::string& testname)
{
diff --git a/test/UnitAdmin.cpp b/test/UnitAdmin.cpp
index 66caa77899..469d0d0a52 100644
--- a/test/UnitAdmin.cpp
+++ b/test/UnitAdmin.cpp
@@ -26,7 +26,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-#define UNIT_URI "/loolwsd/unit-admin"
+#define UNIT_URI "/coolwsd/unit-admin"
using Poco::Net::HTTPBasicCredentials;
using Poco::Net::HTTPCookie;
@@ -42,14 +42,14 @@ private:
std::string _jwtCookie;
bool _isTestRunning = false;
const Poco::URI _uri;
- std::shared_ptr<LOOLWebSocket> _adminWs;
+ std::shared_ptr<COOLWebSocket> _adminWs;
typedef TestResult (UnitAdmin::*AdminTest)(void);
std::vector<AdminTest> _tests;
- std::shared_ptr<LOOLWebSocket> _docWs1;
- std::shared_ptr<LOOLWebSocket> _docWs2;
- std::shared_ptr<LOOLWebSocket> _docWs3;
+ std::shared_ptr<COOLWebSocket> _docWs1;
+ std::shared_ptr<COOLWebSocket> _docWs2;
+ std::shared_ptr<COOLWebSocket> _docWs3;
int _docPid1;
int _docPid2;
int _docPid3;
@@ -128,7 +128,7 @@ private:
HTTPRequest request(HTTPRequest::HTTP_GET, "/cool/adminws/");
std::unique_ptr<HTTPClientSession> session(UnitHTTP::createSession());
- _adminWs = std::make_shared<LOOLWebSocket>(*session, request, response);
+ _adminWs = std::make_shared<COOLWebSocket>(*session, request, response);
const std::string testMessage = "documents";
std::unique_lock<std::mutex> lock(_messageReceivedMutex);
_messageReceived.clear();
@@ -159,7 +159,7 @@ private:
HTTPRequest request(HTTPRequest::HTTP_GET, "/cool/adminws/");
std::unique_ptr<HTTPClientSession> session(UnitHTTP::createSession());
- _adminWs = std::make_shared<LOOLWebSocket>(*session, request, response);
+ _adminWs = std::make_shared<COOLWebSocket>(*session, request, response);
const std::string testMessage = "auth jwt=incorrectJWT";
std::unique_lock<std::mutex> lock(_messageReceivedMutex);
_messageReceived.clear();
@@ -190,7 +190,7 @@ private:
HTTPRequest request(HTTPRequest::HTTP_GET, "/cool/adminws/");
std::unique_ptr<HTTPClientSession> session(UnitHTTP::createSession());
- _adminWs = std::make_shared<LOOLWebSocket>(*session, request, response);
+ _adminWs = std::make_shared<COOLWebSocket>(*session, request, response);
const std::string authMessage = "auth jwt=" + _jwtCookie;
_adminWs->sendFrame(authMessage.data(), authMessage.size());
@@ -213,7 +213,7 @@ private:
std::unique_lock<std::mutex> lock(_messageReceivedMutex);
_messageReceived.clear();
- _docWs1 = std::make_shared<LOOLWebSocket>(*session1, request1, response1);
+ _docWs1 = std::make_shared<COOLWebSocket>(*session1, request1, response1);
_docWs1->sendFrame(loadMessage1.data(), loadMessage1.size());
if (_messageReceivedCV.wait_for(lock, std::chrono::milliseconds(_messageTimeoutMilliSeconds)) == std::cv_status::timeout)
{
@@ -241,7 +241,7 @@ private:
// Open another view of same document
lock.lock(); // lock _messageReceivedMutex
_messageReceived.clear();
- _docWs2 = std::make_shared<LOOLWebSocket>(*session2, request1, response1);
+ _docWs2 = std::make_shared<COOLWebSocket>(*session2, request1, response1);
_docWs2->sendFrame(loadMessage1.data(), loadMessage1.size());
if (_messageReceivedCV.wait_for(lock, std::chrono::milliseconds(_messageTimeoutMilliSeconds)) == std::cv_status::timeout)
{
@@ -276,7 +276,7 @@ private:
lock.lock(); // lock _messageReceivedMutex
_messageReceived.clear();
- _docWs3 = std::make_shared<LOOLWebSocket>(*session3, request2, response2);
+ _docWs3 = std::make_shared<COOLWebSocket>(*session3, request2, response2);
_docWs3->sendFrame(loadMessage2.data(), loadMessage2.size());
if (_messageReceivedCV.wait_for(lock, std::chrono::milliseconds(_messageTimeoutMilliSeconds)) == std::cv_status::timeout)
{
diff --git a/test/UnitBadDocLoad.cpp b/test/UnitBadDocLoad.cpp
index adf7902705..8620fd9e9b 100644
--- a/test/UnitBadDocLoad.cpp
+++ b/test/UnitBadDocLoad.cpp
@@ -24,7 +24,7 @@
// Include config.h last, so the test server URI is still HTTP, even in SSL builds.
#include <config.h>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Test suite for bad document loading, etc.
class UnitBadDocLoad : public UnitWSD
@@ -50,7 +50,7 @@ UnitBase::TestResult UnitBadDocLoad::testBadDocLoadFail()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::URI uri(helpers::getTestServerURI());
Poco::Net::HTTPResponse httpResponse;
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::connectLOKit(uri, request, httpResponse, testname);
// Send a load request with incorrect password
@@ -62,8 +62,8 @@ UnitBase::TestResult UnitBadDocLoad::testBadDocLoadFail()
std::string errorCommand;
std::string errorKind;
- LOOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
- LOOLProtocol::getTokenString(tokens[2], "kind", errorKind);
+ COOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
+ COOLProtocol::getTokenString(tokens[2], "kind", errorKind);
LOK_ASSERT_EQUAL(std::string("load"), errorCommand);
LOK_ASSERT_EQUAL(std::string("faileddocloading"), errorKind);
}
@@ -90,7 +90,7 @@ UnitBase::TestResult UnitBadDocLoad::testMaxDocuments()
try
{
// Load a document.
- std::vector<std::shared_ptr<LOOLWebSocket>> docs;
+ std::vector<std::shared_ptr<COOLWebSocket>> docs;
std::cerr << "Loading max number of documents: " << MAX_DOCUMENTS << std::endl;
for (int it = 1; it <= MAX_DOCUMENTS; ++it)
@@ -110,7 +110,7 @@ UnitBase::TestResult UnitBadDocLoad::testMaxDocuments()
Poco::URI uri(helpers::getTestServerURI());
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(uri));
Poco::Net::HTTPResponse httpResponse;
- auto socket = std::make_shared<LOOLWebSocket>(*session, request, httpResponse);
+ auto socket = std::make_shared<COOLWebSocket>(*session, request, httpResponse);
// Send load request, which will fail.
helpers::sendTextFrame(socket, "load url=" + docURL, testname);
@@ -155,15 +155,15 @@ UnitBase::TestResult UnitBadDocLoad::testMaxConnections()
helpers::getDocumentPathAndURL("empty.odt", docPath, docURL, testname);
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, docURL);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, docURL, testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, docURL, testname);
std::cerr << "Opened connection #1 of " << MAX_CONNECTIONS << std::endl;
- std::vector<std::shared_ptr<LOOLWebSocket>> views;
+ std::vector<std::shared_ptr<COOLWebSocket>> views;
for (int it = 1; it < MAX_CONNECTIONS; ++it)
{
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(uri));
Poco::Net::HTTPResponse httpResponse;
- auto ws = std::make_shared<LOOLWebSocket>(*session, request, httpResponse);
+ auto ws = std::make_shared<COOLWebSocket>(*session, request, httpResponse);
views.emplace_back(ws);
std::cerr << "Opened connection #" << (it + 1) << " of " << MAX_CONNECTIONS
<< std::endl;
@@ -174,7 +174,7 @@ UnitBase::TestResult UnitBadDocLoad::testMaxConnections()
// try to connect MAX_CONNECTIONS + 1
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(uri));
Poco::Net::HTTPResponse httpResponse;
- auto socketN = std::make_shared<LOOLWebSocket>(*session, request, httpResponse);
+ auto socketN = std::make_shared<COOLWebSocket>(*session, request, httpResponse);
// Send load request, which will fail.
helpers::sendTextFrame(socketN, "load url=" + docURL, testname);
@@ -217,10 +217,10 @@ UnitBase::TestResult UnitBadDocLoad::testMaxViews()
helpers::getDocumentPathAndURL("empty.odt", docPath, docURL, testname);
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, docURL);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, docURL, testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, docURL, testname);
std::cerr << "Opened view #1 of " << MAX_CONNECTIONS << std::endl;
- std::vector<std::shared_ptr<LOOLWebSocket>> views;
+ std::vector<std::shared_ptr<COOLWebSocket>> views;
for (int it = 1; it < MAX_CONNECTIONS; ++it)
{
views.emplace_back(helpers::loadDocAndGetSocket(uri, docURL, testname));
@@ -232,7 +232,7 @@ UnitBase::TestResult UnitBadDocLoad::testMaxViews()
// try to connect MAX_CONNECTIONS + 1
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(uri));
Poco::Net::HTTPResponse httpResponse;
- auto socketN = std::make_shared<LOOLWebSocket>(*session, request, httpResponse);
+ auto socketN = std::make_shared<COOLWebSocket>(*session, request, httpResponse);
// Send load request, which will fail.
helpers::sendTextFrame(socketN, "load url=" + docURL, testname);
diff --git a/test/UnitCalc.cpp b/test/UnitCalc.cpp
index f9d65a0aa3..18fa4c2336 100644
--- a/test/UnitCalc.cpp
+++ b/test/UnitCalc.cpp
@@ -21,7 +21,7 @@
#include <Unit.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -46,7 +46,7 @@ double getColRowSize(const std::string& property, const std::string& message, in
return item->getValue<double>("size");
}
-double getColRowSize(const std::shared_ptr<LOOLWebSocket>& socket, const std::string& item,
+double getColRowSize(const std::shared_ptr<COOLWebSocket>& socket, const std::string& item,
int index, const std::string& testname)
{
std::vector<char> response;
@@ -77,7 +77,7 @@ UnitBase::TestResult UnitCalc::testCalcEditRendering()
{
const char* testname = "calcEditRendering ";
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("calc_render.xls", uri, testname);
helpers::sendTextFrame(socket, "mouse type=buttondown x=5000 y=5 count=1 buttons=1 modifier=0",
@@ -100,7 +100,7 @@ UnitBase::TestResult UnitCalc::testCalcEditRendering()
int minor = 0;
helpers::getServerVersion(socket, major, minor, testname);
- const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+ const std::string firstLine = COOLProtocol::getFirstLine(tile);
std::vector<char> res(tile.begin() + firstLine.size() + 1, tile.end());
std::stringstream streamRes;
std::copy(res.begin(), res.end(), std::ostream_iterator<char>(streamRes));
@@ -155,7 +155,7 @@ UnitBase::TestResult UnitCalc::testCalcRenderAfterNewView51()
helpers::getDocumentPathAndURL("empty.ods", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
int major = 0;
@@ -186,7 +186,7 @@ UnitBase::TestResult UnitCalc::testCalcRenderAfterNewView51()
// Connect second client, which will load at the top.
TST_LOG("Connecting second client.");
- std::shared_ptr<LOOLWebSocket> socket2
+ std::shared_ptr<COOLWebSocket> socket2
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
// Up one row on the first view to trigger the bug.
@@ -211,7 +211,7 @@ UnitBase::TestResult UnitCalc::testCalcRenderAfterNewView53()
helpers::getDocumentPathAndURL("calc-render.ods", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
int major = 0;
@@ -236,7 +236,7 @@ UnitBase::TestResult UnitCalc::testCalcRenderAfterNewView53()
// Connect second client, which will load at the top.
TST_LOG("Connecting second client.");
- std::shared_ptr<LOOLWebSocket> socket2
+ std::shared_ptr<COOLWebSocket> socket2
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
TST_LOG("Waiting for cellviewcursor of second on first.");
@@ -265,7 +265,7 @@ UnitBase::TestResult UnitCalc::testColumnRowResize()
helpers::getDocumentPathAndURL("setclientpart.ods", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
const std::string commandValues = "commandvalues command=.uno:ViewRowColumnHeaders";
@@ -372,7 +372,7 @@ UnitBase::TestResult UnitCalc::testOptimalResize()
std::string documentPath, documentURL;
helpers::getDocumentPathAndURL("empty.ods", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
const std::string commandValues = "commandvalues command=.uno:ViewRowColumnHeaders";
diff --git a/test/UnitClient.cpp b/test/UnitClient.cpp
index 42812f7a0a..8abb53c799 100644
--- a/test/UnitClient.cpp
+++ b/test/UnitClient.cpp
@@ -13,7 +13,7 @@
#define TST_LOG_REDIRECT
#include <Unit.hpp>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
#include <test.hpp>
diff --git a/test/UnitClose.cpp b/test/UnitClose.cpp
index 54e8e5c78d..de69809527 100644
--- a/test/UnitClose.cpp
+++ b/test/UnitClose.cpp
@@ -25,7 +25,7 @@
// Include config.h last, so the test server URI is still HTTP, even in SSL builds.
#include <config.h>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -61,7 +61,7 @@ UnitBase::TestResult UnitClose::testCloseAfterClose()
{
TST_LOG("Connecting and loading.");
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("hello.odt", uri, testname);
// send normal socket shutdown
@@ -116,7 +116,7 @@ UnitBase::TestResult UnitClose::testFontList()
{
// Load a document
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("setclientpart.odp", uri, testname);
helpers::sendTextFrame(socket, "commandvalues command=.uno:CharFontName", testname);
@@ -144,7 +144,7 @@ UnitBase::TestResult UnitClose::testGraphicInvalidate()
{
// Load a document.
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("shape.ods", uri, testname);
// Send click message
@@ -181,7 +181,7 @@ UnitBase::TestResult UnitClose::testAlertAllUsers()
const char* testname = "alertAllUsers ";
try
{
- std::shared_ptr<LOOLWebSocket> socket[4];
+ std::shared_ptr<COOLWebSocket> socket[4];
Poco::URI uri(helpers::getTestServerURI());
socket[0] = helpers::loadDocAndGetSocket("hello.odt", uri, testname);
@@ -197,10 +197,10 @@ UnitBase::TestResult UnitClose::testAlertAllUsers()
= helpers::assertResponseString(socket[i], "error:", testname);
StringVector tokens(Util::tokenize(response.substr(6), ' '));
std::string cmd;
- LOOLProtocol::getTokenString(tokens, "cmd", cmd);
+ COOLProtocol::getTokenString(tokens, "cmd", cmd);
LOK_ASSERT_EQUAL(std::string("internal"), cmd);
std::string kind;
- LOOLProtocol::getTokenString(tokens, "kind", kind);
+ COOLProtocol::getTokenString(tokens, "kind", kind);
LOK_ASSERT_EQUAL(std::string("diskfull"), kind);
}
}
diff --git a/test/UnitCopyPaste.cpp b/test/UnitCopyPaste.cpp
index 4581ac68e7..4ece40892c 100644
--- a/test/UnitCopyPaste.cpp
+++ b/test/UnitCopyPaste.cpp
@@ -15,7 +15,7 @@
#include <UnitHTTP.hpp>
#include <helpers.hpp>
#include <sstream>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
#include <common/Clipboard.hpp>
#include <wsd/ClientSession.hpp>
#include <net/WebSocketSession.hpp>
@@ -211,7 +211,7 @@ public:
std::shared_ptr<DocumentBroker> broker;
std::shared_ptr<ClientSession> clientSession;
- std::vector<std::shared_ptr<DocumentBroker>> brokers = LOOLWSD::getBrokersTestOnly();
+ std::vector<std::shared_ptr<DocumentBroker>> brokers = COOLWSD::getBrokersTestOnly();
assert(brokers.size() > 0);
broker = brokers[0];
auto sessions = broker->getSessionsTestOnlyUnsafe();
diff --git a/test/UnitCursor.cpp b/test/UnitCursor.cpp
index a175421ff9..3983700053 100644
--- a/test/UnitCursor.cpp
+++ b/test/UnitCursor.cpp
@@ -20,7 +20,7 @@
#include <Unit.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -45,7 +45,7 @@ void getCursor(const std::string& message, int& cursorX, int& cursorY, int& curs
LOK_ASSERT(cursorHeight >= 0);
}
-void limitCursor(const std::function<void(const std::shared_ptr<LOOLWebSocket>& socket, int cursorX,
+void limitCursor(const std::function<void(const std::shared_ptr<COOLWebSocket>& socket, int cursorX,
int cursorY, int cursorWidth, int cursorHeight,
int docWidth, int docHeight)>& keyhandler,
const std::function<void(int docWidth, int docHeight, int newWidth,
@@ -69,7 +69,7 @@ void limitCursor(const std::function<void(const std::shared_ptr<LOOLWebSocket>&
std::string response;
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("empty.ods", uri, testname);
// check document size
@@ -126,7 +126,7 @@ UnitBase::TestResult UnitCursor::testMaxColumn()
{
limitCursor(
// move cursor to last column
- [](const std::shared_ptr<LOOLWebSocket>& socket, int cursorX, int cursorY,
+ [](const std::shared_ptr<COOLWebSocket>& socket, int cursorX, int cursorY,
int cursorWidth, int cursorHeight, int docWidth, int docHeight) {
LOK_ASSERT(cursorX >= 0);
LOK_ASSERT(cursorY >= 0);
@@ -162,7 +162,7 @@ UnitBase::TestResult UnitCursor::testMaxRow()
{
limitCursor(
// move cursor to last row
- [](const std::shared_ptr<LOOLWebSocket>& socket, int cursorX, int cursorY,
+ [](const std::shared_ptr<COOLWebSocket>& socket, int cursorX, int cursorY,
int cursorWidth, int cursorHeight, int docWidth, int docHeight) {
LOK_ASSERT(cursorX >= 0);
LOK_ASSERT(cursorY >= 0);
@@ -200,7 +200,7 @@ UnitBase::TestResult UnitCursor::testInsertAnnotationWriter()
helpers::getDocumentPathAndURL("hello.odt", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
// Insert comment.
@@ -251,7 +251,7 @@ UnitBase::TestResult UnitCursor::testInsertAnnotationWriter()
socket->shutdown();
// Make sure the document is fully unloaded.
- // testNoExtraLoolKitsLeft();
+ // testNoExtraCoolKitsLeft();
TST_LOG("Reloading ");
socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
@@ -291,7 +291,7 @@ UnitBase::TestResult UnitCursor::testEditAnnotationWriter()
helpers::getDocumentPathAndURL("with_comment.odt", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
// Click in the body.
@@ -320,7 +320,7 @@ UnitBase::TestResult UnitCursor::testEditAnnotationWriter()
LOK_ASSERT_EQUAL(
std::string("textselectioncontent: and now for something completely different"), res);
- // const int kitcount = getLoolKitProcessCount();
+ // const int kitcount = getCoolKitProcessCount();
// Close and reopen the same document and test again.
TST_LOG("Closing connection after pasting.");
@@ -330,7 +330,7 @@ UnitBase::TestResult UnitCursor::testEditAnnotationWriter()
socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
// Should have no new instances.
- // CPPUNIT_ASSERT_EQUAL(kitcount, countLoolKitProcesses(kitcount));
+ // CPPUNIT_ASSERT_EQUAL(kitcount, countCoolKitProcesses(kitcount));
// Confirm that the text is in the comment and not doc body.
// Click in the body.
@@ -363,7 +363,7 @@ UnitBase::TestResult UnitCursor::testInsertAnnotationCalc()
{
const char* testname = "insertAnnotationCalc ";
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("setclientpart.ods", uri, testname);
// Insert comment.
diff --git a/test/UnitEachView.cpp b/test/UnitEachView.cpp
index 9fd07bdbeb..580da4fec9 100644
--- a/test/UnitEachView.cpp
+++ b/test/UnitEachView.cpp
@@ -20,7 +20,7 @@
// Include config.h last, so the test server URI is still HTTP, even in SSL builds.
#include <config.h>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -37,7 +37,7 @@ void testEachView(const std::string& doc, const std::string& type, const std::st
helpers::getDocumentPathAndURL(doc, documentPath, documentURL, testname);
int itView = 0;
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, Poco::format(view, itView));
// Check document size
@@ -68,7 +68,7 @@ void testEachView(const std::string& doc, const std::string& type, const std::st
LOK_ASSERT_MESSAGE(Poco::format(error, itView, protocol), !response.empty());
// Connect and load 0..N Views, where N<=limit
- std::vector<std::shared_ptr<LOOLWebSocket>> views;
+ std::vector<std::shared_ptr<COOLWebSocket>> views;
static_assert(MAX_DOCUMENTS >= 2, "MAX_DOCUMENTS must be at least 2");
const int limit = std::min(4, MAX_DOCUMENTS - 1); // +1 connection above
for (itView = 0; itView < limit; ++itView)
diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp
index 0731e9bf2e..4871b41ec0 100644
--- a/test/UnitHTTP.cpp
+++ b/test/UnitHTTP.cpp
@@ -122,7 +122,7 @@ public:
socket,
"POST /cool/convert-to/txt HTTP/1.1\r\n"
"Host: localhost:9980\r\n"
- "User-Agent: looltests/1.2.3\r\n"
+ "User-Agent: cooltests/1.2.3\r\n"
"Accept: */*\r\n"
"Expect: 100-continue\r\n"
"Transfer-Encoding: chunked\r\n"
diff --git a/test/UnitHTTP.hpp b/test/UnitHTTP.hpp
index 33b55ce93b..0dde381281 100644
--- a/test/UnitHTTP.hpp
+++ b/test/UnitHTTP.hpp
@@ -18,7 +18,7 @@
#include <Poco/Version.h>
#include "Common.hpp"
-#include <tools/LOOLWebSocket.hpp>
+#include <tools/COOLWebSocket.hpp>
using Poco::Net::SocketAddress;
using Poco::Net::HTTPServerParams;
@@ -122,7 +122,7 @@ namespace UnitHTTP
class UnitWebSocket
{
Poco::Net::HTTPClientSession* _session;
- LOOLWebSocket* _socket;
+ COOLWebSocket* _socket;
public:
/// Get a websocket connected for a given URL
@@ -135,7 +135,7 @@ public:
_session = UnitHTTP::createSession();
// FIXME: leaking the session - hey ho ... do we need a UnitSocket ?
- _socket = new LOOLWebSocket(*_session, request, response);
+ _socket = new COOLWebSocket(*_session, request, response);
} catch (const Poco::Exception &ex) {
std::cerr << "Exception creating websocket " << ex.displayText() << std::endl;
throw;
@@ -148,7 +148,7 @@ public:
delete _session;
}
- LOOLWebSocket* getLOOLWebSocket() const
+ COOLWebSocket* getCOOLWebSocket() const
{
return _socket;
}
diff --git a/test/UnitHosting.cpp b/test/UnitHosting.cpp
index 5246b801c1..a369c4b5a0 100644
--- a/test/UnitHosting.cpp
+++ b/test/UnitHosting.cpp
@@ -27,7 +27,7 @@
#include <Unit.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Test suite for /hosting, etc.
class UnitHosting : public UnitWSD
diff --git a/test/UnitInsertDelete.cpp b/test/UnitInsertDelete.cpp
index 9b1c2aae57..debf7e2690 100644
--- a/test/UnitInsertDelete.cpp
+++ b/test/UnitInsertDelete.cpp
@@ -21,7 +21,7 @@
#include <Unit.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -101,7 +101,7 @@ UnitBase::TestResult UnitInsertDelete::testInsertDelete()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::URI uri(helpers::getTestServerURI());
Poco::Net::HTTPResponse httpResponse;
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::connectLOKit(uri, request, httpResponse, testname);
helpers::sendTextFrame(socket, "load url=" + documentURL);
@@ -206,7 +206,7 @@ UnitBase::TestResult UnitInsertDelete::testPasteBlank()
{
// Load a document and make it empty, then paste nothing into it.
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("hello.odt", uri, testname);
helpers::deleteAll(socket, testname);
@@ -234,9 +234,9 @@ UnitBase::TestResult UnitInsertDelete::testGetTextSelection()
helpers::getDocumentPathAndURL("hello.odt", documentPath, documentURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket2
+ std::shared_ptr<COOLWebSocket> socket2
= helpers::loadDocAndGetSocket(uri, documentURL, testname);
static const std::string expected = "Hello world";
@@ -263,7 +263,7 @@ UnitBase::TestResult UnitInsertDelete::testCursorPosition()
helpers::getDocumentPathAndURL("Example.odt", docPath, docURL, testname);
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket0
+ std::shared_ptr<COOLWebSocket> socket0
= helpers::loadDocAndGetSocket(uri, docURL, testname);
// receive cursor position
@@ -279,7 +279,7 @@ UnitBase::TestResult UnitInsertDelete::testCursorPosition()
LOK_ASSERT_EQUAL(static_cast<size_t>(4), cursorTokens.size());
// Create second view
- std::shared_ptr<LOOLWebSocket> socket1
+ std::shared_ptr<COOLWebSocket> socket1
= helpers::loadDocAndGetSocket(uri, docURL, testname);
//receive view cursor position
diff --git a/test/UnitLargePaste.cpp b/test/UnitLargePaste.cpp
index 4607256317..3ad1f92e7a 100644
--- a/test/UnitLargePaste.cpp
+++ b/test/UnitLargePaste.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Large paste testcase.
class UnitLargePaste : public UnitWSD
@@ -38,7 +38,7 @@ void UnitLargePaste::invokeWSDTest()
std::string documentPath;
std::string documentURL;
helpers::getDocumentPathAndURL("hello.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, testname);
helpers::sendTextFrame(socket, "uno .uno:SelectAll", testname);
diff --git a/test/UnitLoad.cpp b/test/UnitLoad.cpp
index 6d82e338ee..27288d0cb1 100644
--- a/test/UnitLoad.cpp
+++ b/test/UnitLoad.cpp
@@ -24,7 +24,7 @@
#include <helpers.hpp>
#include <net/WebSocketSession.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -37,7 +37,7 @@ void loadDoc(const std::string& documentURL, const std::string& testname)
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::URI uri(helpers::getTestServerURI());
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::connectLOKit(uri, request, response, testname);
helpers::sendTextFrame(socket, "load url=" + documentURL, testname);
@@ -85,7 +85,7 @@ UnitBase::TestResult UnitLoad::testConnectNoLoad()
TST_LOG_NAME(testname1, "Connecting first to disconnect without loading.");
Poco::Net::HTTPResponse response;
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::connectLOKit(uri, request, response, testname1);
LOK_ASSERT_MESSAGE("Failed to connect.", socket);
TST_LOG_NAME(testname1, "Disconnecting first.");
@@ -95,7 +95,7 @@ UnitBase::TestResult UnitLoad::testConnectNoLoad()
// Connect and load first view.
TST_LOG_NAME(testname2, "Connecting second to load first view.");
- std::shared_ptr<LOOLWebSocket> socket1
+ std::shared_ptr<COOLWebSocket> socket1
= helpers::connectLOKit(uri, request, response, testname2);
LOK_ASSERT_MESSAGE("Failed to connect.", socket1);
helpers::sendTextFrame(socket1, "load url=" + documentURL, testname2);
@@ -104,7 +104,7 @@ UnitBase::TestResult UnitLoad::testConnectNoLoad()
// Connect but don't load second view.
TST_LOG_NAME(testname3, "Connecting third to disconnect without loading.");
- std::shared_ptr<LOOLWebSocket> socket2
+ std::shared_ptr<COOLWebSocket> socket2
= helpers::connectLOKit(uri, request, response, testname3);
LOK_ASSERT_MESSAGE("Failed to connect.", socket2);
TST_LOG_NAME(testname3, "Disconnecting third.");
@@ -141,7 +141,7 @@ UnitBase::TestResult UnitLoad::testBadLoad()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::URI uri(helpers::getTestServerURI());
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::connectLOKit(uri, request, response, testname);
// Before loading request status.
@@ -164,7 +164,7 @@ UnitBase::TestResult UnitLoad::testExcelLoad()
{
// Load a document and get status.
Poco::URI uri(helpers::getTestServerURI());
- std::shared_ptr<LOOLWebSocket> socket
+ std::shared_ptr<COOLWebSocket> socket
= helpers::loadDocAndGetSocket("timeline.xlsx", uri, testname);
helpers::sendTextFrame(socket, "status", testname);
diff --git a/test/UnitLoadTorture.cpp b/test/UnitLoadTorture.cpp
index 8cc4736e52..284cd84aa2 100644
--- a/test/UnitLoadTorture.cpp
+++ b/test/UnitLoadTorture.cpp
@@ -20,7 +20,7 @@
#include <helpers.hpp>
#include <net/WebSocketSession.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Load torture testcase.
class UnitLoadTorture : public UnitWSD
@@ -74,10 +74,10 @@ int UnitLoadTorture::loadTorture(const std::string& testname, const std::string&
// 20s is double of the default.
std::vector<char> message
= wsSession->waitForMessage("status:", std::chrono::seconds(20), testname + id + ' ');
- const std::string status = LOOLProtocol::getFirstLine(message);
+ const std::string status = COOLProtocol::getFirstLine(message);
int viewid = -1;
- LOOLProtocol::getTokenIntegerFromMessage(status, "viewid", viewid);
+ COOLProtocol::getTokenIntegerFromMessage(status, "viewid", viewid);
sum_view_ids += viewid;
++num_of_views;
--num_to_load;
diff --git a/test/UnitOAuth.cpp b/test/UnitOAuth.cpp
index 370340a264..9dd210e0fd 100644
--- a/test/UnitOAuth.cpp
+++ b/test/UnitOAuth.cpp
@@ -100,7 +100,7 @@ public:
else
initWebsocket("/wopi/files/1?access_header=Authorization: Basic basic==");
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
SocketPoll::wakeupWorld();
if (_phase == Phase::LoadToken)
diff --git a/test/UnitPasswordProtected.cpp b/test/UnitPasswordProtected.cpp
index d2705346d0..63696a3bae 100644
--- a/test/UnitPasswordProtected.cpp
+++ b/test/UnitPasswordProtected.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Password protected testcase.
class UnitPasswordProtected : public UnitWSD
@@ -44,7 +44,7 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedDocumentWithout
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse httpResponse;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, httpResponse, testname);
// Send a load request without password first
@@ -56,8 +56,8 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedDocumentWithout
std::string errorCommand;
std::string errorKind;
- LOOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
- LOOLProtocol::getTokenString(tokens[2], "kind", errorKind);
+ COOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
+ COOLProtocol::getTokenString(tokens[2], "kind", errorKind);
LOK_ASSERT_EQUAL(std::string("load"), errorCommand);
LOK_ASSERT_EQUAL(std::string("passwordrequired:to-view"), errorKind);
}
@@ -80,7 +80,7 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedDocumentWithWro
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse httpResponse;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, httpResponse, testname);
// Send a load request with incorrect password
@@ -92,8 +92,8 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedDocumentWithWro
std::string errorCommand;
std::string errorKind;
- LOOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
- LOOLProtocol::getTokenString(tokens[2], "kind", errorKind);
+ COOLProtocol::getTokenString(tokens[1], "cmd", errorCommand);
+ COOLProtocol::getTokenString(tokens[2], "kind", errorKind);
LOK_ASSERT_EQUAL(std::string("load"), errorCommand);
LOK_ASSERT_EQUAL(std::string("wrongpassword"), errorKind);
}
@@ -116,7 +116,7 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedDocumentWithCor
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, response, testname);
// Send a load request with correct password
@@ -149,7 +149,7 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedOOXMLDocument()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, response, testname);
// Send a load request with correct password
@@ -177,7 +177,7 @@ UnitBase::TestResult UnitPasswordProtected::testPasswordProtectedBinaryMSOfficeD
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, response, testname);
// Send a load request with correct password
diff --git a/test/UnitPaste.cpp b/test/UnitPaste.cpp
index b82e702011..3dda9adf2b 100644
--- a/test/UnitPaste.cpp
+++ b/test/UnitPaste.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Paste testcase.
class UnitPaste : public UnitWSD
@@ -34,7 +34,7 @@ void UnitPaste::invokeWSDTest()
std::string documentPath;
std::string documentURL;
helpers::getDocumentPathAndURL("hello.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, testname);
for (int i = 0; i < 5; ++i)
diff --git a/test/UnitPrefork.cpp b/test/UnitPrefork.cpp
index 12d4c02cc3..1971640317 100644
--- a/test/UnitPrefork.cpp
+++ b/test/UnitPrefork.cpp
@@ -8,7 +8,7 @@
#include <config.h>
#include <Unit.hpp>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
const int NumToPrefork = 20;
diff --git a/test/UnitRenderSearchResult.cpp b/test/UnitRenderSearchResult.cpp
index c69cf769f1..8b89879945 100644
--- a/test/UnitRenderSearchResult.cpp
+++ b/test/UnitRenderSearchResult.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
class UnitRenderSearchResult : public UnitWSD
{
@@ -35,7 +35,7 @@ void UnitRenderSearchResult::invokeWSDTest()
std::string documentURL;
helpers::getDocumentPathAndURL("RenderSearchResultTest.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(Poco::URI(helpers::getTestServerURI()), documentURL, testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(Poco::URI(helpers::getTestServerURI()), documentURL, testname);
helpers::sendTextFrame(socket, "rendersearchresult <indexing><paragraph node_type=\"writer\" index=\"19\"/></indexing>");
std::vector<char> responseMessage = helpers::getResponseMessage(socket, "rendersearchresult:", testname);
diff --git a/test/UnitRenderShape.cpp b/test/UnitRenderShape.cpp
index d38c8a72e7..b1aba8e917 100644
--- a/test/UnitRenderShape.cpp
+++ b/test/UnitRenderShape.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -85,7 +85,7 @@ UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionImpress()
std::string documentPath, documentURL;
helpers::getDocumentPathAndURL("shapes.odp", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, testname);
int major = 0;
@@ -128,7 +128,7 @@ UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionWriterImage()
std::string documentPath, documentURL;
helpers::getDocumentPathAndURL("non-shape-image.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, testname);
// Select the shape with SHIFT + F4
diff --git a/test/UnitRenderingOptions.cpp b/test/UnitRenderingOptions.cpp
index 9c3d2e0d54..c7ce361593 100644
--- a/test/UnitRenderingOptions.cpp
+++ b/test/UnitRenderingOptions.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// Rendering options testcase.
class UnitRenderingOptions : public UnitWSD
@@ -42,7 +42,7 @@ void UnitRenderingOptions::invokeWSDTest()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, response, testname);
helpers::sendTextFrame(socket, "load url=" + documentURL + " options=" + options);
diff --git a/test/UnitSession.cpp b/test/UnitSession.cpp
index 54dfe59059..c6808f9b84 100644
--- a/test/UnitSession.cpp
+++ b/test/UnitSession.cpp
@@ -24,7 +24,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -107,27 +107,27 @@ UnitBase::TestResult UnitSession::testHandshake()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
std::unique_ptr<Poco::Net::HTTPClientSession> session(
helpers::createSession(Poco::URI(helpers::getTestServerURI())));
- LOOLWebSocket socket(*session, request, response);
+ COOLWebSocket socket(*session, request, response);
socket.setReceiveTimeout(0);
int flags = 0;
char buffer[1024] = { 0 };
int bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
LOK_ASSERT_MESSAGE(
"Expected 'statusindicator: find' response from the server but got nothing.",
bytes > 0);
LOK_ASSERT_EQUAL(std::string("statusindicator: find"), std::string(buffer, bytes));
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
if (bytes > 0 && !std::strstr(buffer, "error:"))
{
LOK_ASSERT_EQUAL(std::string("statusindicator: connect"),
std::string(buffer, bytes));
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
if (!std::strstr(buffer, "error:"))
{
LOK_ASSERT_EQUAL(std::string("statusindicator: ready"),
@@ -140,7 +140,7 @@ UnitBase::TestResult UnitSession::testHandshake()
// close frame message
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
LOK_ASSERT((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK)
== Poco::Net::WebSocket::FRAME_OP_CLOSE);
}
@@ -152,7 +152,7 @@ UnitBase::TestResult UnitSession::testHandshake()
// close frame message
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, bytes, flags));
LOK_ASSERT((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK)
== Poco::Net::WebSocket::FRAME_OP_CLOSE);
}
@@ -177,7 +177,7 @@ UnitBase::TestResult UnitSession::testSlideShow()
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse httpResponse;
- std::shared_ptr<LOOLWebSocket> socket = helpers::connectLOKit(
+ std::shared_ptr<COOLWebSocket> socket = helpers::connectLOKit(
Poco::URI(helpers::getTestServerURI()), request, httpResponse, testname);
helpers::sendTextFrame(socket, "load url=" + documentURL, testname);
diff --git a/test/UnitStorage.cpp b/test/UnitStorage.cpp
index 8b6eef556a..85ab78fa3e 100644
--- a/test/UnitStorage.cpp
+++ b/test/UnitStorage.cpp
@@ -47,7 +47,7 @@ public:
assert(_ws.get());
int flags = 0, len;;
char reply[4096];
- while ((len = _ws->getLOOLWebSocket()->receiveFrame(reply, sizeof(reply) - 1, flags)) > 0)
+ while ((len = _ws->getCOOLWebSocket()->receiveFrame(reply, sizeof(reply) - 1, flags)) > 0)
{
reply[len] = '\0';
if (bExpectFailure &&
diff --git a/test/UnitTiffLoad.cpp b/test/UnitTiffLoad.cpp
index c48e774275..1717d3d309 100644
--- a/test/UnitTiffLoad.cpp
+++ b/test/UnitTiffLoad.cpp
@@ -17,7 +17,7 @@
#include <Util.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
/// TIFF load testcase.
class UnitTiffLoad : public UnitWSD
@@ -38,7 +38,7 @@ void UnitTiffLoad::invokeWSDTest()
std::string documentPath;
std::string documentURL;
helpers::getDocumentPathAndURL("tiff.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(
Poco::URI(helpers::getTestServerURI()), documentURL, testname);
// Select the image.
diff --git a/test/UnitTyping.cpp b/test/UnitTyping.cpp
index 3ef8754491..4a8e6d3c1f 100644
--- a/test/UnitTyping.cpp
+++ b/test/UnitTyping.cpp
@@ -17,7 +17,7 @@
#include <Unit.hpp>
#include <UnitHTTP.hpp>
#include <helpers.hpp>
-#include <LOOLWSD.hpp>
+#include <COOLWSD.hpp>
#include <wsd/TileDesc.hpp>
@@ -53,7 +53,7 @@ public:
TestResult testWriterTyping()
{
const char* testname = "writerCompositionTest ";
- std::string serverURL = LOOLWSD::getServerURL();
+ std::string serverURL = COOLWSD::getServerURL();
const Poco::URI uri(serverURL);
LOG_TRC("test writer typing");
@@ -63,7 +63,7 @@ public:
helpers::getDocumentPathAndURL(
"empty.odt", documentPath, documentURL, testname);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
// We input two Bopomofo (Mandarin Phonetic Symbols) characters and a grave accent using
// textinput messages and then delete them and then input a fourth character. Apparently
@@ -225,7 +225,7 @@ public:
TestResult testCalcTyping()
{
const char* testname = "calcMultiViewEdit ";
- std::string serverURL = LOOLWSD::getServerURL();
+ std::string serverURL = COOLWSD::getServerURL();
const Poco::URI uri(serverURL);
// Load a doc with the cursor saved at a top row.
@@ -235,7 +235,7 @@ public:
const int numRender = 2;
const int numTyping = 6;
const int numSocket = numRender + numTyping;
- std::vector<std::shared_ptr<LOOLWebSocket>> sockets;
+ std::vector<std::shared_ptr<COOLWebSocket>> sockets;
LOG_TRC("Connecting first client to " << serverURL << " doc: " << documentURL);
sockets.push_back(helpers::loadDocAndGetSocket(uri, documentURL, testname));
@@ -243,7 +243,7 @@ public:
for (int i = 1; i < numSocket; ++i)
{
LOG_TRC("Connecting client " << i);
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(uri, documentURL, testname);
sockets.push_back(socket);
for (int j = 0; j < i * 3; ++j)
{
@@ -296,7 +296,7 @@ public:
for (int i = 0; i < numRender; ++i)
threads.emplace_back([&,i] {
std::mt19937 randDev(numRender * 257);
- std::shared_ptr<LOOLWebSocket> sock = sockets[numTyping + i];
+ std::shared_ptr<COOLWebSocket> sock = sockets[numTyping + i];
while (!started || liveTyping > 0)
{
std::ostringstream oss;
@@ -319,7 +319,7 @@ public:
{
threads.emplace_back([&,which] {
std::mt19937 randDev(which * 16);
- std::shared_ptr<LOOLWebSocket> sock = sockets[which];
+ std::shared_ptr<COOLWebSocket> sock = sockets[which];
liveTyping++;
started = true;
for (size_t i = 0; i < messages[which].size(); ++i)
diff --git a/test/UnitUNOCommand.cpp b/test/UnitUNOCommand.cpp
index 5ccdbea44c..9efa2a3f35 100644
--- a/test/UnitUNOCommand.cpp
+++ b/test/UnitUNOCommand.cpp
@@ -20,7 +20,7 @@
#include <Unit.hpp>
#include <helpers.hpp>
-class LOOLWebSocket;
+class COOLWebSocket;
namespace
{
@@ -30,7 +30,7 @@ void testStateChanged(const std::string& filename, std::set<std::string>& comman
Poco::RegularExpression reUno("\\.[a-zA-Z]*\\:[a-zA-Z]*\\=");
- std::shared_ptr<LOOLWebSocket> socket = helpers::loadDocAndGetSocket(filename, Poco::URI(helpers::getTestServerURI()), testname);
+ std::shared_ptr<COOLWebSocket> socket = helpers::loadDocAndGetSocket(filename, Poco::URI(helpers::getTestServerURI()), testname);
helpers::SocketProcessor(testname, socket,
[&](const std::string& msg)
{
diff --git a/test/UnitWOPI.cpp b/test/UnitWOPI.cpp
index 8fd2c5d29d..c6c34edb2a 100644
--- a/test/UnitWOPI.cpp
+++ b/test/UnitWOPI.cpp
@@ -63,10 +63,10 @@ public:
LOG_TST("assertPutFileRequest: SavingPhase::Unmodified");
// the document is not modified
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// but the save action is an explicit user's request
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
_finishedSaveUnmodified = true;
}
@@ -75,14 +75,14 @@ public:
LOG_TST("assertPutFileRequest: SavingPhase::Modified");
// the document is modified
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// and this test fakes that it's an autosave
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsAutosave"));
// Check that we get the extended data.
LOK_ASSERT_EQUAL(std::string("CustomFlag=Custom Value;AnotherFlag=AnotherValue"),
- request.get("X-LOOL-WOPI-ExtendedData"));
+ request.get("X-COOL-WOPI-ExtendedData"));
_finishedSaveModified = true;
}
diff --git a/test/UnitWOPIAsyncUpload_Close.cpp b/test/UnitWOPIAsyncUpload_Close.cpp
index 84c6b37d25..3edee2a86c 100644
--- a/test/UnitWOPIAsyncUpload_Close.cpp
+++ b/test/UnitWOPIAsyncUpload_Close.cpp
@@ -56,10 +56,10 @@ public:
LOG_TST("WaitFirstPutFile => Close");
_phase = Phase::Close;
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// We requested the save.
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
// Fail with error.
return Util::make_unique<http::Response>(http::StatusLine(404));
@@ -71,10 +71,10 @@ public:
_phase == Phase::WaitSecondPutFile);
// the document is modified
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// Triggered while closing.
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
passTest("Document uploaded on closing as expected.");
diff --git a/test/UnitWOPIAsyncUpload_Modify.cpp b/test/UnitWOPIAsyncUpload_Modify.cpp
index 360137c038..1999ff6d9a 100644
--- a/test/UnitWOPIAsyncUpload_Modify.cpp
+++ b/test/UnitWOPIAsyncUpload_Modify.cpp
@@ -57,10 +57,10 @@ public:
LOG_TST("WaitFirstPutFile => Close");
_phase = Phase::Close;
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// We requested the save.
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
// Fail with error.
LOG_TST("assertPutFileRequest: returning 404 to simulate PutFile failure");
@@ -74,10 +74,10 @@ public:
_phase == Phase::WaitSecondPutFile);
// the document is modified
- LOK_ASSERT_EQUAL(std::string("true"), request.get("X-LOOL-WOPI-IsModifiedByUser"));
+ LOK_ASSERT_EQUAL(std::string("true"), request.get("X-COOL-WOPI-IsModifiedByUser"));
// Triggered while closing.
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
passTest("Document uploaded on closing as expected.");
diff --git a/test/UnitWOPIAsyncUpload_ModifyClose.cpp b/test/UnitWOPIAsyncUpload_ModifyClose.cpp
index 0b889b9b99..3120f3ab99 100644
--- a/test/UnitWOPIAsyncUpload_ModifyClose.cpp
+++ b/test/UnitWOPIAsyncUpload_ModifyClose.cpp
@@ -51,9 +51,9 @@ public:
_phase = Phase::Polling;
// We requested the save.
- LOK_ASSERT_EQUAL(std::string("false"), request.get("X-LOOL-WOPI-IsAutosave"));
+ LOK_ASSERT_EQUAL(std::string("false"), request.get("X-COOL-WOPI-IsAutosave"));
- if (request.get("X-LOOL-WOPI-IsModifiedByUser") != "true")
+ if (request.get("X-COOL-WOPI-IsModifiedByUser") != "true")
{
// There is a race when closing the document right after modifying,
// so the modified flag may not be set, but there should be no data
diff --git a/test/UnitWOPIHttpHeaders.cpp b/test/UnitWOPIHttpHeaders.cpp
index 043629a00e..ed87a58cf8 100644
--- a/test/UnitWOPIHttpHeaders.cpp
+++ b/test/UnitWOPIHttpHeaders.cpp
@@ -96,7 +96,7 @@ public:
initWebsocket("/wopi/files/0?" + params);
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(),
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(),
testName);
SocketPoll::wakeupWorld();
diff --git a/test/UnitWOPILoadEncoded.cpp b/test/UnitWOPILoadEncoded.cpp
index 41fb9ad7ca..e04db76056 100644
--- a/test/UnitWOPILoadEncoded.cpp
+++ b/test/UnitWOPILoadEncoded.cpp
@@ -40,7 +40,7 @@ public:
{
initWebsocket("/wopi/files/3?access_token=anything");
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
SocketPoll::wakeupWorld();
_phase = Phase::CloseDoc;
@@ -48,7 +48,7 @@ public:
}
case Phase::CloseDoc:
{
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "closedocument", testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "closedocument", testName);
_phase = Phase::Polling;
break;
}
diff --git a/test/UnitWOPILock.cpp b/test/UnitWOPILock.cpp
index 635955f56a..27a1edef81 100644
--- a/test/UnitWOPILock.cpp
+++ b/test/UnitWOPILock.cpp
@@ -163,8 +163,8 @@ public:
_phase = Phase::LockDocument;
initWebsocket("/wopi/files/0?access_token=anything");
addWebSocket();
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
- helpers::sendTextFrame(*getWsAt(1)->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWsAt(1)->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
SocketPoll::wakeupWorld();
break;
}
diff --git a/test/UnitWOPIRenameFile.cpp b/test/UnitWOPIRenameFile.cpp
index ab707f544a..bf009e3f1a 100644
--- a/test/UnitWOPIRenameFile.cpp
+++ b/test/UnitWOPIRenameFile.cpp
@@ -63,13 +63,13 @@ public:
{
initWebsocket("/wopi/files/0?access_token=anything");
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
_phase = Phase::RenameFile;
break;
}
case Phase::RenameFile:
{
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "renamefile filename=hello", testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "renamefile filename=hello", testName);
_phase = Phase::Polling;
break;
}
diff --git a/test/UnitWOPISaveAs.cpp b/test/UnitWOPISaveAs.cpp
index 3d2679e4f0..c306640c43 100644
--- a/test/UnitWOPISaveAs.cpp
+++ b/test/UnitWOPISaveAs.cpp
@@ -67,8 +67,8 @@ public:
{
initWebsocket("/wopi/files/0?access_token=anything");
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "saveas url=wopi:///jan/hole%C5%A1ovsk%C3%BD/hello%20world%251.pdf", testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "saveas url=wopi:///jan/hole%C5%A1ovsk%C3%BD/hello%20world%251.pdf", testName);
SocketPoll::wakeupWorld();
_phase = Phase::Polling;
diff --git a/test/UnitWOPIWatermark.cpp b/test/UnitWOPIWatermark.cpp
index 366f8cab5b..d4e1b95b12 100644
--- a/test/UnitWOPIWatermark.cpp
+++ b/test/UnitWOPIWatermark.cpp
@@ -116,7 +116,7 @@ public:
{
initWebsocket("/wopi/files/5?access_token=anything");
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "load url=" + getWopiSrc(), testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "load url=" + getWopiSrc(), testName);
SocketPoll::wakeupWorld();
_phase = Phase::TileRequest;
@@ -129,8 +129,8 @@ public:
}
case Phase::TileRequest:
{
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840", testName);
- std::string tile = helpers::getResponseString(*getWs()->getLOOLWebSocket(), "tile:", testName);
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840", testName);
+ std::string tile = helpers::getResponseString(*getWs()->getCOOLWebSocket(), "tile:", testName);
if(!tile.empty())
{
diff --git a/test/WhiteBoxTests.cpp b/test/WhiteBoxTests.cpp
index ea8581be41..5407b539ff 100644
--- a/test/WhiteBoxTests.cpp
+++ b/test/WhiteBoxTests.cpp
@@ -39,7 +39,7 @@ class WhiteBoxTests : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(WhiteBoxTests);
- CPPUNIT_TEST(testLOOLProtocolFunctions);
+ CPPUNIT_TEST(testCOOLProtocolFunctions);
CPPUNIT_TEST(testSplitting);
CPPUNIT_TEST(testMessage);
CPPUNIT_TEST(testMessageAbbreviation);
@@ -76,7 +76,7 @@ class WhiteBoxTests : public CPPUNIT_NS::TestFixture
CPPUNIT_TEST_SUITE_END();
- void testLOOLProtocolFunctions();
+ void testCOOLProtocolFunctions();
void testSplitting();
void testMessage();
void testMessageAbbreviation();
@@ -112,44 +112,44 @@ class WhiteBoxTests : public CPPUNIT_NS::TestFixture
void testJsonUtilEscapeJSONValue();
};
-void WhiteBoxTests::testLOOLProtocolFunctions()
+void WhiteBoxTests::testCOOLProtocolFunctions()
{
int foo;
- LOK_ASSERT(LOOLProtocol::getTokenInteger("foo=42", "foo", foo));
+ LOK_ASSERT(COOLProtocol::getTokenInteger("foo=42", "foo", foo));
LOK_ASSERT_EQUAL(42, foo);
std::string bar;
- LOK_ASSERT(LOOLProtocol::getTokenString("bar=hello-sailor", "bar", bar));
+ LOK_ASSERT(COOLProtocol::getTokenString("bar=hello-sailor", "bar", bar));
LOK_ASSERT_EQUAL(std::string("hello-sailor"), bar);
- LOK_ASSERT(LOOLProtocol::getTokenString("bar=", "bar", bar));
+ LOK_ASSERT(COOLProtocol::getTokenString("bar=", "bar", bar));
LOK_ASSERT_EQUAL(std::string(""), bar);
int mumble;
std::map<std::string, int> map { { "hello", 1 }, { "goodbye", 2 }, { "adieu", 3 } };
- LOK_ASSERT(LOOLProtocol::getTokenKeyword("mumble=goodbye", "mumble", map, mumble));
+ LOK_ASSERT(COOLProtocol::getTokenKeyword("mumble=goodbye", "mumble", map, mumble));
LOK_ASSERT_EQUAL(2, mumble);
std::string message("hello x=1 y=2 foo=42 bar=hello-sailor mumble='goodbye' zip zap");
StringVector tokens(Util::tokenize(message));
- LOK_ASSERT(LOOLProtocol::getTokenInteger(tokens, "foo", foo));
+ LOK_ASSERT(COOLProtocol::getTokenInteger(tokens, "foo", foo));
LOK_ASSERT_EQUAL(42, foo);
- LOK_ASSERT(LOOLProtocol::getTokenString(tokens, "bar", bar));
+ LOK_ASSERT(COOLProtocol::getTokenString(tokens, "bar", bar));
LOK_ASSERT_EQUAL(std::string("hello-sailor"), bar);
- LOK_ASSERT(LOOLProtocol::getTokenKeyword(tokens, "mumble", map, mumble));
+ LOK_ASSERT(COOLProtocol::getTokenKeyword(tokens, "mumble", map, mumble));
LOK_ASSERT_EQUAL(2, mumble);
- LOK_ASSERT(LOOLProtocol::getTokenIntegerFromMessage(message, "foo", foo));
+ LOK_ASSERT(COOLProtocol::getTokenIntegerFromMessage(message, "foo", foo));
LOK_ASSERT_EQUAL(42, foo);
- LOK_ASSERT(LOOLProtocol::getTokenStringFromMessage(message, "bar", bar));
+ LOK_ASSERT(COOLProtocol::getTokenStringFromMessage(message, "bar", bar));
LOK_ASSERT_EQUAL(std::string("hello-sailor"), bar);
- LOK_ASSERT(LOOLProtocol::getTokenKeywordFromMessage(message, "mumble", map, mumble));
+ LOK_ASSERT(COOLProtocol::getTokenKeywordFromMessage(message, "mumble", map, mumble));
LOK_ASSERT_EQUAL(2, mumble);
LOK_ASSERT_EQUAL(static_cast<std::size_t>(1), Util::trimmed("A").size());
@@ -355,22 +355,22 @@ void WhiteBoxTests::testMessageAbbreviation()
LOK_ASSERT_EQUAL(std::string(), Util::getDelimitedInitialSubstring("abc", -1, '\n'));
LOK_ASSERT_EQUAL(std::string("ab"), Util::getDelimitedInitialSubstring("abc", 2, '\n'));
- LOK_ASSERT_EQUAL(std::string(), LOOLProtocol::getAbbreviatedMessage(nullptr, 5));
- LOK_ASSERT_EQUAL(std::string(), LOOLProtocol::getAbbreviatedMessage(nullptr, -1));
- LOK_ASSERT_EQUAL(std::string(), LOOLProtocol::getAbbreviatedMessage("abc", 0));
- LOK_ASSERT_EQUAL(std::string(), LOOLProtocol::getAbbreviatedMessage("abc", -1));
- LOK_ASSERT_EQUAL(std::string("ab"), LOOLProtocol::getAbbreviatedMessage("abc", 2));
+ LOK_ASSERT_EQUAL(std::string(), COOLProtocol::getAbbreviatedMessage(nullptr, 5));
+ LOK_ASSERT_EQUAL(std::string(), COOLProtocol::getAbbreviatedMessage(nullptr, -1));
+ LOK_ASSERT_EQUAL(std::string(), COOLProtocol::getAbbreviatedMessage("abc", 0));
+ LOK_ASSERT_EQUAL(std::string(), COOLProtocol::getAbbreviatedMessage("abc", -1));
+ LOK_ASSERT_EQUAL(std::string("ab"), COOLProtocol::getAbbreviatedMessage("abc", 2));
std::string s;
std::string abbr;
s = "abcdefg";
- LOK_ASSERT_EQUAL(s, LOOLProtocol::getAbbreviatedMessage(s));
+ LOK_ASSERT_EQUAL(s, COOLProtocol::getAbbreviatedMessage(s));
s = "1234567890123\n45678901234567890123456789012345678901234567890123";
abbr = "1234567890123...";
- LOK_ASSERT_EQUAL(abbr, LOOLProtocol::getAbbreviatedMessage(s.data(), s.size()));
- LOK_ASSERT_EQUAL(abbr, LOOLProtocol::getAbbreviatedMessage(s));
+ LOK_ASSERT_EQUAL(abbr, COOLProtocol::getAbbreviatedMessage(s.data(), s.size()));
+ LOK_ASSERT_EQUAL(abbr, COOLProtocol::getAbbreviatedMessage(s));
}
void WhiteBoxTests::testTokenizer()
@@ -463,21 +463,21 @@ void WhiteBoxTests::testTokenizer()
// Integer lists.
std::vector<int> ints;
- ints = LOOLProtocol::tokenizeInts(std::string("-1"));
+ ints = COOLProtocol::tokenizeInts(std::string("-1"));
LOK_ASSERT_EQUAL(static_cast<std::size_t>(1), ints.size());
LOK_ASSERT_EQUAL(-1, ints[0]);
- ints = LOOLProtocol::tokenizeInts(std::string("1,2,3,4"));
+ ints = COOLProtocol::tokenizeInts(std::string("1,2,3,4"));
LOK_ASSERT_EQUAL(static_cast<std::size_t>(4), ints.size());
LOK_ASSERT_EQUAL(1, ints[0]);
LOK_ASSERT_EQUAL(2, ints[1]);
LOK_ASSERT_EQUAL(3, ints[2]);
LOK_ASSERT_EQUAL(4, ints[3]);
- ints = LOOLProtocol::tokenizeInts("");
+ ints = COOLProtocol::tokenizeInts("");
LOK_ASSERT_EQUAL(static_cast<std::size_t>(0), ints.size());
- ints = LOOLProtocol::tokenizeInts(std::string(",,,"));
+ ints = COOLProtocol::tokenizeInts(std::string(",,,"));
LOK_ASSERT_EQUAL(static_cast<std::size_t>(0), ints.size());
}
diff --git a/test/WopiTestServer.hpp b/test/WopiTestServer.hpp
index 8a9642a04a..a97684f143 100644
--- a/test/WopiTestServer.hpp
+++ b/test/WopiTestServer.hpp
@@ -25,7 +25,7 @@
class WopiTestServer : public UnitWSD
{
- enum class LOOLStatusCode
+ enum class COOLStatusCode
{
DocChanged = 1010
};
@@ -256,7 +256,7 @@ protected:
{
LOG_TST("Fake wopi host request, handling PutFile: " << uriReq.getPath());
- std::string wopiTimestamp = request.get("X-LOOL-WOPI-Timestamp", std::string());
+ std::string wopiTimestamp = request.get("X-COOL-WOPI-Timestamp", std::string());
if (!wopiTimestamp.empty())
{
@@ -265,8 +265,8 @@ protected:
{
http::Response httpResponse(http::StatusLine(409));
httpResponse.setBody(
- "{\"LOOLStatusCode\":" +
- std::to_string(static_cast<int>(LOOLStatusCode::DocChanged)) + '}');
+ "{\"COOLStatusCode\":" +
+ std::to_string(static_cast<int>(COOLStatusCode::DocChanged)) + '}');
socket->sendAndShutdown(httpResponse);
return true;
}
@@ -315,7 +315,7 @@ protected:
do \
{ \
LOG_TST(": Sending: " << MSG); \
- helpers::sendTextFrame(*getWs()->getLOOLWebSocket(), MSG, getTestname()); \
+ helpers::sendTextFrame(*getWs()->getCOOLWebSocket(), MSG, getTestname()); \
} while (false)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/countloolkits.hpp b/test/countcoolkits.hpp
index b08ff45806..af3fc880c3 100644
--- a/test/countloolkits.hpp
+++ b/test/countcoolkits.hpp
@@ -21,12 +21,12 @@
#include "test.hpp"
#include "helpers.hpp"
-static int countLoolKitProcesses(const int expected,
+static int countCoolKitProcesses(const int expected,
std::chrono::milliseconds timeoutMs
= std::chrono::milliseconds(COMMAND_TIMEOUT_MS * 8))
{
- const auto testname = "countLoolKitProcesses ";
- TST_LOG_BEGIN("Waiting until loolkit processes are exactly " << expected << ". Loolkits: ");
+ const auto testname = "countCoolKitProcesses ";
+ TST_LOG_BEGIN("Waiting until coolkit processes are exactly " << expected << ". Coolkits: ");
// This does not need to depend on any constant from Common.hpp.
// The shorter the better (the quicker the test runs).
@@ -34,7 +34,7 @@ static int countLoolKitProcesses(const int expected,
// This has to cause waiting for at least COMMAND_TIMEOUT_MS. Tolerate more for safety.
const std::size_t repeat = (timeoutMs.count() / sleepMs);
- int count = getLoolKitProcessCount();
+ int count = getCoolKitProcessCount();
for (std::size_t i = 0; i < repeat; ++i)
{
TST_LOG_APPEND(count << ' ');
@@ -46,7 +46,7 @@ static int countLoolKitProcesses(const int expected,
// Give polls in the cool processes time to time out etc
std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs));
- const int newCount = getLoolKitProcessCount();
+ const int newCount = getCoolKitProcessCount();
if (count != newCount)
{
// Allow more time until the number settles.
@@ -82,28 +82,28 @@ static int countLoolKitProcesses(const int expected,
// and reuse it. As it stands now, it is per
// translation unit, which isn't desirable if
// (in the non-ideal event that) it's not 1,
-// it will cause testNoExtraLoolKitsLeft to
+// it will cause testNoExtraCoolKitsLeft to
// wait unnecessarily and fail.
-static int InitialLoolKitCount = 1;
+static int InitialCoolKitCount = 1;
static std::chrono::steady_clock::time_point TestStartTime;
-static void testCountHowManyLoolkits()
+static void testCountHowManyCoolkits()
{
- const char testname[] = "countHowManyLoolkits ";
+ const char testname[] = "countHowManyCoolkits ";
TestStartTime = std::chrono::steady_clock::now();
- InitialLoolKitCount = countLoolKitProcesses(InitialLoolKitCount);
- TST_LOG("Initial loolkit count is " << InitialLoolKitCount);
- LOK_ASSERT(InitialLoolKitCount > 0);
+ InitialCoolKitCount = countCoolKitProcesses(InitialCoolKitCount);
+ TST_LOG("Initial coolkit count is " << InitialCoolKitCount);
+ LOK_ASSERT(InitialCoolKitCount > 0);
TestStartTime = std::chrono::steady_clock::now();
}
-static void testNoExtraLoolKitsLeft()
+static void testNoExtraCoolKitsLeft()
{
- const char testname[] = "noExtraLoolKitsLeft ";
- const int countNow = countLoolKitProcesses(InitialLoolKitCount);
- LOK_ASSERT_EQUAL(InitialLoolKitCount, countNow);
+ const char testname[] = "noExtraCoolKitsLeft ";
+ const int countNow = countCoolKitProcesses(InitialCoolKitCount);
+ LOK_ASSERT_EQUAL(InitialCoolKitCount, countNow);
const auto duration = (std::chrono::steady_clock::now() - TestStartTime);
const auto durationMs = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
diff --git a/test/helpers.hpp b/test/helpers.hpp
index 266af1079f..9dc1e17809 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -28,7 +28,7 @@
#include <Common.hpp>
#include "Socket.hpp"
#include "common/FileUtil.hpp"
-#include <tools/LOOLWebSocket.hpp>
+#include <tools/COOLWebSocket.hpp>
#include <common/ConfigUtil.hpp>
#include <common/Util.hpp>
#include <net/WebSocketSession.hpp>
@@ -127,10 +127,10 @@ inline void getDocumentPathAndURL(const std::string& docFilename, std::string& d
}
inline
-void sendTextFrame(LOOLWebSocket& socket, const std::string& string, const std::string& testname)
+void sendTextFrame(COOLWebSocket& socket, const std::string& string, const std::string& testname)
{
#ifndef FUZZER
- TST_LOG("Sending " << string.size() << " bytes: " << LOOLProtocol::getAbbreviatedMessage(string));
+ TST_LOG("Sending " << string.size() << " bytes: " << COOLProtocol::getAbbreviatedMessage(string));
#else
(void) testname;
#endif
@@ -138,7 +138,7 @@ void sendTextFrame(LOOLWebSocket& socket, const std::string& string, const std::
}
inline
-void sendTextFrame(const std::shared_ptr<LOOLWebSocket>& socket, const std::string& string, const std::string& name = "")
+void sendTextFrame(const std::shared_ptr<COOLWebSocket>& socket, const std::string& string, const std::string& name = "")
{
sendTextFrame(*socket, string, name);
}
@@ -148,7 +148,7 @@ inline void sendTextFrame(const std::shared_ptr<http::WebSocketSession>& ws,
{
#ifndef FUZZER
TST_LOG("Sending " << string.size()
- << " bytes: " << LOOLProtocol::getAbbreviatedMessage(string));
+ << " bytes: " << COOLProtocol::getAbbreviatedMessage(string));
#else
(void)testname;
#endif
@@ -328,7 +328,7 @@ inline std::string const& getTestServerURI()
}
inline
-int getErrorCode(LOOLWebSocket& ws, std::string& message, const std::string& testname)
+int getErrorCode(COOLWebSocket& ws, std::string& message, const std::string& testname)
{
int flags = 0;
int bytes = 0;
@@ -347,7 +347,7 @@ int getErrorCode(LOOLWebSocket& ws, std::string& message, const std::string& tes
if (bytes > 0)
{
- TST_LOG("Got Close Frame: " << LOOLWebSocket::getAbbreviatedFrameDump(buffer.begin(), bytes,
+ TST_LOG("Got Close Frame: " << COOLWebSocket::getAbbreviatedFrameDump(buffer.begin(), bytes,
flags));
Poco::MemoryBinaryReader reader(buffer, Poco::BinaryReader::NETWORK_BYTE_ORDER);
reader >> statusCode;
@@ -362,13 +362,13 @@ int getErrorCode(LOOLWebSocket& ws, std::string& message, const std::string& tes
}
inline
-int getErrorCode(const std::shared_ptr<LOOLWebSocket>& ws, std::string& message, const std::string& testname)
+int getErrorCode(const std::shared_ptr<COOLWebSocket>& ws, std::string& message, const std::string& testname)
{
return getErrorCode(*ws, message, testname);
}
inline std::vector<char>
-getResponseMessage(LOOLWebSocket& ws, const std::string& prefix, const std::string& testname,
+getResponseMessage(COOLWebSocket& ws, const std::string& prefix, const std::string& testname,
const std::chrono::milliseconds timeoutMs = std::chrono::seconds(10))
{
try
@@ -393,13 +393,13 @@ getResponseMessage(LOOLWebSocket& ws, const std::string& prefix, const std::stri
response.resize(READ_BUFFER_SIZE * 8);
const int bytes = ws.receiveFrame(response.data(), response.size(), flags, testname);
response.resize(std::max(bytes, 0));
- const auto message = LOOLProtocol::getFirstLine(response);
+ const auto message = COOLProtocol::getFirstLine(response);
if (bytes > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE)
{
- if (LOOLProtocol::matchPrefix(prefix, message))
+ if (COOLProtocol::matchPrefix(prefix, message))
{
TST_LOG('[' << prefix << "] Matched " <<
- LOOLWebSocket::getAbbreviatedFrameDump(response.data(), bytes, flags));
+ COOLWebSocket::getAbbreviatedFrameDump(response.data(), bytes, flags));
return response;
}
}
@@ -417,13 +417,13 @@ getResponseMessage(LOOLWebSocket& ws, const std::string& prefix, const std::stri
if ((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE)
{
// Don't ignore errors.
- if (LOOLProtocol::matchPrefix("error:", message))
+ if (COOLProtocol::matchPrefix("error:", message))
{
throw std::runtime_error(message);
}
TST_LOG('[' << prefix << "] Ignored " <<
- LOOLWebSocket::getAbbreviatedFrameDump(response.data(), bytes, flags));
+ COOLWebSocket::getAbbreviatedFrameDump(response.data(), bytes, flags));
}
}
}
@@ -476,7 +476,7 @@ inline int countMessages(const std::shared_ptr<http::WebSocketSession>& ws,
return count;
}
-inline std::vector<char> getResponseMessage(const std::shared_ptr<LOOLWebSocket>& ws,
+inline std::vector<char> getResponseMessage(const std::shared_ptr<COOLWebSocket>& ws,
const std::string& prefix, const std::string& testname,
const std::chrono::milliseconds timeoutMs
= std::chrono::seconds(10))
@@ -511,7 +511,7 @@ std::string assertNotInResponse(T& ws, const std::string& prefix, const std::str
return res;
}
-inline int countMessages(LOOLWebSocket& ws, const std::string& prefix, const std::string& testname,
+inline int countMessages(COOLWebSocket& ws, const std::string& prefix, const std::string& testname,
const std::chrono::milliseconds timeoutMs = std::chrono::seconds(10))
{
int count = 0;
@@ -521,7 +521,7 @@ inline int countMessages(LOOLWebSocket& ws, const std::string& prefix, const std
return count;
}
-inline int countMessages(const std::shared_ptr<LOOLWebSocket>& ws, const std::string& prefix,
+inline int countMessages(const std::shared_ptr<COOLWebSocket>& ws, const std::string& prefix,
const std::string& testname,
const std::chrono::milliseconds timeoutMs = std::chrono::seconds(10))
{
@@ -529,7 +529,7 @@ inline int countMessages(const std::shared_ptr<LOOLWebSocket>& ws, const std::st
}
inline
-bool isDocumentLoaded(LOOLWebSocket& ws, const std::string& testname, bool isView = true)
+bool isDocumentLoaded(COOLWebSocket& ws, const std::string& testname, bool isView = true)
{
const std::string prefix = isView ? "status:" : "statusindicatorfinish:";
std::chrono::seconds timeout(60);
@@ -539,14 +539,14 @@ bool isDocumentLoaded(LOOLWebSocket& ws, const std::string& testname, bool isVie
#endif
#endif
const auto message = getResponseString(ws, prefix, testname, timeout);
- bool success = LOOLProtocol::matchPrefix(prefix, message);
+ bool success = COOLProtocol::matchPrefix(prefix, message);
if (!success)
TST_LOG("ERR: Timed out loading document after " << timeout);
return success;
}
inline
-bool isDocumentLoaded(std::shared_ptr<LOOLWebSocket>& ws, const std::string& testname, bool isView = true)
+bool isDocumentLoaded(std::shared_ptr<COOLWebSocket>& ws, const std::string& testname, bool isView = true)
{
return isDocumentLoaded(*ws, testname, isView);
}
@@ -558,7 +558,7 @@ inline bool isDocumentLoaded(const std::shared_ptr<http::WebSocketSession>& ws,
constexpr auto timeout = std::chrono::seconds(20); // Allow 20 secs to load
const std::string message = getResponseString(ws, prefix, testname, timeout);
- const bool success = LOOLProtocol::matchPrefix(prefix, message);
+ const bool success = COOLProtocol::matchPrefix(prefix, message);
if (!success)
TST_LOG("ERROR: Timed out loading document. Did not get [" << prefix << "] in time.");
return success;
@@ -569,7 +569,7 @@ inline bool isDocumentLoaded(const std::shared_ptr<http::WebSocketSession>& ws,
// The result, it is mostly time outs to get messages in the unit test and it could fail.
// connectLOKit ensures the websocket is connected to a kit process.
inline
-std::shared_ptr<LOOLWebSocket>
+std::shared_ptr<COOLWebSocket>
connectLOKit(const Poco::URI& uri,
Poco::Net::HTTPRequest& request,
Poco::Net::HTTPResponse& response,
@@ -585,7 +585,7 @@ connectLOKit(const Poco::URI& uri,
std::unique_ptr<Poco::Net::HTTPClientSession> session(createSession(uri));
TST_LOG("Connection to " << uri.toString() << " is "
<< (session->secure() ? "secure" : "plain"));
- auto ws = std::make_shared<LOOLWebSocket>(*session, request, response);
+ auto ws = std::make_shared<COOLWebSocket>(*session, request, response);
const char* expected_response = "statusindicator: ready";
@@ -661,14 +661,14 @@ inline std::shared_ptr<http::WebSocketSession> connectLOKit(std::shared_ptr<Sock
}
inline
-std::shared_ptr<LOOLWebSocket> loadDocAndGetSocket(const Poco::URI& uri, const std::string& documentURL, const std::string& testname, bool isView = true, bool isAssert = true)
+std::shared_ptr<COOLWebSocket> loadDocAndGetSocket(const Poco::URI& uri, const std::string& documentURL, const std::string& testname, bool isView = true, bool isAssert = true)
{
try
{
// Load a document and get its status.
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
Poco::Net::HTTPResponse response;
- std::shared_ptr<LOOLWebSocket> socket = connectLOKit(uri, request, response, testname);
+ std::shared_ptr<COOLWebSocket> socket = connectLOKit(uri, request, response, testname);
sendTextFrame(socket, "load url=" + documentURL, testname);
bool isLoaded = isDocumentLoaded(*socket, testname, isView);
@@ -692,7 +692,7 @@ std::shared_ptr<LOOLWebSocket> loadDocAndGetSocket(const Poco::URI& uri, const s
}
inline
-std::shared_ptr<LOOLWebSocket> loadDocAndGetSocket(const std::string& docFilename, const Poco::URI& uri, const std::string& testname, bool isView = true, bool isAssert = true)
+std::shared_ptr<COOLWebSocket> loadDocAndGetSocket(const std::string& docFilename, const Poco::URI& uri, const std::string& testname, bool isView = true, bool isAssert = true)
{
try
{
@@ -767,7 +767,7 @@ loadDocAndGetSession(std::shared_ptr<SocketPoll> socketPoll, const std::string&
}
inline void SocketProcessor(const std::string& testname,
- const std::shared_ptr<LOOLWebSocket>& socket,
+ const std::shared_ptr<COOLWebSocket>& socket,
const std::function<bool(const std::string& msg)>& handler,
const std::chrono::milliseconds timeoutMs = std::chrono::seconds(10))
{
@@ -786,7 +786,7 @@ inline void SocketProcessor(const std::string& testname,
}
n = socket->receiveFrame(buffer, sizeof(buffer), flags, testname);
- TST_LOG("Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, n, flags));
+ TST_LOG("Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, n, flags));
if (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE)
{
if (!handler(std::string(buffer, n)))
@@ -838,17 +838,17 @@ inline std::vector<char> getTileMessage(const std::shared_ptr<http::WebSocketSes
}
inline
-std::vector<char> getTileMessage(LOOLWebSocket& ws, const std::string& testname)
+std::vector<char> getTileMessage(COOLWebSocket& ws, const std::string& testname)
{
return getResponseMessage(ws, "tile", testname);
}
inline
-std::vector<char> assertTileMessage(LOOLWebSocket& ws, const std::string& testname)
+std::vector<char> assertTileMessage(COOLWebSocket& ws, const std::string& testname)
{
const std::vector<char> response = getTileMessage(ws, testname);
- const std::string firstLine = LOOLProtocol::getFirstLine(response);
+ const std::string firstLine = COOLProtocol::getFirstLine(response);
StringVector tileTokens(Util::tokenize(firstLine, ' '));
LOK_ASSERT_EQUAL(std::string("tile:"), tileTokens[0]);
LOK_ASSERT_EQUAL(std::string("part="), tileTokens[1].substr(0, std::string("part=").size()));
@@ -863,7 +863,7 @@ std::vector<char> assertTileMessage(LOOLWebSocket& ws, const std::string& testna
}
inline
-std::vector<char> assertTileMessage(const std::shared_ptr<LOOLWebSocket>& ws, const std::string& testname)
+std::vector<char> assertTileMessage(const std::shared_ptr<COOLWebSocket>& ws, const std::string& testname)
{
return assertTileMessage(*ws, testname);
}
@@ -902,25 +902,25 @@ inline int getCharKey(char ch, SpecialKey specialKeys)
return result | specialKeys;
}
-inline void sendKeyEvent(std::shared_ptr<LOOLWebSocket>& socket, const char* type, int chr, int key, const std::string& testname)
+inline void sendKeyEvent(std::shared_ptr<COOLWebSocket>& socket, const char* type, int chr, int key, const std::string& testname)
{
std::ostringstream ssIn;
ssIn << "key type=" << type << " char=" << chr << " key=" << key;
sendTextFrame(socket, ssIn.str(), testname);
}
-inline void sendKeyPress(std::shared_ptr<LOOLWebSocket>& socket, int chr, int key, const std::string& testname)
+inline void sendKeyPress(std::shared_ptr<COOLWebSocket>& socket, int chr, int key, const std::string& testname)
{
sendKeyEvent(socket, "input", chr, key, testname);
sendKeyEvent(socket, "up", chr, key, testname);
}
-inline void sendChar(std::shared_ptr<LOOLWebSocket>& socket, char ch, SpecialKey specialKeys, const std::string& testname)
+inline void sendChar(std::shared_ptr<COOLWebSocket>& socket, char ch, SpecialKey specialKeys, const std::string& testname)
{
sendKeyPress(socket, getCharChar(ch, specialKeys), getCharKey(ch, specialKeys), testname);
}
-inline void sendText(std::shared_ptr<LOOLWebSocket>& socket, const std::string& text, const std::string& testname)
+inline void sendText(std::shared_ptr<COOLWebSocket>& socket, const std::string& text, const std::string& testname)
{
for (char ch : text)
{
@@ -962,7 +962,7 @@ inline void saveTileAs(const std::vector<char> &tileResponse,
const std::string &filename,
const std::string &testname)
{
- const std::string firstLine = LOOLProtocol::getFirstLine(tileResponse);
+ const std::string firstLine = COOLProtocol::getFirstLine(tileResponse);
std::vector<char> res(tileResponse.begin() + firstLine.size() + 1, tileResponse.end());
std::stringstream streamRes;
std::copy(res.begin(), res.end(), std::ostream_iterator<char>(streamRes));
@@ -972,7 +972,7 @@ inline void saveTileAs(const std::vector<char> &tileResponse,
TST_LOG("Saved [" << firstLine << "] to [" << filename << ']');
}
-inline std::vector<char> getTileAndSave(std::shared_ptr<LOOLWebSocket>& socket,
+inline std::vector<char> getTileAndSave(std::shared_ptr<COOLWebSocket>& socket,
const std::string& req,
const std::string& filename,
const std::string& testname)
@@ -983,7 +983,7 @@ inline std::vector<char> getTileAndSave(std::shared_ptr<LOOLWebSocket>& socket,
const std::vector<char> tile = getResponseMessage(socket, "tile:", testname);
TST_LOG(" Tile PNG size: " << tile.size());
- const std::string firstLine = LOOLProtocol::getFirstLine(tile);
+ const std::string firstLine = COOLProtocol::getFirstLine(tile);
std::vector<char> res(tile.begin() + firstLine.size() + 1, tile.end());
std::stringstream streamRes;
std::copy(res.begin(), res.end(), std::ostream_iterator<char>(streamRes));
@@ -994,14 +994,14 @@ inline std::vector<char> getTileAndSave(std::shared_ptr<LOOLWebSocket>& socket,
return res;
}
-inline void getServerVersion(LOOLWebSocket& socket,
+inline void getServerVersion(COOLWebSocket& socket,
int& major, int& minor,
const std::string& testname)
{
const std::string clientVersion = "coolclient 0.1";
sendTextFrame(socket, clientVersion, testname);
std::vector<char> loVersion = getResponseMessage(socket, "lokitversion", testname);
- std::string line = LOOLProtocol::getFirstLine(loVersion.data(), loVersion.size());
+ std::string line = COOLProtocol::getFirstLine(loVersion.data(), loVersion.size());
line = line.substr(strlen("lokitversion "));
Poco::JSON::Parser parser;
Poco::Dynamic::Var loVersionVar = parser.parse(line);
@@ -1021,7 +1021,7 @@ inline void getServerVersion(LOOLWebSocket& socket,
TST_LOG("Client [" << major << '.' << minor << "].");
}
-inline void getServerVersion(std::shared_ptr<LOOLWebSocket>& socket,
+inline void getServerVersion(std::shared_ptr<COOLWebSocket>& socket,
int& major, int& minor,
const std::string& testname)
{
@@ -1054,7 +1054,7 @@ inline bool svgMatch(const char *testname, const std::vector<char> &response, co
}
/// Select all and wait for the text selection update.
-inline void selectAll(const std::shared_ptr<LOOLWebSocket>& socket, const std::string& testname, int repeat = COMMAND_RETRY_COUNT)
+inline void selectAll(const std::shared_ptr<COOLWebSocket>& socket, const std::string& testname, int repeat = COMMAND_RETRY_COUNT)
{
for (int i = 0; i < repeat; ++i)
{
@@ -1152,7 +1152,7 @@ inline std::string getAllText(const std::shared_ptr<http::WebSocketSession>& soc
}
/// Delete all and wait for the text selection update.
-inline void deleteAll(const std::shared_ptr<LOOLWebSocket>& socket, const std::string& testname, int repeat = COMMAND_RETRY_COUNT)
+inline void deleteAll(const std::shared_ptr<COOLWebSocket>& socket, const std::string& testname, int repeat = COMMAND_RETRY_COUNT)
{
selectAll(socket, testname);
@@ -1164,7 +1164,7 @@ inline void deleteAll(const std::shared_ptr<LOOLWebSocket>& socket, const std::s
}
}
-inline std::string getAllText(const std::shared_ptr<LOOLWebSocket>& socket,
+inline std::string getAllText(const std::shared_ptr<COOLWebSocket>& socket,
const std::string& testname,
const std::string& expected = std::string(),
int retry = COMMAND_RETRY_COUNT)
diff --git a/test/httpcrashtest.cpp b/test/httpcrashtest.cpp
index 0b4ee8b3f0..a62039869e 100644
--- a/test/httpcrashtest.cpp
+++ b/test/httpcrashtest.cpp
@@ -35,11 +35,11 @@
#include <Protocol.hpp>
#include <test.hpp>
#include <helpers.hpp>
-#include <countloolkits.hpp>
+#include <countcoolkits.hpp>
using namespace helpers;
-/// Tests the HTTP WebSocket API of loolwsd. The server has to be started manually before running this test.
+/// Tests the HTTP WebSocket API of coolwsd. The server has to be started manually before running this test.
class HTTPCrashTest : public CPPUNIT_NS::TestFixture
{
const Poco::URI _uri;
@@ -89,7 +89,7 @@ public:
void setUp()
{
resetTestStartTime();
- testCountHowManyLoolkits();
+ testCountHowManyCoolkits();
resetTestStartTime();
_socketPoll->startThread();
}
@@ -98,7 +98,7 @@ public:
{
_socketPoll->joinThread();
resetTestStartTime();
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
resetTestStartTime();
}
};
@@ -111,7 +111,7 @@ void HTTPCrashTest::testBarren()
try
{
killLoKitProcesses();
- countLoolKitProcesses(0);
+ countCoolKitProcesses(0);
TST_LOG("Loading after kill.");
@@ -145,10 +145,10 @@ void HTTPCrashTest::testCrashKit()
TST_LOG("Allowing time for kits to spawn and connect to wsd to get cleanly killed");
std::this_thread::sleep_for(std::chrono::seconds(1));
- TST_LOG("Killing loolkit instances.");
+ TST_LOG("Killing coolkit instances.");
killLoKitProcesses();
- countLoolKitProcesses(0, std::chrono::seconds(1));
+ countCoolKitProcesses(0, std::chrono::seconds(1));
TST_LOG("Reading the error code from the socket.");
//FIXME: implement in WebSocketSession.
@@ -180,10 +180,10 @@ void HTTPCrashTest::testRecoverAfterKitCrash()
TST_LOG("Allowing time for kits to spawn and connect to wsd to get cleanly killed");
std::this_thread::sleep_for(std::chrono::seconds(1));
- TST_LOG("Killing loolkit instances.");
+ TST_LOG("Killing coolkit instances.");
killLoKitProcesses();
- countLoolKitProcesses(0, std::chrono::seconds(1));
+ countCoolKitProcesses(0, std::chrono::seconds(1));
// We expect the client connection to close.
TST_LOG("Reconnect after kill.");
@@ -234,9 +234,9 @@ void HTTPCrashTest::testCrashForkit()
LOK_ASSERT_MESSAGE("Expected successful disconnection of the WebSocket",
socket->waitForDisconnection(std::chrono::seconds(5)));
- TST_LOG("Killing loolkit.");
+ TST_LOG("Killing coolkit.");
killLoKitProcesses();
- countLoolKitProcesses(0);
+ countCoolKitProcesses(0);
TST_LOG("Communicating after kill.");
socket = loadDocAndGetSession(_socketPoll, "empty.odt", _uri, testname);
socket->asyncShutdown();
@@ -265,7 +265,7 @@ static void killPids(const std::set<pid_t> &pids, const std::string& testname)
void HTTPCrashTest::killLoKitProcesses()
{
killPids(getKitPids(), "killLoKitProcesses ");
- InitialLoolKitCount = 1; // non-intuitive but it will arrive soon.
+ InitialCoolKitCount = 1; // non-intuitive but it will arrive soon.
}
void HTTPCrashTest::killForkitProcess()
diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index b715ee1774..e5fa79ce25 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -26,12 +26,12 @@
#include <Protocol.hpp>
#include "lokassert.hpp"
-#include <countloolkits.hpp>
+#include <countcoolkits.hpp>
#include <helpers.hpp>
using namespace helpers;
-/// Tests the HTTP WebSocket API of loolwsd. The server has to be started manually before running this test.
+/// Tests the HTTP WebSocket API of coolwsd. The server has to be started manually before running this test.
class HTTPWSTest : public CPPUNIT_NS::TestFixture
{
const Poco::URI _uri;
@@ -82,7 +82,7 @@ public:
void setUp()
{
resetTestStartTime();
- testCountHowManyLoolkits();
+ testCountHowManyCoolkits();
resetTestStartTime();
_socketPoll->startThread();
}
@@ -91,7 +91,7 @@ public:
{
_socketPoll->joinThread();
resetTestStartTime();
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
resetTestStartTime();
}
};
@@ -130,7 +130,7 @@ void HTTPWSTest::testSaveOnDisconnect()
// the socket is closed, when the doc is not even modified yet.
getResponseMessage(socket1, "statechanged", testname);
- kitcount = getLoolKitProcessCount();
+ kitcount = getCoolKitProcessCount();
// Shutdown abruptly.
TST_LOG("Closing connection after pasting.");
@@ -149,7 +149,7 @@ void HTTPWSTest::testSaveOnDisconnect()
}
// Allow time to save and destroy before we connect again.
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
TST_LOG("Loading again.");
try
{
@@ -158,7 +158,7 @@ void HTTPWSTest::testSaveOnDisconnect()
= loadDocAndGetSession(_socketPoll, _uri, documentURL, testname + "3 ");
// Should have no new instances.
- LOK_ASSERT_EQUAL(kitcount, countLoolKitProcesses(kitcount));
+ LOK_ASSERT_EQUAL(kitcount, countCoolKitProcesses(kitcount));
// Check if the document contains the pasted text.
const std::string selection = getAllText(socket, testname, text);
@@ -209,7 +209,7 @@ void HTTPWSTest::testSavePassiveOnDisconnect()
// the socket is closed, when the doc is not even modified yet.
getResponseMessage(socket1, "statechanged", testname);
- kitcount = getLoolKitProcessCount();
+ kitcount = getCoolKitProcessCount();
// Shutdown abruptly.
TST_LOG("Closing connection after pasting.");
@@ -227,7 +227,7 @@ void HTTPWSTest::testSavePassiveOnDisconnect()
}
// Allow time to save and destroy before we connect again.
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
TST_LOG("Loading again.");
try
{
@@ -237,7 +237,7 @@ void HTTPWSTest::testSavePassiveOnDisconnect()
getResponseMessage(socket, "textselection", testname);
// Should have no new instances.
- LOK_ASSERT_EQUAL(kitcount, countLoolKitProcesses(kitcount));
+ LOK_ASSERT_EQUAL(kitcount, countCoolKitProcesses(kitcount));
// Check if the document contains the pasted text.
const std::string selection = getAllText(socket, testname);
@@ -273,7 +273,7 @@ void HTTPWSTest::testReloadWhileDisconnecting()
// the socket is closed, when the doc is not even modified yet.
getResponseMessage(socket, "statechanged", testname);
- const int kitcount = getLoolKitProcessCount();
+ const int kitcount = getCoolKitProcessCount();
// Shutdown abruptly.
TST_LOG("Closing connection after pasting.");
@@ -286,7 +286,7 @@ void HTTPWSTest::testReloadWhileDisconnecting()
socket = loadDocAndGetSession(_socketPoll, _uri, documentURL, testname);
// Should have no new instances.
- LOK_ASSERT_EQUAL(kitcount, countLoolKitProcesses(kitcount));
+ LOK_ASSERT_EQUAL(kitcount, countCoolKitProcesses(kitcount));
// Check if the document contains the pasted text.
const std::string expected = "aaa bbb ccc";
@@ -328,7 +328,7 @@ void HTTPWSTest::testInactiveClient()
sendTextFrame(socket2, "useractive", "inactiveClient-2 ");
SocketProcessor("Second ", socket2, [&](const std::string& msg)
{
- const auto token = LOOLProtocol::getFirstToken(msg);
+ const auto token = COOLProtocol::getFirstToken(msg);
// 'window:' is e.g. 'window: {"id":"4","action":"invalidate","rectangle":"0, 0,
// 0, 0"}', which is probably fine, given that other invalidations are also
// expected.
diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp
index 81c8842bec..9ef4633458 100644
--- a/test/integration-http-server.cpp
+++ b/test/integration-http-server.cpp
@@ -26,11 +26,11 @@
#include <Common.hpp>
#include <common/FileUtil.hpp>
-#include <countloolkits.hpp>
+#include <countcoolkits.hpp>
#include <helpers.hpp>
#include <memory>
-/// Tests the HTTP GET API of loolwsd.
+/// Tests the HTTP GET API of coolwsd.
class HTTPServerTest : public CPPUNIT_NS::TestFixture
{
const Poco::URI _uri;
@@ -91,18 +91,18 @@ public:
void setUp()
{
helpers::resetTestStartTime();
- testCountHowManyLoolkits();
+ testCountHowManyCoolkits();
helpers::resetTestStartTime();
}
void tearDown()
{
helpers::resetTestStartTime();
- testNoExtraLoolKitsLeft();
+ testNoExtraCoolKitsLeft();
helpers::resetTestStartTime();
}
- // A server URI which was not added to loolwsd.xml as post_allow IP or a wopi storage host
+ // A server URI which was not added to coolwsd.xml as post_allow IP or a wopi storage host
Poco::URI getNotAllowedTestServerURI()
{
static std::string serverURI(
@@ -134,7 +134,7 @@ void HTTPServerTest::testCoolGet()
const std::string html = httpResponse->getBody();
LOK_ASSERT(html.find(param["access_token"]) != std::string::npos);
LOK_ASSERT(html.find(_uri.getHost()) != std::string::npos);
- LOK_ASSERT(html.find(std::string(LOOLWSD_VERSION_HASH)) != std::string::npos);
+ LOK_ASSERT(html.find(std::string(COOLWSD_VERSION_HASH)) != std::string::npos);
}
void HTTPServerTest::testCoolPost()
diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in
index 7582b68209..b60de15d73 100755
--- a/test/run_unit.sh.in
+++ b/test/run_unit.sh.in
@@ -66,7 +66,7 @@ echo " $cmd_line"
# drop .la suffix
tst=`echo $tst | sed "s/\.la//"`;
-export LOOL_LOGLEVEL=trace
+export COOL_LOGLEVEL=trace
if test "z$enable_debug" != "ztrue"; then
echo ""
diff --git a/test/test.cpp b/test/test.cpp
index a8edd73bc4..0893c3b181 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -32,7 +32,7 @@
#include <helpers.hpp>
#include <Unit.hpp>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
#if ENABLE_SSL
#include <Ssl.hpp>
#include <SslSocket.hpp>
@@ -78,7 +78,7 @@ static bool IsDebugrun = false;
int main(int argc, char** argv)
{
bool verbose = false;
- std::string cert_path = "/etc/loolwsd/";
+ std::string cert_path = "/etc/coolwsd/";
for (int i = 1; i < argc; ++i)
{
const std::string arg(argv[i]);
@@ -292,20 +292,20 @@ bool runClientTests(bool standalone, bool verbose)
std::set<pid_t> getKitPids()
{
- return LOOLWSD::getKitPids();
+ return COOLWSD::getKitPids();
}
/// Get the PID of the forkit
std::set<pid_t> getForKitPids()
{
std::set<pid_t> pids;
- if (LOOLWSD::ForKitProcId >= 0)
- pids.emplace(LOOLWSD::ForKitProcId);
+ if (COOLWSD::ForKitProcId >= 0)
+ pids.emplace(COOLWSD::ForKitProcId);
return pids;
}
-/// How many live loolkit processes do we have ?
-int getLoolKitProcessCount()
+/// How many live coolkit processes do we have ?
+int getCoolKitProcessCount()
{
return getKitPids().size();
}
diff --git a/test/test.hpp b/test/test.hpp
index 92ff184f44..5d77c52fd3 100644
--- a/test/test.hpp
+++ b/test/test.hpp
@@ -31,7 +31,7 @@ std::set<pid_t> getForKitPids();
/// Which port should we connect to get to WSD.
int getClientPort();
-/// How many live loolkit processes do we have ?
-int getLoolKitProcessCount();
+/// How many live coolkit processes do we have ?
+int getCoolKitProcessCount();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/LOOLWebSocket.hpp b/tools/COOLWebSocket.hpp
index 582d5ef2a6..65ba1acf9d 100644
--- a/tools/LOOLWebSocket.hpp
+++ b/tools/COOLWebSocket.hpp
@@ -23,19 +23,19 @@
///
/// WebSocket that is thread safe, and handles large frames transparently.
/// Careful - sendFrame and receiveFrame are _not_ virtual,
-/// we need to make sure that we use LOOLWebSocket all over the place.
+/// we need to make sure that we use COOLWebSocket all over the place.
/// It would be a kind of more natural to encapsulate Poco::Net::WebSocket
/// instead of inheriting (from that reason,) but that would requite much
/// larger code changes.
-class LOOLWebSocket : public Poco::Net::WebSocket
+class COOLWebSocket : public Poco::Net::WebSocket
{
public:
- LOOLWebSocket(const Socket& socket) :
+ COOLWebSocket(const Socket& socket) :
Poco::Net::WebSocket(socket)
{
}
- LOOLWebSocket(Poco::Net::HTTPClientSession& cs,
+ COOLWebSocket(Poco::Net::HTTPClientSession& cs,
Poco::Net::HTTPRequest& request,
Poco::Net::HTTPResponse& response) :
Poco::Net::WebSocket(cs, request, response)
@@ -144,7 +144,7 @@ public:
}
catch (const Poco::Exception& exc)
{
- TST_LOG("WARN: LOOLWebSocket::shutdown: Exception: "
+ TST_LOG("WARN: COOLWebSocket::shutdown: Exception: "
<< exc.displayText()
<< (exc.nested() ? " (" + exc.nested()->displayText() + ')' : ""));
@@ -193,7 +193,7 @@ public:
(flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) == Poco::Net::WebSocket::FRAME_OP_BINARY ||
(flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) == Poco::Net::WebSocket::FRAME_OP_PING ||
(flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) == Poco::Net::WebSocket::FRAME_OP_PONG))
- result << ": '" << LOOLProtocol::getAbbreviatedMessage(message, length) << '\'';
+ result << ": '" << COOLProtocol::getAbbreviatedMessage(message, length) << '\'';
return result.str();
}
};
diff --git a/tools/Config.cpp b/tools/Config.cpp
index 9104896f99..4b08f04c2d 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -60,7 +60,7 @@ public:
unsigned getPwdHashLength() const { return _pwdHashLength; }
};
-// Config tool to change loolwsd configuration (loolwsd.xml)
+// Config tool to change coolwsd configuration (coolwsd.xml)
class Config: public Application
{
// Display help information on the console
@@ -87,9 +87,9 @@ std::string Config::ConfigFile =
#if ENABLE_DEBUG
DEBUG_ABSSRCDIR
#else
- LOOLWSD_CONFIGDIR
+ COOLWSD_CONFIGDIR
#endif
- "/loolwsd.xml";
+ "/coolwsd.xml";
std::string Config::SupportKeyString;
bool Config::SupportKeyStringProvided = false;
@@ -296,7 +296,7 @@ int Config::main(const std::vector<std::string>& args)
changed = true;
#else
- std::cerr << "This application was compiled with old OpenSSL. Operation not supported. You can use plain text password in /etc/loolwsd/loolwsd.xml." << std::endl;
+ std::cerr << "This application was compiled with old OpenSSL. Operation not supported. You can use plain text password in /etc/coolwsd/coolwsd.xml." << std::endl;
return EX_UNAVAILABLE;
#endif
}
diff --git a/tools/Connect.cpp b/tools/Connect.cpp
index c1d8fb2969..11ee4ce7ba 100644
--- a/tools/Connect.cpp
+++ b/tools/Connect.cpp
@@ -31,11 +31,11 @@
#include <Common.hpp>
#include <Protocol.hpp>
-#include "LOOLWebSocket.hpp"
+#include "COOLWebSocket.hpp"
#include <Log.hpp>
#include <Util.hpp>
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::Net::AcceptCertificateHandler;
using Poco::Net::Context;
@@ -61,11 +61,11 @@ static std::mutex coutMutex;
constexpr auto Name = "connect ";
-/// Prints incoming data from a LOOLWebSocket.
+/// Prints incoming data from a COOLWebSocket.
class Output : public Runnable
{
public:
- Output(LOOLWebSocket& ws) :
+ Output(COOLWebSocket& ws) :
_ws(ws)
{
}
@@ -84,7 +84,7 @@ public:
{
{
std::unique_lock<std::mutex> lock(coutMutex);
- std::cout << "Got " << LOOLWebSocket::getAbbreviatedFrameDump(buffer, n, flags) << std::endl;
+ std::cout << "Got " << COOLWebSocket::getAbbreviatedFrameDump(buffer, n, flags) << std::endl;
}
std::string firstLine = getFirstLine(buffer, n);
@@ -121,7 +121,7 @@ public:
}
private:
- LOOLWebSocket& _ws;
+ COOLWebSocket& _ws;
};
/// Program for interactive or scripted testing of a cool server.
@@ -165,7 +165,7 @@ protected:
URI::encode(args[0], ":/?", encodedUri);
HTTPRequest request(HTTPRequest::HTTP_GET, "/cool/" + encodedUri + "/ws");
HTTPResponse response;
- LOOLWebSocket ws(cs, request, response);
+ COOLWebSocket ws(cs, request, response);
ws.setReceiveTimeout(0);
diff --git a/tools/Replay.hpp b/tools/Replay.hpp
index 10391985e6..9adae8ef4c 100644
--- a/tools/Replay.hpp
+++ b/tools/Replay.hpp
@@ -231,7 +231,7 @@ public:
std::string rewriteMessage(const std::string &msg)
{
- const std::string firstLine = LOOLProtocol::getFirstLine(msg);
+ const std::string firstLine = COOLProtocol::getFirstLine(msg);
StringVector tokens = Util::tokenize(firstLine);
std::string out = msg;
@@ -259,7 +259,7 @@ public:
{
const auto now = std::chrono::steady_clock::now();
- const std::string firstLine = LOOLProtocol::getFirstLine(data.data(), data.size());
+ const std::string firstLine = COOLProtocol::getFirstLine(data.data(), data.size());
StringVector tokens = Util::tokenize(firstLine);
std::cerr << "Got a message ! " << firstLine << "\n";
diff --git a/tools/Stress.cpp b/tools/Stress.cpp
index fb80f2505a..9c15e97d65 100644
--- a/tools/Stress.cpp
+++ b/tools/Stress.cpp
@@ -56,7 +56,7 @@ void Stress::handleOption(const std::string& optionName,
void Stress::printHelp()
{
- std::cerr << "Usage: loolstress wss://localhost:9980 <test-document-path> <trace-path> " << std::endl;
+ std::cerr << "Usage: coolstress wss://localhost:9980 <test-document-path> <trace-path> " << std::endl;
std::cerr << " Trace files may be plain text or gzipped (with .gz extension)." << std::endl;
std::cerr << " --help for full arguments list." << std::endl;
}
diff --git a/tools/Tool.cpp b/tools/Tool.cpp
index 9abad55326..5d8a9ed5b2 100644
--- a/tools/Tool.cpp
+++ b/tools/Tool.cpp
@@ -61,7 +61,7 @@ protected:
};
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::Net::HTTPClientSession;
using Poco::Net::HTTPRequest;
@@ -107,7 +107,7 @@ public:
form.addPart("data", new Poco::Net::FilePartSource(document));
form.prepareSubmit(request);
- // If this results in a Poco::Net::ConnectionRefusedException, loolwsd is not running.
+ // If this results in a Poco::Net::ConnectionRefusedException, coolwsd is not running.
form.write(session->sendRequest(request));
}
catch (const Poco::Exception &e)
diff --git a/tools/WebSocketDump.cpp b/tools/WebSocketDump.cpp
index 1edc754e0e..d75f4d19e7 100644
--- a/tools/WebSocketDump.cpp
+++ b/tools/WebSocketDump.cpp
@@ -168,7 +168,7 @@ private:
// NOTE: Check _wsState to choose between HTTP response or WebSocket (app-level) error.
LOG_INF('#' << socket->getFD() << " Exception while processing incoming request: [" <<
- LOOLProtocol::getAbbreviatedMessage(in) << "]: " << exc.what());
+ COOLProtocol::getAbbreviatedMessage(in) << "]: " << exc.what());
}
// if we succeeded - remove the request from our input buffer
@@ -239,7 +239,7 @@ int main (int argc, char **argv)
std::map<std::string, std::string>());
CoolConfig config;
- config.load("loolwsd.xml");
+ config.load("coolwsd.xml");
// read the port & ssl support
int port = 9042;
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 1bbab3b8a4..2c9c394b5b 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -37,7 +37,7 @@
#include <common/SigUtil.hpp>
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::Net::HTTPResponse;
using Poco::Util::Application;
@@ -73,7 +73,7 @@ void AdminSocketHandler::handleMessage(const std::vector<char> &payload)
return;
}
std::string jwtToken;
- LOOLProtocol::getTokenString(tokens[1], "jwt", jwtToken);
+ COOLProtocol::getTokenString(tokens[1], "jwt", jwtToken);
LOG_INF("Verifying JWT token: " << jwtToken);
JWTAuth authAgent("admin", "admin", "admin");
@@ -123,7 +123,7 @@ void AdminSocketHandler::handleMessage(const std::vector<char> &payload)
// Send COOL version information
sendTextFrame("coolserver " + Util::getVersionJSON());
// Send LOKit version information
- sendTextFrame("lokitversion " + LOOLWSD::LOKitVersion);
+ sendTextFrame("lokitversion " + COOLWSD::LOKitVersion);
}
else if (tokens.equals(0, "subscribe") && tokens.size() > 1)
{
@@ -263,7 +263,7 @@ void AdminSocketHandler::handleMessage(const std::vector<char> &payload)
model.notify("settings cpu_stats_interval=" + std::to_string(_admin->getCpuStatsInterval()));
}
}
- else if (LOOLProtocol::matchPrefix("limit_", settingName))
+ else if (COOLProtocol::matchPrefix("limit_", settingName))
{
DocProcSettings docProcSettings = _admin->getDefDocProcSettings();
if (settingName == "limit_virt_mem_mb")
@@ -304,7 +304,7 @@ AdminSocketHandler::AdminSocketHandler(Admin* adminManager,
, _isAuthenticated(false)
{
// Different session id pool for admin sessions (?)
- _sessionId = Util::decodeId(LOOLWSD::GetConnectionId());
+ _sessionId = Util::decodeId(COOLWSD::GetConnectionId());
}
AdminSocketHandler::AdminSocketHandler(Admin* adminManager)
@@ -312,7 +312,7 @@ AdminSocketHandler::AdminSocketHandler(Admin* adminManager)
_admin(adminManager),
_isAuthenticated(true)
{
- _sessionId = Util::decodeId(LOOLWSD::GetConnectionId());
+ _sessionId = Util::decodeId(COOLWSD::GetConnectionId());
}
void AdminSocketHandler::sendTextFrame(const std::string& message)
@@ -346,7 +346,7 @@ bool AdminSocketHandler::handleInitialRequest(
const std::weak_ptr<StreamSocket> &socketWeak,
const Poco::Net::HTTPRequest& request)
{
- if (!LOOLWSD::AdminEnabled)
+ if (!COOLWSD::AdminEnabled)
{
LOG_ERR("Request for disabled admin console");
return false;
@@ -400,7 +400,7 @@ Admin::Admin() :
_totalSysMemKb = Util::getTotalSystemMemoryKb();
LOG_TRC("Total system memory: " << _totalSysMemKb << " KB.");
- const auto memLimit = LOOLWSD::getConfigValue<double>("memproportion", 0.0);
+ const auto memLimit = COOLWSD::getConfigValue<double>("memproportion", 0.0);
_totalAvailMemKb = _totalSysMemKb;
if (memLimit != 0.0)
_totalAvailMemKb = _totalSysMemKb * memLimit / 100.;
@@ -634,8 +634,8 @@ void Admin::setChannelLogLevel(const std::string& channelName, std::string level
Log::logger().get("wsd").setLevel(level);
else if (channelName == "kit")
{
- LOOLWSD::setLogLevelsOfKits(level); // For current kits.
- LOOLWSD::sendMessageToForKit("setloglevel " + level); // For forkit and future kits.
+ COOLWSD::setLogLevelsOfKits(level); // For current kits.
+ COOLWSD::sendMessageToForKit("setloglevel " + level); // For forkit and future kits.
_forkitLogLevel = level; // We will remember this setting rather than asking forkit its loglevel.
}
}
@@ -646,7 +646,7 @@ std::string Admin::getLogLines()
try {
int lineCount = 500;
- std::string fName = LOOLWSD::getPathFromConfig("logging.file.property[0]");
+ std::string fName = COOLWSD::getPathFromConfig("logging.file.property[0]");
std::ifstream infile(fName);
std::string line;
@@ -732,13 +732,13 @@ void Admin::notifyForkit()
<< "setconfig limit_file_size_mb " << _defDocProcSettings.getLimitFileSizeMb() << '\n'
<< "setconfig limit_num_open_files " << _defDocProcSettings.getLimitNumberOpenFiles() << '\n';
- LOOLWSD::sendMessageToForKit(oss.str());
+ COOLWSD::sendMessageToForKit(oss.str());
}
void Admin::triggerMemoryCleanup(const size_t totalMem)
{
// Trigger mem cleanup when we are consuming too much memory (as configured by sysadmin)
- static const double memLimit = LOOLWSD::getConfigValue<double>("memproportion", 0.0);
+ static const double memLimit = COOLWSD::getConfigValue<double>("memproportion", 0.0);
if (memLimit == 0.0 || _totalSysMemKb == 0)
{
LOG_TRC("Total memory consumed: " << totalMem <<
@@ -768,7 +768,7 @@ void Admin::triggerMemoryCleanup(const size_t totalMem)
{
// Kill the saved documents first.
LOG_DBG("OOM: Killing saved document with DocKey [" << doc.getDocKey() << "] with " << doc.getMem() << " KB.");
- LOOLWSD::closeDocument(doc.getDocKey(), "oom");
+ COOLWSD::closeDocument(doc.getDocKey(), "oom");
memToFreeKb -= doc.getMem();
if (memToFreeKb <= 1024)
break;
@@ -777,7 +777,7 @@ void Admin::triggerMemoryCleanup(const size_t totalMem)
{
// Save unsaved documents.
LOG_TRC("Saving document: DocKey [" << doc.getDocKey() << "].");
- LOOLWSD::autoSave(doc.getDocKey());
+ COOLWSD::autoSave(doc.getDocKey());
}
}
}
@@ -802,7 +802,7 @@ void Admin::cleanupLostKits()
unsigned lostKitsTerminated = 0;
size_t gracePeriod = _defDocProcSettings.getCleanupSettings().getLostKitGracePeriod();
- internalKitPids = LOOLWSD::getKitPids();
+ internalKitPids = COOLWSD::getKitPids();
AdminModel::getKitPidsFromSystem(&kitPids);
for (auto itProc = kitPids.begin(); itProc != kitPids.end(); itProc ++)
diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp
index 01f531337b..ecb6f40b63 100644
--- a/wsd/Admin.hpp
+++ b/wsd/Admin.hpp
@@ -13,7 +13,7 @@
#include "Log.hpp"
#include "net/WebSocketHandler.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
class Admin;
diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index a8b7c01b8e..4fb069b709 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -22,7 +22,7 @@
#include <Log.hpp>
#include <Unit.hpp>
#include <Util.hpp>
-#include <wsd/LOOLWSD.hpp>
+#include <wsd/COOLWSD.hpp>
#include <fnmatch.h>
#include <dirent.h>
@@ -96,7 +96,7 @@ const std::string Document::getHistory() const
std::ostringstream oss;
oss << "{";
oss << "\"docKey\"" << ":\"" << _docKey << "\",";
- oss << "\"filename\"" << ":\"" << LOOLWSD::anonymizeUrl(getFilename()) << "\",";
+ oss << "\"filename\"" << ":\"" << COOLWSD::anonymizeUrl(getFilename()) << "\",";
oss << "\"start\"" << ':' << _start << ',';
oss << "\"end\"" << ':' << _end << ',';
oss << "\"pid\"" << ':' << getPid() << ',';
@@ -163,7 +163,7 @@ bool Subscriber::notify(const std::string& message)
std::shared_ptr<WebSocketHandler> webSocket = _ws.lock();
if (webSocket)
{
- if (_subscriptions.find(LOOLProtocol::getFirstToken(message)) == _subscriptions.end())
+ if (_subscriptions.find(COOLProtocol::getFirstToken(message)) == _subscriptions.end())
{
// No subscribers for the given message.
return true;
@@ -241,7 +241,7 @@ std::string AdminModel::query(const std::string& command)
{
assertCorrectThread();
- const auto token = LOOLProtocol::getFirstToken(command);
+ const auto token = COOLProtocol::getFirstToken(command);
if (token == "documents")
{
return getDocuments();
@@ -286,7 +286,7 @@ std::string AdminModel::query(const std::string& command)
return std::string("");
}
-/// Returns memory consumed by all active loolkit processes
+/// Returns memory consumed by all active coolkit processes
unsigned AdminModel::getKitsMemoryUsage()
{
assertCorrectThread();
@@ -820,7 +820,7 @@ double AdminModel::getServerUptimeSecs()
{
const auto currentTime = std::chrono::steady_clock::now();
const std::chrono::milliseconds uptime
- = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - LOOLWSD::StartTime);
+ = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - COOLWSD::StartTime);
return uptime.count() / 1000.0; // Convert to seconds and fractions.
}
@@ -1092,10 +1092,10 @@ void PrintKitAggregateMetrics(std::ostringstream &oss, const char* name, const c
void AdminModel::getMetrics(std::ostringstream &oss)
{
- oss << "loolwsd_count " << getPidsFromProcName(std::regex("loolwsd"), nullptr) << std::endl;
- oss << "loolwsd_thread_count " << Util::getStatFromPid(getpid(), 19) << std::endl;
- oss << "loolwsd_cpu_time_seconds " << Util::getCpuUsage(getpid()) / sysconf (_SC_CLK_TCK) << std::endl;
- oss << "loolwsd_memory_used_bytes " << Util::getMemoryUsagePSS(getpid()) * 1024 << std::endl;
+ oss << "coolwsd_count " << getPidsFromProcName(std::regex("coolwsd"), nullptr) << std::endl;
+ oss << "coolwsd_thread_count " << Util::getStatFromPid(getpid(), 19) << std::endl;
+ oss << "coolwsd_cpu_time_seconds " << Util::getCpuUsage(getpid()) / sysconf (_SC_CLK_TCK) << std::endl;
+ oss << "coolwsd_memory_used_bytes " << Util::getMemoryUsagePSS(getpid()) * 1024 << std::endl;
oss << std::endl;
oss << "forkit_count " << getPidsFromProcName(std::regex("forkit"), nullptr) << std::endl;
diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp
index fda37eeaa6..10ddd350e0 100644
--- a/wsd/AdminModel.hpp
+++ b/wsd/AdminModel.hpp
@@ -327,7 +327,7 @@ public:
std::string query(const std::string& command);
std::string getAllHistory() const;
- /// Returns memory consumed by all active loolkit processes
+ /// Returns memory consumed by all active coolkit processes
unsigned getKitsMemoryUsage();
size_t getKitsJiffies();
diff --git a/wsd/Auth.cpp b/wsd/Auth.cpp
index cdbe393627..dfcc0e8371 100644
--- a/wsd/Auth.cpp
+++ b/wsd/Auth.cpp
@@ -29,7 +29,7 @@
#include <Log.hpp>
#include <Util.hpp>
#include <Protocol.hpp>
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
using Poco::Base64Decoder;
using Poco::Base64Encoder;
@@ -193,7 +193,7 @@ const std::string JWTAuth::createPayload()
{
std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
std::time_t curtime = std::chrono::system_clock::to_time_t(now);
- int expirySeconds = LOOLWSD::getConfigValue<int>("security.jwt_expiry_secs", 1800);
+ int expirySeconds = COOLWSD::getConfigValue<int>("security.jwt_expiry_secs", 1800);
const std::string exptime = std::to_string(curtime + expirySeconds);
// TODO: Some sane code to represent JSON objects
diff --git a/wsd/LOOLWSD.cpp b/wsd/COOLWSD.cpp
index 2770a6dc31..83938d0671 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/COOLWSD.cpp
@@ -6,31 +6,31 @@
*/
#include <config.h>
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "ProofKey.hpp"
/* Default host used in the start test URI */
-#define LOOLWSD_TEST_HOST "localhost"
+#define COOLWSD_TEST_HOST "localhost"
/* Default cool UI used in the admin console URI */
-#define LOOLWSD_TEST_ADMIN_CONSOLE "/browser/dist/admin/admin.html"
+#define COOLWSD_TEST_ADMIN_CONSOLE "/browser/dist/admin/admin.html"
/* Default cool UI used in for monitoring URI */
-#define LOOLWSD_TEST_METRICS "/cool/getMetrics"
+#define COOLWSD_TEST_METRICS "/cool/getMetrics"
/* Default cool UI used in the start test URI */
-#define LOOLWSD_TEST_COOL_UI "/browser/" LOOLWSD_VERSION_HASH "/debug.html"
+#define COOLWSD_TEST_COOL_UI "/browser/" COOLWSD_VERSION_HASH "/debug.html"
/* Default document used in the start test URI */
-#define LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_WRITER "test/data/hello-world.odt"
-#define LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC "test/data/hello-world.ods"
-#define LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_IMPRESS "test/data/hello-world.odp"
-#define LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_DRAW "test/data/hello-world.odg"
+#define COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_WRITER "test/data/hello-world.odt"
+#define COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC "test/data/hello-world.ods"
+#define COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_IMPRESS "test/data/hello-world.odp"
+#define COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_DRAW "test/data/hello-world.odg"
/* Default ciphers used, when not specified otherwise */
#define DEFAULT_CIPHER_SET "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
-// This is the main source for the loolwsd program. COOL uses several loolwsd processes: one main
+// This is the main source for the coolwsd program. COOL uses several coolwsd processes: one main
// parent process that listens on the TCP port and accepts connections from COOL clients, and a
// number of child processes, each which handles a viewing (editing) session for one document.
@@ -154,7 +154,7 @@ using Poco::Net::PartHandler;
#endif
#endif
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::DirectoryIterator;
using Poco::Exception;
@@ -212,14 +212,14 @@ static std::chrono::milliseconds careerSpanMs(std::chrono::milliseconds::zero())
/// The timeout for a child to spawn, initially high, then reset to the default.
int ChildSpawnTimeoutMs = CHILD_TIMEOUT_MS * 4;
-std::atomic<unsigned> LOOLWSD::NumConnections;
-std::unordered_set<std::string> LOOLWSD::EditFileExtensions;
-std::unordered_set<std::string> LOOLWSD::ViewWithCommentsFileExtensions;
+std::atomic<unsigned> COOLWSD::NumConnections;
+std::unordered_set<std::string> COOLWSD::EditFileExtensions;
+std::unordered_set<std::string> COOLWSD::ViewWithCommentsFileExtensions;
#if MOBILEAPP
// Or can this be retrieved in some other way?
-int LOOLWSD::prisonerServerSocketFD;
+int COOLWSD::prisonerServerSocketFD;
#else
@@ -237,7 +237,7 @@ inline void shutdownLimitReached(const std::shared_ptr<ProtocolHandlerInterface>
if (!proto)
return;
- const std::string error = Poco::format(PAYLOAD_UNAVAILABLE_LIMIT_REACHED, LOOLWSD::MaxDocuments, LOOLWSD::MaxConnections);
+ const std::string error = Poco::format(PAYLOAD_UNAVAILABLE_LIMIT_REACHED, COOLWSD::MaxDocuments, COOLWSD::MaxConnections);
LOG_INF("Sending client 'hardlimitreached' message: " << error);
try
@@ -277,16 +277,16 @@ void alertAllUsersInternal(const std::string& msg)
} // end anonymous namespace
-void LOOLWSD::writeTraceEventRecording(const char *data, std::size_t nbytes)
+void COOLWSD::writeTraceEventRecording(const char *data, std::size_t nbytes)
{
static std::mutex traceEventFileMutex;
std::unique_lock<std::mutex> lock(traceEventFileMutex);
- fwrite(data, nbytes, 1, LOOLWSD::TraceEventFile);
+ fwrite(data, nbytes, 1, COOLWSD::TraceEventFile);
}
-void LOOLWSD::writeTraceEventRecording(const std::string &recording)
+void COOLWSD::writeTraceEventRecording(const std::string &recording)
{
writeTraceEventRecording(recording.data(), recording.length());
}
@@ -296,32 +296,32 @@ void LOOLWSD::writeTraceEventRecording(const std::string &recording)
void TraceEvent::emitOneRecordingIfEnabled(const std::string &recording)
{
- if (LOOLWSD::TraceEventFile == NULL)
+ if (COOLWSD::TraceEventFile == NULL)
return;
- LOOLWSD::writeTraceEventRecording(recording);
+ COOLWSD::writeTraceEventRecording(recording);
}
void TraceEvent::emitOneRecording(const std::string &recording)
{
- if (LOOLWSD::TraceEventFile == NULL)
+ if (COOLWSD::TraceEventFile == NULL)
return;
if (!TraceEvent::isRecordingOn())
return;
- LOOLWSD::writeTraceEventRecording(recording + "\n");
+ COOLWSD::writeTraceEventRecording(recording + "\n");
}
-void LOOLWSD::checkSessionLimitsAndWarnClients()
+void COOLWSD::checkSessionLimitsAndWarnClients()
{
#if !ENABLE_SUPPORT_KEY
#if !MOBILEAPP
ssize_t docBrokerCount = DocBrokers.size() - ConvertToBroker::getInstanceCount();
- if (LOOLWSD::MaxDocuments < 10000 &&
- (docBrokerCount > static_cast<ssize_t>(LOOLWSD::MaxDocuments) || LOOLWSD::NumConnections >= LOOLWSD::MaxConnections))
+ if (COOLWSD::MaxDocuments < 10000 &&
+ (docBrokerCount > static_cast<ssize_t>(COOLWSD::MaxDocuments) || COOLWSD::NumConnections >= COOLWSD::MaxConnections))
{
- const std::string info = Poco::format(PAYLOAD_INFO_LIMIT_REACHED, LOOLWSD::MaxDocuments, LOOLWSD::MaxConnections);
+ const std::string info = Poco::format(PAYLOAD_INFO_LIMIT_REACHED, COOLWSD::MaxDocuments, COOLWSD::MaxConnections);
LOG_INF("Sending client 'limitreached' message: " << info);
try
@@ -337,7 +337,7 @@ void LOOLWSD::checkSessionLimitsAndWarnClients()
#endif
}
-void LOOLWSD::checkDiskSpaceAndWarnClients(const bool cacheLastCheck)
+void COOLWSD::checkDiskSpaceAndWarnClients(const bool cacheLastCheck)
{
#if !MOBILEAPP
try
@@ -395,7 +395,7 @@ void cleanupDocBrokers()
}
#if !MOBILEAPP && ENABLE_DEBUG
- if (LOOLWSD::SingleKit && DocBrokers.size() == 0)
+ if (COOLWSD::SingleKit && DocBrokers.size() == 0)
{
LOG_DBG("Setting ShutdownRequestFlag: No more docs left in single-kit mode.");
SigUtil::requestShutdown();
@@ -416,15 +416,15 @@ static int forkChildren(const int number)
if (number > 0)
{
- LOOLWSD::checkDiskSpaceAndWarnClients(false);
+ COOLWSD::checkDiskSpaceAndWarnClients(false);
#ifdef KIT_IN_PROCESS
- forkLibreOfficeKit(LOOLWSD::ChildRoot, LOOLWSD::SysTemplate, LOOLWSD::LoTemplate,
+ forkLibreOfficeKit(COOLWSD::ChildRoot, COOLWSD::SysTemplate, COOLWSD::LoTemplate,
LO_JAIL_SUBPATH, number);
#else
const std::string aMessage = "spawn " + std::to_string(number) + '\n';
LOG_DBG("MasterToForKit: " << aMessage.substr(0, aMessage.length() - 1));
- LOOLWSD::sendMessageToForKit(aMessage);
+ COOLWSD::sendMessageToForKit(aMessage);
#endif
OutstandingForks += number;
LastForkRequestTime = std::chrono::steady_clock::now();
@@ -498,7 +498,7 @@ static bool prespawnChildren()
{
// Rebalance if not forking already.
std::unique_lock<std::mutex> lock(NewChildrenMutex, std::defer_lock);
- return lock.try_lock() && (rebalanceChildren(LOOLWSD::NumPreSpawnedChildren) > 0);
+ return lock.try_lock() && (rebalanceChildren(COOLWSD::NumPreSpawnedChildren) > 0);
}
#endif
@@ -526,7 +526,7 @@ static size_t addNewChild(const std::shared_ptr<ChildProcess>& child)
#if MOBILEAPP
#ifndef IOS
-std::mutex LOOLWSD::lokit_main_mutex;
+std::mutex COOLWSD::lokit_main_mutex;
#endif
#endif
@@ -540,13 +540,13 @@ std::shared_ptr<ChildProcess> getNewChild_Blocks(unsigned mobileAppDocId)
(void) mobileAppDocId;
LOG_DBG("getNewChild: Rebalancing children.");
- int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
+ int numPreSpawn = COOLWSD::NumPreSpawnedChildren;
++numPreSpawn; // Replace the one we'll dispatch just now.
if (rebalanceChildren(numPreSpawn) < 0)
{
LOG_DBG("getNewChild: rebalancing of children failed. Scheduling housekeeping to recover.");
- LOOLWSD::doHousekeeping();
+ COOLWSD::doHousekeeping();
// Let the caller retry after a while.
return nullptr;
@@ -562,14 +562,14 @@ std::shared_ptr<ChildProcess> getNewChild_Blocks(unsigned mobileAppDocId)
std::thread([&]
{
#ifndef IOS
- std::lock_guard<std::mutex> lock(LOOLWSD::lokit_main_mutex);
+ std::lock_guard<std::mutex> lock(COOLWSD::lokit_main_mutex);
Util::setThreadName("lokit_main");
#else
Util::setThreadName("lokit_main_" + Util::encodeId(mobileAppDocId, 3));
#endif
- // Ugly to have that static global LOOLWSD::prisonerServerSocketFD, Otoh we know
- // there is just one LOOLWSD object. (Even in real Online.)
- lokit_main(LOOLWSD::prisonerServerSocketFD, LOOLWSD::UserInterface, mobileAppDocId);
+ // Ugly to have that static global COOLWSD::prisonerServerSocketFD, Otoh we know
+ // there is just one COOLWSD object. (Even in real Online.)
+ lokit_main(COOLWSD::prisonerServerSocketFD, COOLWSD::UserInterface, mobileAppDocId);
}).detach();
#endif
@@ -656,7 +656,7 @@ public:
// The temporary directory is child-root/<JAIL_TMP_INCOMING_PATH>.
// Always create a random sub-directory to avoid file-name collision.
Path tempPath = Path::forDirectory(
- FileUtil::createRandomTmpDir(LOOLWSD::ChildRoot + JailUtil::JAIL_TMP_INCOMING_PATH)
+ FileUtil::createRandomTmpDir(COOLWSD::ChildRoot + JailUtil::JAIL_TMP_INCOMING_PATH)
+ '/');
LOG_TRC("Created temporary convert-to/insert path: " << tempPath.toString());
@@ -726,7 +726,7 @@ public:
// The temporary directory is child-root/<JAIL_TMP_INCOMING_PATH>.
// Always create a random sub-directory to avoid file-name collision.
Path tempPath = Path::forDirectory(
- FileUtil::createRandomTmpDir(LOOLWSD::ChildRoot + JailUtil::JAIL_TMP_INCOMING_PATH)
+ FileUtil::createRandomTmpDir(COOLWSD::ChildRoot + JailUtil::JAIL_TMP_INCOMING_PATH)
+ '/');
LOG_TRC("Created temporary render-search-result file path: " << tempPath.toString());
@@ -764,12 +764,12 @@ inline std::string getLaunchBase(bool asAdmin = false)
{
std::ostringstream oss;
oss << " ";
- oss << ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()) ? "https://" : "http://");
+ oss << ((COOLWSD::isSSLEnabled() || COOLWSD::isSSLTermination()) ? "https://" : "http://");
if (asAdmin)
{
- auto user = LOOLWSD::getConfigValue<std::string>("admin_console.username", "");
- auto passwd = LOOLWSD::getConfigValue<std::string>("admin_console.password", "");
+ auto user = COOLWSD::getConfigValue<std::string>("admin_console.username", "");
+ auto passwd = COOLWSD::getConfigValue<std::string>("admin_console.password", "");
if (user.empty() || passwd.empty())
return "";
@@ -777,7 +777,7 @@ inline std::string getLaunchBase(bool asAdmin = false)
oss << user << ':' << passwd << '@';
}
- oss << LOOLWSD_TEST_HOST ":";
+ oss << COOLWSD_TEST_HOST ":";
oss << ClientPortNumber;
return oss.str();
@@ -788,8 +788,8 @@ inline std::string getLaunchURI(const std::string &document)
std::ostringstream oss;
oss << getLaunchBase();
- oss << LOOLWSD::ServiceRoot;
- oss << LOOLWSD_TEST_COOL_UI;
+ oss << COOLWSD::ServiceRoot;
+ oss << COOLWSD_TEST_COOL_UI;
oss << "?file_path=";
oss << DEBUG_ABSSRCDIR "/";
oss << document;
@@ -802,7 +802,7 @@ inline std::string getServiceURI(const std::string &sub, bool asAdmin = false)
std::ostringstream oss;
oss << getLaunchBase(asAdmin);
- oss << LOOLWSD::ServiceRoot;
+ oss << COOLWSD::ServiceRoot;
oss << sub;
return oss.str();
@@ -825,7 +825,7 @@ void sendLoadResult(std::shared_ptr<ClientSession> clientSession, bool success,
// Some sane limit, otherwise we get problems transferring this
// to the client with large strings (can be a whole webpage)
// Replace reserved characters
- std::string errorMsgFormatted = LOOLProtocol::getAbbreviatedMessage(errorMsg);
+ std::string errorMsgFormatted = COOLProtocol::getAbbreviatedMessage(errorMsg);
errorMsgFormatted = Poco::translate(errorMsg, "\"", "'");
clientSession->sendMessage("commandresult: { \"command\": \"load\", \"success\": " + resultstr +
", \"result\": \"" + result + "\", \"errorMsg\": \"" + errorMsgFormatted + "\"}");
@@ -833,64 +833,64 @@ void sendLoadResult(std::shared_ptr<ClientSession> clientSession, bool success,
} // anonymous namespace
-std::atomic<uint64_t> LOOLWSD::NextConnectionId(1);
+std::atomic<uint64_t> COOLWSD::NextConnectionId(1);
#if !MOBILEAPP
#ifndef KIT_IN_PROCESS
-std::atomic<int> LOOLWSD::ForKitProcId(-1);
-std::shared_ptr<ForKitProcess> LOOLWSD::ForKitProc;
+std::atomic<int> COOLWSD::ForKitProcId(-1);
+std::shared_ptr<ForKitProcess> COOLWSD::ForKitProc;
#endif
-bool LOOLWSD::NoCapsForKit = false;
-bool LOOLWSD::NoSeccomp = false;
-bool LOOLWSD::AdminEnabled = true;
+bool COOLWSD::NoCapsForKit = false;
+bool COOLWSD::NoSeccomp = false;
+bool COOLWSD::AdminEnabled = true;
#if ENABLE_DEBUG
-bool LOOLWSD::SingleKit = false;
+bool COOLWSD::SingleKit = false;
#endif
#endif
#ifdef FUZZER
-bool LOOLWSD::DummyLOK = false;
-std::string LOOLWSD::FuzzFileName;
+bool COOLWSD::DummyLOK = false;
+std::string COOLWSD::FuzzFileName;
#endif
-std::string LOOLWSD::SysTemplate;
-std::string LOOLWSD::LoTemplate = LO_PATH;
-std::string LOOLWSD::ChildRoot;
-std::string LOOLWSD::ServerName;
-std::string LOOLWSD::FileServerRoot;
-std::string LOOLWSD::WelcomeFilesRoot;
-std::string LOOLWSD::ServiceRoot;
-std::string LOOLWSD::LOKitVersion;
-std::string LOOLWSD::ConfigFile = LOOLWSD_CONFIGDIR "/loolwsd.xml";
-std::string LOOLWSD::ConfigDir = LOOLWSD_CONFIGDIR "/conf.d";
-bool LOOLWSD::EnableTraceEventLogging = false;
-FILE *LOOLWSD::TraceEventFile = NULL;
-std::string LOOLWSD::LogLevel = "trace";
-std::string LOOLWSD::MostVerboseLogLevelSettableFromClient = "notice";
-std::string LOOLWSD::LeastVerboseLogLevelSettableFromClient = "fatal";
-std::string LOOLWSD::UserInterface = "classic";
-bool LOOLWSD::AnonymizeUserData = false;
-bool LOOLWSD::CheckLoolUser = true;
-bool LOOLWSD::CleanupOnly = false; //< If we should cleanup and exit.
-bool LOOLWSD::IsProxyPrefixEnabled = false;
+std::string COOLWSD::SysTemplate;
+std::string COOLWSD::LoTemplate = LO_PATH;
+std::string COOLWSD::ChildRoot;
+std::string COOLWSD::ServerName;
+std::string COOLWSD::FileServerRoot;
+std::string COOLWSD::WelcomeFilesRoot;
+std::string COOLWSD::ServiceRoot;
+std::string COOLWSD::LOKitVersion;
+std::string COOLWSD::ConfigFile = COOLWSD_CONFIGDIR "/coolwsd.xml";
+std::string COOLWSD::ConfigDir = COOLWSD_CONFIGDIR "/conf.d";
+bool COOLWSD::EnableTraceEventLogging = false;
+FILE *COOLWSD::TraceEventFile = NULL;
+std::string COOLWSD::LogLevel = "trace";
+std::string COOLWSD::MostVerboseLogLevelSettableFromClient = "notice";
+std::string COOLWSD::LeastVerboseLogLevelSettableFromClient = "fatal";
+std::string COOLWSD::UserInterface = "classic";
+bool COOLWSD::AnonymizeUserData = false;
+bool COOLWSD::CheckCoolUser = true;
+bool COOLWSD::CleanupOnly = false; //< If we should cleanup and exit.
+bool COOLWSD::IsProxyPrefixEnabled = false;
#if ENABLE_SSL
-Util::RuntimeConstant<bool> LOOLWSD::SSLEnabled;
-Util::RuntimeConstant<bool> LOOLWSD::SSLTermination;
+Util::RuntimeConstant<bool> COOLWSD::SSLEnabled;
+Util::RuntimeConstant<bool> COOLWSD::SSLTermination;
#endif
-unsigned LOOLWSD::MaxConnections;
-unsigned LOOLWSD::MaxDocuments;
-std::string LOOLWSD::OverrideWatermark;
-std::set<const Poco::Util::AbstractConfiguration*> LOOLWSD::PluginConfigurations;
-std::chrono::steady_clock::time_point LOOLWSD::StartTime;
+unsigned COOLWSD::MaxConnections;
+unsigned COOLWSD::MaxDocuments;
+std::string COOLWSD::OverrideWatermark;
+std::set<const Poco::Util::AbstractConfiguration*> COOLWSD::PluginConfigurations;
+std::chrono::steady_clock::time_point COOLWSD::StartTime;
// If you add global state please update dumpState below too
static std::string UnitTestLibrary;
-unsigned int LOOLWSD::NumPreSpawnedChildren = 0;
-std::unique_ptr<TraceFileWriter> LOOLWSD::TraceDumper;
-std::unordered_map<std::string, std::vector<std::string>> LOOLWSD::QuarantineMap;
-std::string LOOLWSD::QuarantinePath;
+unsigned int COOLWSD::NumPreSpawnedChildren = 0;
+std::unique_ptr<TraceFileWriter> COOLWSD::TraceDumper;
+std::unordered_map<std::string, std::vector<std::string>> COOLWSD::QuarantineMap;
+std::string COOLWSD::QuarantinePath;
#if !MOBILEAPP
-std::unique_ptr<ClipboardCache> LOOLWSD::SavedClipboards;
+std::unique_ptr<ClipboardCache> COOLWSD::SavedClipboards;
#endif
/// This thread polls basic web serving, and handling of
@@ -950,7 +950,7 @@ private:
static std::unique_ptr<PrisonPoll> PrisonerPoll;
/// The Web Server instance with the accept socket poll thread.
-static std::unique_ptr<LOOLWSDServer> Server;
+static std::unique_ptr<COOLWSDServer> Server;
/// Helper class to hold default configuration entries.
class AppConfigMap final : public Poco::Util::MapConfiguration
@@ -969,8 +969,8 @@ public:
void ForKitProcWSHandler::handleMessage(const std::vector<char> &data)
{
- LOG_TRC("ForKitProcWSHandler: handling incoming [" << LOOLProtocol::getAbbreviatedMessage(&data[0], data.size()) << "].");
- const std::string firstLine = LOOLProtocol::getFirstLine(&data[0], data.size());
+ LOG_TRC("ForKitProcWSHandler: handling incoming [" << COOLProtocol::getAbbreviatedMessage(&data[0], data.size()) << "].");
+ const std::string firstLine = COOLProtocol::getFirstLine(&data[0], data.size());
const StringVector tokens = Util::tokenize(firstLine.data(), firstLine.size());
if (tokens.equals(0, "segfaultcount"))
@@ -979,7 +979,7 @@ void ForKitProcWSHandler::handleMessage(const std::vector<char> &data)
if (count >= 0)
{
Admin::instance().addSegFaultCount(count);
- LOG_INF(count << " loolkit processes crashed with segmentation fault.");
+ LOG_INF(count << " coolkit processes crashed with segmentation fault.");
}
else
{
@@ -994,18 +994,18 @@ void ForKitProcWSHandler::handleMessage(const std::vector<char> &data)
#endif
-LOOLWSD::LOOLWSD()
+COOLWSD::COOLWSD()
{
}
-LOOLWSD::~LOOLWSD()
+COOLWSD::~COOLWSD()
{
}
-void LOOLWSD::innerInitialize(Application& self)
+void COOLWSD::innerInitialize(Application& self)
{
#if !MOBILEAPP
- if (geteuid() == 0 && CheckLoolUser)
+ if (geteuid() == 0 && CheckCoolUser)
{
throw std::runtime_error("Do not run as root. Please run as cool user.");
}
@@ -1027,9 +1027,9 @@ void LOOLWSD::innerInitialize(Application& self)
// update their config files, and we are backward compatible.
// These defaults should be the same
// 1) here
- // 2) in the 'default' attribute in loolwsd.xml, which is for documentation
+ // 2) in the 'default' attribute in coolwsd.xml, which is for documentation
// 3) the default parameter of getConfigValue() call. That is used when the
- // setting is present in loolwsd.xml, but empty (i.e. use the default).
+ // setting is present in coolwsd.xml, but empty (i.e. use the default).
static const std::map<std::string, std::string> DefAppConfig
= { { "allowed_languages", "de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru" },
{ "admin_console.enable_pam", "false" },
@@ -1042,7 +1042,7 @@ void LOOLWSD::innerInitialize(Application& self)
{ "logging.anonymize.usernames", "false" }, // Deprecated.
// { "logging.anonymize.anonymize_user_data", "false" }, // Do not set to fallback on filename/username.
{ "logging.color", "true" },
- { "logging.file.property[0]", "loolwsd.log" },
+ { "logging.file.property[0]", "coolwsd.log" },
{ "logging.file.property[0][@name]", "path" },
{ "logging.file.property[1]", "never" },
{ "logging.file.property[1][@name]", "rotation" },
@@ -1098,14 +1098,14 @@ void LOOLWSD::innerInitialize(Application& self)
{ "security.jwt_expiry_secs", "1800" },
{ "security.enable_metrics_unauthenticated", "false" },
{ "server_name", "" },
- { "ssl.ca_file_path", LOOLWSD_CONFIGDIR "/ca-chain.cert.pem" },
- { "ssl.cert_file_path", LOOLWSD_CONFIGDIR "/cert.pem" },
+ { "ssl.ca_file_path", COOLWSD_CONFIGDIR "/ca-chain.cert.pem" },
+ { "ssl.cert_file_path", COOLWSD_CONFIGDIR "/cert.pem" },
{ "ssl.enable", "true" },
{ "ssl.hpkp.max_age[@enable]", "true" },
{ "ssl.hpkp.report_uri[@enable]", "false" },
{ "ssl.hpkp[@enable]", "false" },
{ "ssl.hpkp[@report_only]", "false" },
- { "ssl.key_file_path", LOOLWSD_CONFIGDIR "/key.pem" },
+ { "ssl.key_file_path", COOLWSD_CONFIGDIR "/key.pem" },
{ "ssl.termination", "true" },
{ "storage.filesystem[@allow]", "false" },
// "storage.ssl.enable" - deliberately not set; for back-compat
@@ -1152,7 +1152,7 @@ void LOOLWSD::innerInitialize(Application& self)
// Load default configuration files, if present.
if (loadConfiguration(PRIO_DEFAULT) == 0)
{
- // Fallback to the LOOLWSD_CONFIGDIR or --config-file path.
+ // Fallback to the COOLWSD_CONFIGDIR or --config-file path.
loadConfiguration(ConfigFile, PRIO_DEFAULT);
}
@@ -1187,7 +1187,7 @@ void LOOLWSD::innerInitialize(Application& self)
MostVerboseLogLevelSettableFromClient = getConfigValue<std::string>(conf, "logging.most_verbose_level_settable_from_client", "notice");
LeastVerboseLogLevelSettableFromClient = getConfigValue<std::string>(conf, "logging.least_verbose_level_settable_from_client", "fatal");
- setenv("LOOL_LOGLEVEL", LogLevel.c_str(), true);
+ setenv("COOL_LOGLEVEL", LogLevel.c_str(), true);
#if !ENABLE_DEBUG
const std::string salLog = getConfigValue<std::string>(conf, "logging.lokit_sal_log", "-INFO-WARN");
@@ -1197,7 +1197,7 @@ void LOOLWSD::innerInitialize(Application& self)
const bool withColor = getConfigValue<bool>(conf, "logging.color", true) && isatty(fileno(stderr));
if (withColor)
{
- setenv("LOOL_LOGCOLOR", "1", true);
+ setenv("COOL_LOGCOLOR", "1", true);
}
const auto logToFile = getConfigValue<bool>(conf, "logging.file[@enable]", false);
@@ -1223,8 +1223,8 @@ void LOOLWSD::innerInitialize(Application& self)
const auto it = logProperties.find("path");
if (it != logProperties.end())
{
- setenv("LOOL_LOGFILE", "1", true);
- setenv("LOOL_LOGFILENAME", it->second.c_str(), true);
+ setenv("COOL_LOGFILE", "1", true);
+ setenv("COOL_LOGFILENAME", it->second.c_str(), true);
std::cerr << "\nLogging at " << LogLevel << " level to file: " << it->second.c_str()
<< std::endl;
}
@@ -1242,7 +1242,7 @@ void LOOLWSD::innerInitialize(Application& self)
if (EnableTraceEventLogging)
{
- const auto traceEventFile = getConfigValue<std::string>(conf, "trace_event.path", LOOLWSD_TRACEEVENTFILE);
+ const auto traceEventFile = getConfigValue<std::string>(conf, "trace_event.path", COOLWSD_TRACEEVENTFILE);
LOG_INF("Trace Event file is " << traceEventFile << ".");
TraceEventFile = fopen(traceEventFile.c_str(), "w");
if (TraceEventFile != NULL)
@@ -1265,10 +1265,10 @@ void LOOLWSD::innerInitialize(Application& self)
}
ServerName = config().getString("server_name");
- LOG_INF("Initializing loolwsd server [" << ServerName << "].");
+ LOG_INF("Initializing coolwsd server [" << ServerName << "].");
// Get anonymization settings.
-#if LOOLWSD_ANONYMIZE_USER_DATA
+#if COOLWSD_ANONYMIZE_USER_DATA
AnonymizeUserData = true;
LOG_INF("Anonymization of user-data is permanently enabled.");
#else
@@ -1307,11 +1307,11 @@ void LOOLWSD::innerInitialize(Application& self)
else
{
static const char failure[] = "Anonymization and trace-level logging are incompatible. "
- "Please reduce logging level to debug or lower in loolwsd.xml to prevent leaking sensitive user data.";
+ "Please reduce logging level to debug or lower in coolwsd.xml to prevent leaking sensitive user data.";
LOG_FTL(failure);
std::cerr << '\n' << failure << std::endl;
#if ENABLE_DEBUG
- std::cerr << "\nIf you have used 'make run', edit loolwsd.xml and make sure you have removed "
+ std::cerr << "\nIf you have used 'make run', edit coolwsd.xml and make sure you have removed "
"'--o:logging.level=trace' from the command line in Makefile.am.\n" << std::endl;
#endif
Log::shutdown();
@@ -1326,7 +1326,7 @@ void LOOLWSD::innerInitialize(Application& self)
// Get the salt, if set, otherwise default, and set as envar, so the kits inherit it.
anonymizationSalt = getConfigValue<std::uint64_t>(conf, "logging.anonymize.anonymization_salt", 82589933);
const std::string anonymizationSaltStr = std::to_string(anonymizationSalt);
- setenv("LOOL_ANONYMIZATION_SALT", anonymizationSaltStr.c_str(), true);
+ setenv("COOL_ANONYMIZATION_SALT", anonymizationSaltStr.c_str(), true);
}
FileUtil::setUrlAnonymization(AnonymizeUserData, anonymizationSalt);
@@ -1352,7 +1352,7 @@ void LOOLWSD::innerInitialize(Application& self)
LOG_WRN("Invalid listen address: " << listen << ". Falling back to default: 'any'" );
}
- // Prefix for the loolwsd pages; should not end with a '/'
+ // Prefix for the coolwsd pages; should not end with a '/'
ServiceRoot = getPathFromConfig("net.service_root");
while (ServiceRoot.length() > 0 && ServiceRoot[ServiceRoot.length() - 1] == '/')
ServiceRoot.pop_back();
@@ -1360,12 +1360,12 @@ void LOOLWSD::innerInitialize(Application& self)
IsProxyPrefixEnabled = getConfigValue<bool>(conf, "net.proxy_prefix", false);
#if ENABLE_SSL
- LOOLWSD::SSLEnabled.set(getConfigValue<bool>(conf, "ssl.enable", true));
- LOOLWSD::SSLTermination.set(getConfigValue<bool>(conf, "ssl.termination", true));
+ COOLWSD::SSLEnabled.set(getConfigValue<bool>(conf, "ssl.enable", true));
+ COOLWSD::SSLTermination.set(getConfigValue<bool>(conf, "ssl.termination", true));
#endif
- LOG_INF("SSL support: SSL is " << (LOOLWSD::isSSLEnabled() ? "enabled." : "disabled."));
- LOG_INF("SSL support: termination is " << (LOOLWSD::isSSLTermination() ? "enabled." : "disabled."));
+ LOG_INF("SSL support: SSL is " << (COOLWSD::isSSLEnabled() ? "enabled." : "disabled."));
+ LOG_INF("SSL support: termination is " << (COOLWSD::isSSLTermination() ? "enabled." : "disabled."));
std::string allowedLanguages(config().getString("allowed_languages"));
// Core <= 7.0.
@@ -1455,7 +1455,7 @@ void LOOLWSD::innerInitialize(Application& self)
// to avoid dealing with escaping and other traps.
std::ostringstream oss;
KitXmlConfig->save(oss);
- setenv("LOOL_CONFIG", oss.str().c_str(), true);
+ setenv("COOL_CONFIG", oss.str().c_str(), true);
// Initialize the config subsystem too.
config::initialize(&config());
@@ -1515,8 +1515,8 @@ void LOOLWSD::innerInitialize(Application& self)
setenv("SAL_DISABLE_OPENCL", "true", 1);
// Log the connection and document limits.
- LOOLWSD::MaxConnections = MAX_CONNECTIONS;
- LOOLWSD::MaxDocuments = MAX_DOCUMENTS;
+ COOLWSD::MaxConnections = MAX_CONNECTIONS;
+ COOLWSD::MaxDocuments = MAX_DOCUMENTS;
#if !MOBILEAPP
NoSeccomp = !getConfigValue<bool>(conf, "security.seccomp", true);
@@ -1531,7 +1531,7 @@ void LOOLWSD::innerInitialize(Application& self)
{
LOG_WRN("Support key not set, please use 'coolconfig set-support-key'.");
std::cerr << "Support key not set, please use 'coolconfig set-support-key'." << std::endl;
- LOOLWSD::OverrideWatermark = "Unsupported, the support key is missing.";
+ COOLWSD::OverrideWatermark = "Unsupported, the support key is missing.";
}
else
{
@@ -1541,7 +1541,7 @@ void LOOLWSD::innerInitialize(Application& self)
{
LOG_WRN("Invalid support key, please use 'coolconfig set-support-key'.");
std::cerr << "Invalid support key, please use 'coolconfig set-support-key'." << std::endl;
- LOOLWSD::OverrideWatermark = "Unsupported, the support key is invalid.";
+ COOLWSD::OverrideWatermark = "Unsupported, the support key is invalid.";
}
else
{
@@ -1550,29 +1550,29 @@ void LOOLWSD::innerInitialize(Application& self)
{
LOG_WRN("Your support key has expired, please ask for a new one, and use 'coolconfig set-support-key'.");
std::cerr << "Your support key has expired, please ask for a new one, and use 'coolconfig set-support-key'." << std::endl;
- LOOLWSD::OverrideWatermark = "Unsupported, the support key has expired.";
+ COOLWSD::OverrideWatermark = "Unsupported, the support key has expired.";
}
else
{
LOG_INF("Your support key is valid for " << validDays << " days");
- LOOLWSD::MaxConnections = 1000;
- LOOLWSD::MaxDocuments = 200;
- LOOLWSD::OverrideWatermark = "";
+ COOLWSD::MaxConnections = 1000;
+ COOLWSD::MaxDocuments = 200;
+ COOLWSD::OverrideWatermark = "";
}
}
}
#endif
- if (LOOLWSD::MaxConnections < 3)
+ if (COOLWSD::MaxConnections < 3)
{
LOG_ERR("MAX_CONNECTIONS must be at least 3");
- LOOLWSD::MaxConnections = 3;
+ COOLWSD::MaxConnections = 3;
}
- if (LOOLWSD::MaxDocuments > LOOLWSD::MaxConnections)
+ if (COOLWSD::MaxDocuments > COOLWSD::MaxConnections)
{
LOG_ERR("MAX_DOCUMENTS cannot be bigger than MAX_CONNECTIONS");
- LOOLWSD::MaxDocuments = LOOLWSD::MaxConnections;
+ COOLWSD::MaxDocuments = COOLWSD::MaxConnections;
}
struct rlimit rlim;
@@ -1582,10 +1582,10 @@ void LOOLWSD::innerInitialize(Application& self)
// a wakeup pipe with 2 fds. 32 fds (i.e. 8 documents) are reserved.
LOG_INF("Maximum number of open documents supported by the system: " << rlim.rlim_cur / 4 - 8);
- LOG_INF("Maximum concurrent open Documents limit: " << LOOLWSD::MaxDocuments);
- LOG_INF("Maximum concurrent client Connections limit: " << LOOLWSD::MaxConnections);
+ LOG_INF("Maximum concurrent open Documents limit: " << COOLWSD::MaxDocuments);
+ LOG_INF("Maximum concurrent client Connections limit: " << COOLWSD::MaxConnections);
- LOOLWSD::NumConnections = 0;
+ COOLWSD::NumConnections = 0;
// Command Tracing.
if (getConfigValue<bool>(conf, "trace[@enable]", false))
@@ -1623,7 +1623,7 @@ void LOOLWSD::innerInitialize(Application& self)
PrisonerPoll = Util::make_unique<PrisonPoll>();
- Server = Util::make_unique<LOOLWSDServer>();
+ Server = Util::make_unique<COOLWSDServer>();
LOG_TRC("Initialize StorageBase");
StorageBase::initialize();
@@ -1651,19 +1651,19 @@ void LOOLWSD::innerInitialize(Application& self)
#if ENABLE_DEBUG
std::string postMessageURI =
getServiceURI("/browser/dist/framed.doc.html?file_path="
- DEBUG_ABSSRCDIR "/" LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC);
+ DEBUG_ABSSRCDIR "/" COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC);
std::cerr << "\nLaunch one of these in your browser:\n\n"
- << " Writer: " << getLaunchURI(LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_WRITER) << '\n'
- << " Calc: " << getLaunchURI(LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC) << '\n'
- << " Impress: " << getLaunchURI(LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_IMPRESS) << '\n'
- << " Draw: " << getLaunchURI(LOOLWSD_TEST_DOCUMENT_RELATIVE_PATH_DRAW) << '\n'
+ << " Writer: " << getLaunchURI(COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_WRITER) << '\n'
+ << " Calc: " << getLaunchURI(COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_CALC) << '\n'
+ << " Impress: " << getLaunchURI(COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_IMPRESS) << '\n'
+ << " Draw: " << getLaunchURI(COOLWSD_TEST_DOCUMENT_RELATIVE_PATH_DRAW) << '\n'
<< " postMessage: " << postMessageURI << std::endl;
- const std::string adminURI = getServiceURI(LOOLWSD_TEST_ADMIN_CONSOLE, true);
+ const std::string adminURI = getServiceURI(COOLWSD_TEST_ADMIN_CONSOLE, true);
if (!adminURI.empty())
std::cerr << "\nOr for the admin, monitoring, capabilities & discovery:\n\n"
<< adminURI << '\n'
- << getServiceURI(LOOLWSD_TEST_METRICS, true) << '\n'
+ << getServiceURI(COOLWSD_TEST_METRICS, true) << '\n'
<< getServiceURI("/hosting/capabilities") << '\n'
<< getServiceURI("/hosting/discovery") << '\n';
@@ -1673,10 +1673,10 @@ void LOOLWSD::innerInitialize(Application& self)
#endif
}
-void LOOLWSD::initializeSSL()
+void COOLWSD::initializeSSL()
{
#if ENABLE_SSL
- if (!LOOLWSD::isSSLEnabled())
+ if (!COOLWSD::isSSLEnabled())
return;
const std::string ssl_cert_file_path = getPathFromConfig("ssl.cert_file_path");
@@ -1706,7 +1706,7 @@ void LOOLWSD::initializeSSL()
#endif
}
-void LOOLWSD::dumpNewSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri, const std::string& path)
+void COOLWSD::dumpNewSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri, const std::string& path)
{
if (TraceDumper)
{
@@ -1721,7 +1721,7 @@ void LOOLWSD::dumpNewSessionTrace(const std::string& id, const std::string& sess
}
}
-void LOOLWSD::dumpEndSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri)
+void COOLWSD::dumpEndSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri)
{
if (TraceDumper)
{
@@ -1736,7 +1736,7 @@ void LOOLWSD::dumpEndSessionTrace(const std::string& id, const std::string& sess
}
}
-void LOOLWSD::dumpEventTrace(const std::string& id, const std::string& sessionId, const std::string& data)
+void COOLWSD::dumpEventTrace(const std::string& id, const std::string& sessionId, const std::string& data)
{
if (TraceDumper)
{
@@ -1744,7 +1744,7 @@ void LOOLWSD::dumpEventTrace(const std::string& id, const std::string& sessionId
}
}
-void LOOLWSD::dumpIncomingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
+void COOLWSD::dumpIncomingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
{
if (TraceDumper)
{
@@ -1752,7 +1752,7 @@ void LOOLWSD::dumpIncomingTrace(const std::string& id, const std::string& sessio
}
}
-void LOOLWSD::dumpOutgoingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
+void COOLWSD::dumpOutgoingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
{
if (TraceDumper)
{
@@ -1760,7 +1760,7 @@ void LOOLWSD::dumpOutgoingTrace(const std::string& id, const std::string& sessio
}
}
-void LOOLWSD::defineOptions(OptionSet& optionSet)
+void COOLWSD::defineOptions(OptionSet& optionSet)
{
#if !MOBILEAPP
ServerApplication::defineOptions(optionSet);
@@ -1791,7 +1791,7 @@ void LOOLWSD::defineOptions(OptionSet& optionSet)
.required(false)
.repeatable(false));
- optionSet.addOption(Option("disable-cool-user-checking", "", "Don't check whether loolwsd is running under the user 'cool'. NOTE: This is insecure, use only when you know what you are doing!")
+ optionSet.addOption(Option("disable-cool-user-checking", "", "Don't check whether coolwsd is running under the user 'cool'. NOTE: This is insecure, use only when you know what you are doing!")
.required(false)
.repeatable(false));
@@ -1843,7 +1843,7 @@ void LOOLWSD::defineOptions(OptionSet& optionSet)
#endif
}
-void LOOLWSD::handleOption(const std::string& optionName,
+void COOLWSD::handleOption(const std::string& optionName,
const std::string& value)
{
#if !MOBILEAPP
@@ -1870,12 +1870,12 @@ void LOOLWSD::handleOption(const std::string& optionName,
else if (optionName == "disable-ssl")
_overrideSettings["ssl.enable"] = "false";
else if (optionName == "disable-cool-user-checking")
- CheckLoolUser = false;
+ CheckCoolUser = false;
else if (optionName == "override")
{
std::string optName;
std::string optValue;
- LOOLProtocol::parseNameValuePair(value, optName, optValue);
+ COOLProtocol::parseNameValuePair(value, optName, optValue);
_overrideSettings[optName] = optValue;
}
else if (optionName == "config-file")
@@ -1895,7 +1895,7 @@ void LOOLWSD::handleOption(const std::string& optionName,
NumPreSpawnedChildren = 1;
}
- static const char* latencyMs = std::getenv("LOOL_DELAY_SOCKET_MS");
+ static const char* latencyMs = std::getenv("COOL_DELAY_SOCKET_MS");
if (latencyMs)
SimulatedLatencyMs = std::stoi(latencyMs);
#endif
@@ -1911,7 +1911,7 @@ void LOOLWSD::handleOption(const std::string& optionName,
#if !MOBILEAPP
-void LOOLWSD::displayHelp()
+void COOLWSD::displayHelp()
{
HelpFormatter helpFormatter(options());
helpFormatter.setCommand(commandName());
@@ -1920,7 +1920,7 @@ void LOOLWSD::displayHelp()
helpFormatter.format(std::cout);
}
-bool LOOLWSD::checkAndRestoreForKit()
+bool COOLWSD::checkAndRestoreForKit()
{
#ifdef KIT_IN_PROCESS
return false;
@@ -2022,7 +2022,7 @@ bool LOOLWSD::checkAndRestoreForKit()
#endif
-void LOOLWSD::doHousekeeping()
+void COOLWSD::doHousekeeping()
{
if (PrisonerPoll)
{
@@ -2030,7 +2030,7 @@ void LOOLWSD::doHousekeeping()
}
}
-void LOOLWSD::closeDocument(const std::string& docKey, const std::string& message)
+void COOLWSD::closeDocument(const std::string& docKey, const std::string& message)
{
std::unique_lock<std::mutex> docBrokersLock(DocBrokersMutex);
auto docBrokerIt = DocBrokers.find(docKey);
@@ -2043,7 +2043,7 @@ void LOOLWSD::closeDocument(const std::string& docKey, const std::string& messag
}
}
-void LOOLWSD::autoSave(const std::string& docKey)
+void COOLWSD::autoSave(const std::string& docKey)
{
std::unique_lock<std::mutex> docBrokersLock(DocBrokersMutex);
auto docBrokerIt = DocBrokers.find(docKey);
@@ -2056,7 +2056,7 @@ void LOOLWSD::autoSave(const std::string& docKey)
}
}
-void LOOLWSD::setLogLevelsOfKits(const std::string& level)
+void COOLWSD::setLogLevelsOfKits(const std::string& level)
{
std::lock_guard<std::mutex> docBrokersLock(DocBrokersMutex);
@@ -2079,7 +2079,7 @@ void PrisonPoll::wakeupHook()
" new children and " << DocBrokers.size() << " brokers and " <<
OutstandingForks << " kits forking");
- if (!LOOLWSD::checkAndRestoreForKit())
+ if (!COOLWSD::checkAndRestoreForKit())
{
// No children have died.
// Make sure we have sufficient reserves.
@@ -2087,7 +2087,7 @@ void PrisonPoll::wakeupHook()
{
// Nothing more to do this round, unless we are fuzzing
#if FUZZER
- if (!LOOLWSD::FuzzFileName.empty())
+ if (!COOLWSD::FuzzFileName.empty())
{
StressSocketHandler::replaySync(
#if ENABLE_SSL
@@ -2096,7 +2096,7 @@ void PrisonPoll::wakeupHook()
"ws://127.0.0.1:" + std::to_string(ClientPortNumber),
#endif
"" /* FIXME: what local path are these traces replayed into ? */,
- LOOLWSD::FuzzFileName);
+ COOLWSD::FuzzFileName);
LOG_INF("Setting TerminationFlag");
SigUtil::setTerminationFlag();
@@ -2112,7 +2112,7 @@ void PrisonPoll::wakeupHook()
#if !MOBILEAPP
-bool LOOLWSD::createForKit()
+bool COOLWSD::createForKit()
{
#if defined KIT_IN_PROCESS
return true;
@@ -2173,7 +2173,7 @@ bool LOOLWSD::createForKit()
args.push_back("--ui=" + UserInterface);
- if (!CheckLoolUser)
+ if (!CheckCoolUser)
args.push_back("--disable-cool-user-checking");
#if ENABLE_DEBUG
@@ -2216,7 +2216,7 @@ bool LOOLWSD::createForKit()
// Init the Admin manager
Admin::instance().setForKitPid(ForKitProcId);
- const int balance = LOOLWSD::NumPreSpawnedChildren - OutstandingForks;
+ const int balance = COOLWSD::NumPreSpawnedChildren - OutstandingForks;
if (balance > 0)
rebalanceChildren(balance);
@@ -2224,7 +2224,7 @@ bool LOOLWSD::createForKit()
#endif
}
-void LOOLWSD::sendMessageToForKit(const std::string& message)
+void COOLWSD::sendMessageToForKit(const std::string& message)
{
if (PrisonerPoll)
{
@@ -2248,7 +2248,7 @@ static std::shared_ptr<DocumentBroker>
unsigned mobileAppDocId = 0)
{
LOG_INF("Find or create DocBroker for docKey [" << docKey <<
- "] for session [" << id << "] on url [" << LOOLWSD::anonymizeUrl(uriPublic.toString()) << "].");
+ "] for session [" << id << "] on url [" << COOLWSD::anonymizeUrl(uriPublic.toString()) << "].");
std::unique_lock<std::mutex> docBrokersLock(DocBrokersMutex);
@@ -2306,9 +2306,9 @@ static std::shared_ptr<DocumentBroker>
{
Util::assertIsLocked(DocBrokersMutex);
- if (DocBrokers.size() + 1 > LOOLWSD::MaxDocuments)
+ if (DocBrokers.size() + 1 > COOLWSD::MaxDocuments)
{
- LOG_INF("Maximum number of open documents of " << LOOLWSD::MaxDocuments << " reached.");
+ LOG_INF("Maximum number of open documents of " << COOLWSD::MaxDocuments << " reached.");
#if ENABLE_SUPPORT_KEY
shutdownLimitReached(proto);
return nullptr;
@@ -2403,19 +2403,19 @@ private:
if (!socket->parseHeader("Prisoner", message, request))
return;
- LOG_TRC("Child connection with URI [" << LOOLWSD::anonymizeUrl(request.getURI()) << "].");
+ LOG_TRC("Child connection with URI [" << COOLWSD::anonymizeUrl(request.getURI()) << "].");
Poco::URI requestURI(request.getURI());
#ifndef KIT_IN_PROCESS
if (requestURI.getPath() == FORKIT_URI)
{
- if (socket->getPid() != LOOLWSD::ForKitProcId)
+ if (socket->getPid() != COOLWSD::ForKitProcId)
{
LOG_WRN("Connection request received on " << FORKIT_URI << " endpoint from unexpected ForKit process. Skipped.");
return;
}
- LOOLWSD::ForKitProc = std::make_shared<ForKitProcess>(LOOLWSD::ForKitProcId, socket, request);
+ COOLWSD::ForKitProc = std::make_shared<ForKitProcess>(COOLWSD::ForKitProcId, socket, request);
socket->getInBuffer().clear();
- PrisonerPoll->setForKitProcess(LOOLWSD::ForKitProc);
+ PrisonerPoll->setForKitProcess(COOLWSD::ForKitProc);
return;
}
#endif
@@ -2435,18 +2435,18 @@ private:
jailId = param.second;
else if (param.first == "version")
- LOOLWSD::LOKitVersion = param.second;
+ COOLWSD::LOKitVersion = param.second;
}
if (pid <= 0)
{
- LOG_ERR("Invalid PID in child URI [" << LOOLWSD::anonymizeUrl(request.getURI()) << "].");
+ LOG_ERR("Invalid PID in child URI [" << COOLWSD::anonymizeUrl(request.getURI()) << "].");
return;
}
if (jailId.empty())
{
- LOG_ERR("Invalid JailId in child URI [" << LOOLWSD::anonymizeUrl(request.getURI()) << "].");
+ LOG_ERR("Invalid JailId in child URI [" << COOLWSD::anonymizeUrl(request.getURI()) << "].");
return;
}
@@ -2640,7 +2640,7 @@ private:
/// Set the socket associated with this ResponseClient.
void onConnect(const std::shared_ptr<StreamSocket>& socket) override
{
- _id = LOOLWSD::GetConnectionId();
+ _id = COOLWSD::GetConnectionId();
_socket = socket;
LOG_TRC('#' << socket->getFD() << " Connected to ClientRequestDispatcher.");
}
@@ -2656,7 +2656,7 @@ private:
}
#if !MOBILEAPP
- if (!LOOLWSD::isSSLEnabled() && socket->sniffSSL())
+ if (!COOLWSD::isSSLEnabled() && socket->sniffSSL())
{
LOG_ERR("Looks like SSL/TLS traffic on plain http port");
HttpHelper::sendErrorAndShutdown(400, socket);
@@ -2693,13 +2693,13 @@ private:
message.seekg(startmessage.tellg(), std::ios::beg);
// re-write ServiceRoot and cache.
- RequestDetails requestDetails(request, LOOLWSD::ServiceRoot);
+ RequestDetails requestDetails(request, COOLWSD::ServiceRoot);
// LOG_TRC("Request details " << requestDetails.toString());
// Config & security ...
if (requestDetails.isProxy())
{
- if (!LOOLWSD::IsProxyPrefixEnabled)
+ if (!COOLWSD::IsProxyPrefixEnabled)
throw BadRequestException("ProxyPrefix present but net.proxy_prefix is not enabled");
else if (!socket->isLocal())
throw BadRequestException("ProxyPrefix request from non-local socket");
@@ -2736,13 +2736,13 @@ private:
// See metrics.txt
std::shared_ptr<Poco::Net::HTTPResponse> response(new Poco::Net::HTTPResponse());
- if (!LOOLWSD::AdminEnabled)
+ if (!COOLWSD::AdminEnabled)
throw Poco::FileAccessDeniedException("Admin console disabled");
try
{
/* WARNING: security point, we may skip authentication */
- bool skipAuthentication = LOOLWSD::getConfigValue<bool>("security.enable_metrics_unauthenticated", false);
+ bool skipAuthentication = COOLWSD::getConfigValue<bool>("security.enable_metrics_unauthenticated", false);
if (!skipAuthentication)
if (!FileServerRequestHandler::isAdminLoggedIn(request, *response))
throw Poco::Net::NotAuthenticatedException("Invalid admin login");
@@ -2821,7 +2821,7 @@ private:
catch (const std::exception& exc)
{
LOG_ERR('#' << socket->getFD() << " Exception while processing incoming request: [" <<
- LOOLProtocol::getAbbreviatedMessage(socket->getInBuffer()) << "]: " << exc.what());
+ COOLProtocol::getAbbreviatedMessage(socket->getInBuffer()) << "]: " << exc.what());
// Bad request.
// NOTE: Check _wsState to choose between HTTP response or WebSocket (app-level) error.
@@ -2911,7 +2911,7 @@ private:
std::string mimeType = "image/vnd.microsoft.icon";
std::string faviconPath = Path(Application::instance().commandPath()).parent().toString() + "favicon.ico";
if (!File(faviconPath).exists())
- faviconPath = LOOLWSD::FileServerRoot + "/favicon.ico";
+ faviconPath = COOLWSD::FileServerRoot + "/favicon.ico";
HttpHelper::sendFileAndShutdown(socket, faviconPath, mimeType);
}
@@ -2926,12 +2926,12 @@ private:
std::string xml = getFileContent("discovery.xml");
std::string srvUrl =
#if ENABLE_SSL
- ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()) ? "https://" : "http://")
+ ((COOLWSD::isSSLEnabled() || COOLWSD::isSSLTermination()) ? "https://" : "http://")
#else
"http://"
#endif
- + (LOOLWSD::ServerName.empty() ? requestDetails.getHostUntrusted() : LOOLWSD::ServerName)
- + LOOLWSD::ServiceRoot;
+ + (COOLWSD::ServerName.empty() ? requestDetails.getHostUntrusted() : COOLWSD::ServerName)
+ + COOLWSD::ServiceRoot;
if (requestDetails.isProxy())
srvUrl = requestDetails.getProxyPrefix();
Poco::replaceInPlace(xml, std::string("%SRV_URI%"), srvUrl);
@@ -3250,7 +3250,7 @@ private:
{
assert(socket && "Must have a valid socket");
- LOG_INF("Post request: [" << LOOLWSD::anonymizeUrl(requestDetails.getURI()) << ']');
+ LOG_INF("Post request: [" << COOLWSD::anonymizeUrl(requestDetails.getURI()) << ']');
if (requestDetails.equals(1, "convert-to"))
{
@@ -3340,7 +3340,7 @@ private:
// protect against attempts to inject something funny here
if (formChildid.find('/') == std::string::npos && formName.find('/') == std::string::npos)
{
- const std::string dirPath = LOOLWSD::ChildRoot + formChildid
+ const std::string dirPath = COOLWSD::ChildRoot + formChildid
+ JAILED_DOCUMENT_ROOT + "insertfile";
const std::string fileName = dirPath + '/' + form.get("name");
LOG_INF("Perform insertfile: " << formChildid << ", " << formName << ", filename: " << fileName);
@@ -3390,8 +3390,8 @@ private:
std::string decoded;
Poco::URI::decode(url, decoded);
- const Path filePath(LOOLWSD::ChildRoot + jailId + JAILED_DOCUMENT_ROOT + decoded);
- const std::string filePathAnonym = LOOLWSD::anonymizeUrl(filePath.toString());
+ const Path filePath(COOLWSD::ChildRoot + jailId + JAILED_DOCUMENT_ROOT + decoded);
+ const std::string filePathAnonym = COOLWSD::anonymizeUrl(filePath.toString());
if (foundDownloadId && filePath.isAbsolute() && File(filePath).exists())
{
@@ -3498,7 +3498,7 @@ private:
const std::string fileId = Util::getFilenameFromURL(docKey);
Util::mapAnonymized(fileId, fileId); // Identity mapping, since fileId is already obfuscated
- LOG_INF("Starting Proxy request handler for session [" << _id << "] on url [" << LOOLWSD::anonymizeUrl(url) << "].");
+ LOG_INF("Starting Proxy request handler for session [" << _id << "] on url [" << COOLWSD::anonymizeUrl(url) << "].");
// Check if readonly session is required
bool isReadOnly = false;
@@ -3511,7 +3511,7 @@ private:
}
}
- LOG_INF("URL [" << LOOLWSD::anonymizeUrl(url) << "] is " << (isReadOnly ? "readonly" : "writable") << '.');
+ LOG_INF("URL [" << COOLWSD::anonymizeUrl(url) << "] is " << (isReadOnly ? "readonly" : "writable") << '.');
(void)request; (void)message; (void)disposition;
std::shared_ptr<ProtocolHandlerInterface> none;
@@ -3582,9 +3582,9 @@ private:
// Response to clients beyond this point is done via WebSocket.
try
{
- if (LOOLWSD::NumConnections >= LOOLWSD::MaxConnections)
+ if (COOLWSD::NumConnections >= COOLWSD::MaxConnections)
{
- LOG_INF("Limit on maximum number of connections of " << LOOLWSD::MaxConnections << " reached.");
+ LOG_INF("Limit on maximum number of connections of " << COOLWSD::MaxConnections << " reached.");
#if ENABLE_SUPPORT_KEY
shutdownLimitReached(ws);
return;
@@ -3597,14 +3597,14 @@ private:
const std::string fileId = Util::getFilenameFromURL(docKey);
Util::mapAnonymized(fileId, fileId); // Identity mapping, since fileId is already obfuscated
- LOG_INF("Starting GET request handler for session [" << _id << "] on url [" << LOOLWSD::anonymizeUrl(url) << "].");
+ LOG_INF("Starting GET request handler for session [" << _id << "] on url [" << COOLWSD::anonymizeUrl(url) << "].");
// Indicate to the client that document broker is searching.
static const std::string status("statusindicator: find");
LOG_TRC("Sending to Client [" << status << "].");
ws->sendMessage(status);
- LOG_INF("Sanitized URI [" << LOOLWSD::anonymizeUrl(url) << "] to [" << LOOLWSD::anonymizeUrl(uriPublic.toString()) <<
+ LOG_INF("Sanitized URI [" << COOLWSD::anonymizeUrl(url) << "] to [" << COOLWSD::anonymizeUrl(uriPublic.toString()) <<
"] and mapped to docKey [" << docKey << "] for session [" << _id << "].");
// Check if readonly session is required
@@ -3618,7 +3618,7 @@ private:
}
}
- LOG_INF("URL [" << LOOLWSD::anonymizeUrl(url) << "] is " << (isReadOnly ? "readonly" : "writable") << '.');
+ LOG_INF("URL [" << COOLWSD::anonymizeUrl(url) << "] is " << (isReadOnly ? "readonly" : "writable") << '.');
// Request a kit process for this doc.
std::shared_ptr<DocumentBroker> docBroker = findOrCreateDocBroker(
@@ -3646,10 +3646,10 @@ private:
// Add and load the session.
docBroker->addSession(clientSession);
- LOOLWSD::checkDiskSpaceAndWarnClients(true);
+ COOLWSD::checkDiskSpaceAndWarnClients(true);
// Users of development versions get just an info
// when reaching max documents or connections
- LOOLWSD::checkSessionLimitsAndWarnClients();
+ COOLWSD::checkSessionLimitsAndWarnClients();
sendLoadResult(clientSession, true, "");
}
@@ -3728,7 +3728,7 @@ private:
if (!File(discoveryPath).exists())
{
// http://server/hosting/discovery.xml
- discoveryPath = LOOLWSD::FileServerRoot + "/discovery.xml";
+ discoveryPath = COOLWSD::FileServerRoot + "/discovery.xml";
}
const std::string action = "action";
@@ -3736,7 +3736,7 @@ private:
const std::string urlsrc = "urlsrc";
const std::string rootUriValue = "%SRV_URI%";
- const std::string uriBaseValue = rootUriValue + "/browser/" LOOLWSD_VERSION_HASH "/";
+ const std::string uriBaseValue = rootUriValue + "/browser/" COOLWSD_VERSION_HASH "/";
const std::string uriValue = uriBaseValue + "cool.html?";
InputSource inputSrc(discoveryPath);
@@ -3759,10 +3759,10 @@ private:
// Set the View extensions cache as well.
if (elem->getAttribute("name") == "edit")
- LOOLWSD::EditFileExtensions.insert(elem->getAttribute("ext"));
+ COOLWSD::EditFileExtensions.insert(elem->getAttribute("ext"));
else if (elem->getAttribute("name") == "view_comment")
{
- LOOLWSD::ViewWithCommentsFileExtensions.insert(elem->getAttribute("ext"));
+ COOLWSD::ViewWithCommentsFileExtensions.insert(elem->getAttribute("ext"));
}
}
@@ -3833,7 +3833,7 @@ private:
capabilities->set("productVersionHash", hash);
// Set that this is a proxy.php-enabled instance
- capabilities->set("hasProxyPrefix", LOOLWSD::IsProxyPrefixEnabled);
+ capabilities->set("hasProxyPrefix", COOLWSD::IsProxyPrefixEnabled);
std::ostringstream ostrJSON;
capabilities->stringify(ostrJSON);
@@ -3898,19 +3898,19 @@ class PrisonerSocketFactory final : public SocketFactory
///
/// Waits for the connections from the cools, and creates the
/// websockethandlers accordingly.
-class LOOLWSDServer
+class COOLWSDServer
{
- LOOLWSDServer(LOOLWSDServer&& other) = delete;
- const LOOLWSDServer& operator=(LOOLWSDServer&& other) = delete;
+ COOLWSDServer(COOLWSDServer&& other) = delete;
+ const COOLWSDServer& operator=(COOLWSDServer&& other) = delete;
// allocate port & hold temporarily.
std::shared_ptr<ServerSocket> _serverSocket;
public:
- LOOLWSDServer() :
+ COOLWSDServer() :
_acceptPoll("accept_poll")
{
}
- ~LOOLWSDServer()
+ ~COOLWSDServer()
{
stop();
}
@@ -3937,7 +3937,7 @@ public:
_acceptPoll.insertNewSocket(_serverSocket);
#if MOBILEAPP
- loolwsd_server_socket_fd = _serverSocket->getFD();
+ coolwsd_server_socket_fd = _serverSocket->getFD();
#endif
_serverSocket.reset();
@@ -3964,45 +3964,45 @@ public:
std::string version, hash;
Util::getVersionInfo(version, hash);
- os << "LOOLWSDServer: " << version << " - " << hash
+ os << "COOLWSDServer: " << version << " - " << hash
#if !MOBILEAPP
- << "\n Kit version: " << LOOLWSD::LOKitVersion
+ << "\n Kit version: " << COOLWSD::LOKitVersion
<< "\n Ports: server " << ClientPortNumber << " prisoner " << MasterLocation
- << "\n SSL: " << (LOOLWSD::isSSLEnabled() ? "https" : "http")
- << "\n SSL-Termination: " << (LOOLWSD::isSSLTermination() ? "yes" : "no")
- << "\n Security " << (LOOLWSD::NoCapsForKit ? "no" : "") << " chroot, "
- << (LOOLWSD::NoSeccomp ? "no" : "") << " api lockdown"
- << "\n Admin: " << (LOOLWSD::AdminEnabled ? "enabled" : "disabled")
+ << "\n SSL: " << (COOLWSD::isSSLEnabled() ? "https" : "http")
+ << "\n SSL-Termination: " << (COOLWSD::isSSLTermination() ? "yes" : "no")
+ << "\n Security " << (COOLWSD::NoCapsForKit ? "no" : "") << " chroot, "
+ << (COOLWSD::NoSeccomp ? "no" : "") << " api lockdown"
+ << "\n Admin: " << (COOLWSD::AdminEnabled ? "enabled" : "disabled")
#endif
<< "\n TerminationFlag: " << SigUtil::getTerminationFlag()
<< "\n isShuttingDown: " << SigUtil::getShutdownRequestFlag()
<< "\n NewChildren: " << NewChildren.size()
<< "\n OutstandingForks: " << OutstandingForks
- << "\n NumPreSpawnedChildren: " << LOOLWSD::NumPreSpawnedChildren
+ << "\n NumPreSpawnedChildren: " << COOLWSD::NumPreSpawnedChildren
<< "\n ChildSpawnTimeoutMs: " << ChildSpawnTimeoutMs
<< "\n Document Brokers: " << DocBrokers.size()
#if !MOBILEAPP
<< "\n of which ConvertTo: " << ConvertToBroker::getInstanceCount()
#endif
- << "\n vs. MaxDocuments: " << LOOLWSD::MaxDocuments
- << "\n NumConnections: " << LOOLWSD::NumConnections
- << "\n vs. MaxConnections: " << LOOLWSD::MaxConnections
- << "\n SysTemplate: " << LOOLWSD::SysTemplate
- << "\n LoTemplate: " << LOOLWSD::LoTemplate
- << "\n ChildRoot: " << LOOLWSD::ChildRoot
- << "\n FileServerRoot: " << LOOLWSD::FileServerRoot
- << "\n WelcomeFilesRoot: " << LOOLWSD::WelcomeFilesRoot
- << "\n ServiceRoot: " << LOOLWSD::ServiceRoot
- << "\n LOKitVersion: " << LOOLWSD::LOKitVersion
+ << "\n vs. MaxDocuments: " << COOLWSD::MaxDocuments
+ << "\n NumConnections: " << COOLWSD::NumConnections
+ << "\n vs. MaxConnections: " << COOLWSD::MaxConnections
+ << "\n SysTemplate: " << COOLWSD::SysTemplate
+ << "\n LoTemplate: " << COOLWSD::LoTemplate
+ << "\n ChildRoot: " << COOLWSD::ChildRoot
+ << "\n FileServerRoot: " << COOLWSD::FileServerRoot
+ << "\n WelcomeFilesRoot: " << COOLWSD::WelcomeFilesRoot
+ << "\n ServiceRoot: " << COOLWSD::ServiceRoot
+ << "\n LOKitVersion: " << COOLWSD::LOKitVersion
<< "\n HostIdentifier: " << Util::getProcessIdentifier()
- << "\n ConfigFile: " << LOOLWSD::ConfigFile
- << "\n ConfigDir: " << LOOLWSD::ConfigDir
- << "\n LogLevel: " << LOOLWSD::LogLevel
- << "\n AnonymizeUserData: " << (LOOLWSD::AnonymizeUserData ? "yes" : "no")
- << "\n CheckLoolUser: " << (LOOLWSD::CheckLoolUser ? "yes" : "no")
- << "\n IsProxyPrefixEnabled: " << (LOOLWSD::IsProxyPrefixEnabled ? "yes" : "no")
- << "\n OverrideWatermark: " << LOOLWSD::OverrideWatermark
- << "\n UserInterface: " << LOOLWSD::UserInterface
+ << "\n ConfigFile: " << COOLWSD::ConfigFile
+ << "\n ConfigDir: " << COOLWSD::ConfigDir
+ << "\n LogLevel: " << COOLWSD::LogLevel
+ << "\n AnonymizeUserData: " << (COOLWSD::AnonymizeUserData ? "yes" : "no")
+ << "\n CheckCoolUser: " << (COOLWSD::CheckCoolUser ? "yes" : "no")
+ << "\n IsProxyPrefixEnabled: " << (COOLWSD::IsProxyPrefixEnabled ? "yes" : "no")
+ << "\n OverrideWatermark: " << COOLWSD::OverrideWatermark
+ << "\n UserInterface: " << COOLWSD::UserInterface
;
os << "\nServer poll:\n";
@@ -4080,8 +4080,8 @@ private:
= ServerSocket::create(ServerSocket::Type::Public, DEFAULT_MASTER_PORT_NUMBER,
ClientPortProto, *PrisonerPoll, factory);
- LOOLWSD::prisonerServerSocketFD = socket->getFD();
- LOG_INF("Listening to prisoner connections on #" << LOOLWSD::prisonerServerSocketFD);
+ COOLWSD::prisonerServerSocketFD = socket->getFD();
+ LOG_INF("Listening to prisoner connections on #" << COOLWSD::prisonerServerSocketFD);
#endif
return socket;
}
@@ -4092,7 +4092,7 @@ private:
std::shared_ptr<SocketFactory> factory;
#if ENABLE_SSL
- if (LOOLWSD::isSSLEnabled())
+ if (COOLWSD::isSSLEnabled())
factory = std::make_shared<SslSocketFactory>();
else
#endif
@@ -4135,18 +4135,18 @@ private:
#if !MOBILEAPP
#if ENABLE_DEBUG
-std::string LOOLWSD::getServerURL()
+std::string COOLWSD::getServerURL()
{
- return getServiceURI(LOOLWSD_TEST_COOL_UI);
+ return getServiceURI(COOLWSD_TEST_COOL_UI);
}
#endif
#endif
-int LOOLWSD::innerMain()
+int COOLWSD::innerMain()
{
#if !defined FUZZER && !MOBILEAPP
SigUtil::setUserSignals();
- SigUtil::setFatalSignals("wsd " LOOLWSD_VERSION " " LOOLWSD_VERSION_HASH);
+ SigUtil::setFatalSignals("wsd " COOLWSD_VERSION " " COOLWSD_VERSION_HASH);
SigUtil::setTerminationSignals();
#endif
@@ -4158,7 +4158,7 @@ int LOOLWSD::innerMain()
std::string version, hash;
Util::getVersionInfo(version, hash);
- LOG_INF("Loolwsd version details: " << version << " - " << hash << " - id " << Util::getProcessIdentifier() << " - on " << Util::getLinuxVersion());
+ LOG_INF("Coolwsd version details: " << version << " - " << hash << " - id " << Util::getProcessIdentifier() << " - on " << Util::getLinuxVersion());
#endif
initializeSSL();
@@ -4185,7 +4185,7 @@ int LOOLWSD::innerMain()
#endif
#if !MOBILEAPP
- // We use the same option set for both parent and child loolwsd,
+ // We use the same option set for both parent and child coolwsd,
// so must check options required in the parent (but not in the
// child) separately now. Also check for options that are
// meaningless for the parent.
@@ -4207,7 +4207,7 @@ int LOOLWSD::innerMain()
ClientRequestDispatcher::InitStaticFileContentCache();
// Allocate our port - passed to prisoners.
- assert(Server && "No LOOLWSD::Server instance exists.");
+ assert(Server && "No COOLWSD::Server instance exists.");
Server->findClientPort();
// Start the internal prisoner server and spawn forkit,
@@ -4231,7 +4231,7 @@ int LOOLWSD::innerMain()
}
else
{
- int retry = (LOOLWSD::NoCapsForKit ? 150 : 50);
+ int retry = (COOLWSD::NoCapsForKit ? 150 : 50);
const auto timeout = std::chrono::milliseconds(ChildSpawnTimeoutMs);
while (retry-- > 0 && !SigUtil::getShutdownRequestFlag())
{
@@ -4462,7 +4462,7 @@ int LOOLWSD::innerMain()
return EX_OK;
}
-void LOOLWSD::cleanup()
+void COOLWSD::cleanup()
{
try
{
@@ -4480,7 +4480,7 @@ void LOOLWSD::cleanup()
#if ENABLE_SSL
// Finally, we no longer need SSL.
- if (LOOLWSD::isSSLEnabled())
+ if (COOLWSD::isSSLEnabled())
{
Poco::Net::uninitializeSSL();
Poco::Crypto::uninitializeCrypto();
@@ -4505,7 +4505,7 @@ void LOOLWSD::cleanup()
}
}
-int LOOLWSD::main(const std::vector<std::string>& /*args*/)
+int COOLWSD::main(const std::vector<std::string>& /*args*/)
{
#if MOBILEAPP && !defined IOS
SigUtil::resetTerminationFlag();
@@ -4530,13 +4530,13 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
UnitWSD::get().returnValue(returnValue);
- LOG_INF("Process [loolwsd] finished with exit status: " << returnValue);
+ LOG_INF("Process [coolwsd] finished with exit status: " << returnValue);
return returnValue;
}
#if !MOBILEAPP
-std::vector<std::shared_ptr<DocumentBroker>> LOOLWSD::getBrokersTestOnly()
+std::vector<std::shared_ptr<DocumentBroker>> COOLWSD::getBrokersTestOnly()
{
std::lock_guard<std::mutex> docBrokersLock(DocBrokersMutex);
std::vector<std::shared_ptr<DocumentBroker>> result;
@@ -4547,12 +4547,12 @@ std::vector<std::shared_ptr<DocumentBroker>> LOOLWSD::getBrokersTestOnly()
return result;
}
-int LOOLWSD::getClientPortNumber()
+int COOLWSD::getClientPortNumber()
{
return ClientPortNumber;
}
-std::set<pid_t> LOOLWSD::getKitPids()
+std::set<pid_t> COOLWSD::getKitPids()
{
std::set<pid_t> pids;
pid_t pid;
@@ -4610,7 +4610,7 @@ void dump_state()
// Avoid this in the Util::isFuzzing() case because libfuzzer defines its own main().
#if !MOBILEAPP && !LIBFUZZER
-POCO_SERVER_MAIN(LOOLWSD)
+POCO_SERVER_MAIN(COOLWSD)
#endif
diff --git a/wsd/LOOLWSD.hpp b/wsd/COOLWSD.hpp
index cc1239ab91..5c69744bb6 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/COOLWSD.hpp
@@ -137,7 +137,7 @@ public:
{
if (_ws)
{
- LOG_TRC("Send to " << _name << " message: [" << LOOLProtocol::getAbbreviatedMessage(data) << "].");
+ LOG_TRC("Send to " << _name << " message: [" << COOLProtocol::getAbbreviatedMessage(data) << "].");
_ws->sendMessage(data);
return true;
}
@@ -145,11 +145,11 @@ public:
catch (const std::exception& exc)
{
LOG_ERR("Failed to send " << _name << " [" << _pid << "] data [" <<
- LOOLProtocol::getAbbreviatedMessage(data) << "] due to: " << exc.what());
+ COOLProtocol::getAbbreviatedMessage(data) << "] due to: " << exc.what());
throw;
}
- LOG_WRN("No socket to " << _name << " to send [" << LOOLProtocol::getAbbreviatedMessage(data) << ']');
+ LOG_WRN("No socket to " << _name << " to send [" << COOLProtocol::getAbbreviatedMessage(data) << ']');
return false;
}
@@ -210,17 +210,17 @@ public:
#endif
-// Forward declarations for classes defined in LOOLWSD.cpp.
+// Forward declarations for classes defined in COOLWSD.cpp.
class PrisonPoll;
-class LOOLWSDServer;
+class COOLWSDServer;
/// The Server class which is responsible for all
/// external interactions.
-class LOOLWSD : public Poco::Util::ServerApplication
+class COOLWSD : public Poco::Util::ServerApplication
{
public:
- LOOLWSD();
- ~LOOLWSD();
+ COOLWSD();
+ ~COOLWSD();
// An Application is a singleton anyway,
// so just keep these as statics.
@@ -259,7 +259,7 @@ public:
static std::string MostVerboseLogLevelSettableFromClient;
static std::string LeastVerboseLogLevelSettableFromClient;
static bool AnonymizeUserData;
- static bool CheckLoolUser;
+ static bool CheckCoolUser;
static bool CleanupOnly;
static bool IsProxyPrefixEnabled;
static std::atomic<unsigned> NumConnections;
@@ -300,7 +300,7 @@ public:
static bool isSSLEnabled()
{
#if ENABLE_SSL
- return !Util::isFuzzing() && LOOLWSD::SSLEnabled.get();
+ return !Util::isFuzzing() && COOLWSD::SSLEnabled.get();
#else
return false;
#endif
@@ -309,7 +309,7 @@ public:
static bool isSSLTermination()
{
#if ENABLE_SSL
- return !Util::isFuzzing() && LOOLWSD::SSLTermination.get();
+ return !Util::isFuzzing() && COOLWSD::SSLTermination.get();
#else
return false;
#endif
@@ -377,13 +377,13 @@ public:
// the expected path might not exist, in which case Poco throws an exception
try
{
- value = LOOLWSD::getPathFromConfig(name);
+ value = COOLWSD::getPathFromConfig(name);
}
catch (...)
{
}
if (value.empty())
- return LOOLWSD::getPathFromConfig(fallbackName);
+ return COOLWSD::getPathFromConfig(fallbackName);
return value;
}
@@ -459,14 +459,14 @@ protected:
}
catch (const Poco::Exception& ex)
{
- LOG_FTL("Failed to initialize LOOLWSD: "
+ LOG_FTL("Failed to initialize COOLWSD: "
<< ex.displayText()
<< (ex.nested() ? " (" + ex.nested()->displayText() + ')' : ""));
throw; // Nothing further to do.
}
catch (const std::exception& ex)
{
- LOG_FTL("Failed to initialize LOOLWSD: " << ex.what());
+ LOG_FTL("Failed to initialize COOLWSD: " << ex.what());
throw; // Nothing further to do.
}
}
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index a14afc0131..85d18dde03 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -20,7 +20,7 @@
#include <Poco/URI.h>
#include "DocumentBroker.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include <common/Common.hpp>
#include <common/Log.hpp>
#include <common/Protocol.hpp>
@@ -33,7 +33,7 @@
#include <net/HttpHelper.hpp>
#endif
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
static constexpr int SYNTHETIC_COOL_PID_OFFSET = 10000000;
@@ -74,7 +74,7 @@ ClientSession::ClientSession(
_isTextDocument(false),
_lastSentFormFielButtonMessage("")
{
- const std::size_t curConnections = ++LOOLWSD::NumConnections;
+ const std::size_t curConnections = ++COOLWSD::NumConnections;
LOG_INF("ClientSession ctor [" << getName() << "] for URI: [" << _uriPublic.toString()
<< "], current number of connections: " << curConnections);
@@ -107,7 +107,7 @@ void ClientSession::construct()
ClientSession::~ClientSession()
{
- const std::size_t curConnections = --LOOLWSD::NumConnections;
+ const std::size_t curConnections = --COOLWSD::NumConnections;
LOG_INF("~ClientSession dtor [" << getName() << "], current number of connections: " << curConnections);
std::unique_lock<std::mutex> lock(GlobalSessionMapMutex);
@@ -360,7 +360,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
}
else if (tokens.equals(0, "TRACEEVENT"))
{
- if (LOOLWSD::EnableTraceEventLogging)
+ if (COOLWSD::EnableTraceEventLogging)
{
if (_performanceCounterEpoch == 0)
{
@@ -401,7 +401,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
uint64_t dur;
if (ph == "i")
{
- LOOLWSD::writeTraceEventRecording("{\"name\":\""
+ COOLWSD::writeTraceEventRecording("{\"name\":\""
+ name
+ "\",\"ph\":\"i\""
+ args
@@ -414,7 +414,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
else if ((ph == "S" || ph == "F") &&
getTokenUInt64(tokens[4], "id", id))
{
- LOOLWSD::writeTraceEventRecording("{\"name\":\""
+ COOLWSD::writeTraceEventRecording("{\"name\":\""
+ name
+ "\",\"ph\":\""
+ ph
@@ -432,7 +432,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
else if (ph == "X" &&
getTokenUInt64(tokens[4], "dur", dur))
{
- LOOLWSD::writeTraceEventRecording("{\"name\":\""
+ COOLWSD::writeTraceEventRecording("{\"name\":\""
+ name
+ "\",\"ph\":\"X\""
+ args
@@ -457,9 +457,9 @@ bool ClientSession::_handleInput(const char *buffer, int length)
return false;
}
- LOOLWSD::dumpIncomingTrace(docBroker->getJailId(), getId(), firstLine);
+ COOLWSD::dumpIncomingTrace(docBroker->getJailId(), getId(), firstLine);
- if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
+ if (COOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
{
// Keep track of timestamps of incoming client messages that indicate user activity.
updateLastActivityTime();
@@ -516,11 +516,11 @@ bool ClientSession::_handleInput(const char *buffer, int length)
// Send COOL version information
sendTextFrame("coolserver " + Util::getVersionJSON());
// Send LOKit version information
- sendTextFrame("lokitversion " + LOOLWSD::LOKitVersion);
+ sendTextFrame("lokitversion " + COOLWSD::LOKitVersion);
// If Trace Event generation and logging is enabled (whether it can be turned on), tell it
// to cool
- if (LOOLWSD::EnableTraceEventLogging)
+ if (COOLWSD::EnableTraceEventLogging)
sendTextFrame("enabletraceeventlogging yes");
#if !MOBILEAPP
@@ -876,27 +876,27 @@ bool ClientSession::_handleInput(const char *buffer, int length)
{
try
{
- auto leastVerboseAllowed = Poco::Logger::parseLevel(LOOLWSD::LeastVerboseLogLevelSettableFromClient);
- auto mostVerboseAllowed = Poco::Logger::parseLevel(LOOLWSD::MostVerboseLogLevelSettableFromClient);
+ auto leastVerboseAllowed = Poco::Logger::parseLevel(COOLWSD::LeastVerboseLogLevelSettableFromClient);
+ auto mostVerboseAllowed = Poco::Logger::parseLevel(COOLWSD::MostVerboseLogLevelSettableFromClient);
if (tokens.equals(1, "verbose"))
{
LOG_INF("Client sets thread-local logging level to the most verbose allowed ["
- << LOOLWSD::MostVerboseLogLevelSettableFromClient
+ << COOLWSD::MostVerboseLogLevelSettableFromClient
<< "]");
- Log::setThreadLocalLogLevel(LOOLWSD::MostVerboseLogLevelSettableFromClient);
+ Log::setThreadLocalLogLevel(COOLWSD::MostVerboseLogLevelSettableFromClient);
LOG_INF("Thread-local logging level was set to ["
- << LOOLWSD::MostVerboseLogLevelSettableFromClient
+ << COOLWSD::MostVerboseLogLevelSettableFromClient
<< "]");
}
else if (tokens.equals(1, "terse"))
{
LOG_INF("Client sets thread-local logging level to the least verbose allowed ["
- << LOOLWSD::LeastVerboseLogLevelSettableFromClient
+ << COOLWSD::LeastVerboseLogLevelSettableFromClient
<< "]");
- Log::setThreadLocalLogLevel(LOOLWSD::LeastVerboseLogLevelSettableFromClient);
+ Log::setThreadLocalLogLevel(COOLWSD::LeastVerboseLogLevelSettableFromClient);
LOG_INF("Thread-local logging level was set to ["
- << LOOLWSD::LeastVerboseLogLevelSettableFromClient
+ << COOLWSD::LeastVerboseLogLevelSettableFromClient
<< "]");
}
else
@@ -915,8 +915,8 @@ bool ClientSession::_handleInput(const char *buffer, int length)
LOG_WRN("Client tries to set logging level to ["
<< tokens[1]
<< "] which is outside of bounds ["
- << LOOLWSD::LeastVerboseLogLevelSettableFromClient << ","
- << LOOLWSD::MostVerboseLogLevelSettableFromClient << "]");
+ << COOLWSD::LeastVerboseLogLevelSettableFromClient << ","
+ << COOLWSD::MostVerboseLogLevelSettableFromClient << "]");
}
}
}
@@ -929,7 +929,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
}
else if (tokens.equals(0, "traceeventrecording"))
{
- if (LOOLWSD::getConfigValue<bool>("trace_event[@enable]", false))
+ if (COOLWSD::getConfigValue<bool>("trace_event[@enable]", false))
{
if (tokens.size() > 0)
{
@@ -1048,14 +1048,14 @@ bool ClientSession::loadDocument(const char* /*buffer*/, int /*length*/,
Poco::URI::encode(getUserId(), "", encodedUserId);
oss << " authorid=" << encodedUserId;
encodedUserId = "";
- Poco::URI::encode(LOOLWSD::anonymizeUsername(getUserId()), "", encodedUserId);
+ Poco::URI::encode(COOLWSD::anonymizeUsername(getUserId()), "", encodedUserId);
oss << " xauthorid=" << encodedUserId;
std::string encodedUserName;
Poco::URI::encode(getUserName(), "", encodedUserName);
oss << " author=" << encodedUserName;
encodedUserName = "";
- Poco::URI::encode(LOOLWSD::anonymizeUsername(getUserName()), "", encodedUserName);
+ Poco::URI::encode(COOLWSD::anonymizeUsername(getUserName()), "", encodedUserName);
oss << " xauthor=" << encodedUserName;
}
@@ -1098,18 +1098,18 @@ bool ClientSession::loadDocument(const char* /*buffer*/, int /*length*/,
std::string encodedWatermarkText;
Poco::URI::encode(getWatermarkText(), "", encodedWatermarkText);
oss << " watermarkText=" << encodedWatermarkText;
- oss << " watermarkOpacity=" << LOOLWSD::getConfigValue<double>("watermark.opacity", 0.2);
+ oss << " watermarkOpacity=" << COOLWSD::getConfigValue<double>("watermark.opacity", 0.2);
}
- if (LOOLWSD::hasProperty("security.enable_macros_execution"))
+ if (COOLWSD::hasProperty("security.enable_macros_execution"))
{
oss << " enableMacrosExecution=" << std::boolalpha
- << LOOLWSD::getConfigValue<bool>("security.enable_macros_execution", false);
+ << COOLWSD::getConfigValue<bool>("security.enable_macros_execution", false);
}
- if (LOOLWSD::hasProperty("security.macro_security_level"))
+ if (COOLWSD::hasProperty("security.macro_security_level"))
{
- oss << " macroSecurityLevel=" << LOOLWSD::getConfigValue<int>("security.macro_security_level", 1);
+ oss << " macroSecurityLevel=" << COOLWSD::getConfigValue<int>("security.macro_security_level", 1);
}
if (!getDocOptions().empty())
@@ -1414,7 +1414,7 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
const bool isConvertTo = static_cast<bool>(_saveAsSocket);
#if !MOBILEAPP
- LOOLWSD::dumpOutgoingTrace(docBroker->getJailId(), getId(), firstLine);
+ COOLWSD::dumpOutgoingTrace(docBroker->getJailId(), getId(), firstLine);
#endif
const auto& tokens = payload->tokens();
@@ -1554,7 +1554,7 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
Poco::URI resultURL(encodedURL);
// Prepend the jail path in the normal (non-nocaps) case
- if (resultURL.getScheme() == "file" && !LOOLWSD::NoCapsForKit)
+ if (resultURL.getScheme() == "file" && !COOLWSD::NoCapsForKit)
{
std::string relative;
if (isConvertTo)
@@ -1705,7 +1705,7 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
// final cleanup ...
if (!empty && _state == SessionState::WAIT_DISCONNECT &&
(!_wopiFileInfo || !_wopiFileInfo->getDisableCopy()))
- LOOLWSD::SavedClipboards->insertClipboard(
+ COOLWSD::SavedClipboards->insertClipboard(
_clipboardKeys, &payload->data()[header], payload->size() - header);
for (const auto& it : _clipSockets)
@@ -1985,7 +1985,7 @@ Util::Rectangle ClientSession::getNormalizedVisibleArea() const
void ClientSession::onDisconnect()
{
- LOG_INF(getName() << " Disconnected, current number of connections: " << LOOLWSD::NumConnections);
+ LOG_INF(getName() << " Disconnected, current number of connections: " << COOLWSD::NumConnections);
const std::shared_ptr<DocumentBroker> docBroker = getDocumentBroker();
LOG_CHECK_RET(docBroker && "Null DocumentBroker instance", );
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index deae5cff02..80997df109 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -28,7 +28,7 @@
#include "ClientSession.hpp"
#include "Exceptions.hpp"
#include "JailUtil.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "SenderQueue.hpp"
#include "Storage.hpp"
#include "TileCache.hpp"
@@ -51,7 +51,7 @@
#define TILES_ON_FLY_MIN_UPPER_LIMIT 10.0f
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
using Poco::JSON::Object;
@@ -138,13 +138,13 @@ DocumentBroker::DocumentBroker(ChildType type,
_mobileAppDocId(mobileAppDocId)
{
assert(!_docKey.empty());
- assert(!LOOLWSD::ChildRoot.empty());
+ assert(!COOLWSD::ChildRoot.empty());
#ifdef IOS
assert(_mobileAppDocId > 0);
#endif
- LOG_INF("DocumentBroker [" << LOOLWSD::anonymizeUrl(_uriPublic.toString()) <<
+ LOG_INF("DocumentBroker [" << COOLWSD::anonymizeUrl(_uriPublic.toString()) <<
"] created with docKey [" << _docKey << ']');
}
@@ -153,7 +153,7 @@ void DocumentBroker::setupPriorities()
#if !MOBILEAPP
if (_type == ChildType::Batch)
{
- int prio = LOOLWSD::getConfigValue<int>("per_document.batch_priority", 5);
+ int prio = COOLWSD::getConfigValue<int>("per_document.batch_priority", 5);
Util::setProcessAndThreadPriorities(_childProcess->getPid(), prio);
}
#endif
@@ -220,7 +220,7 @@ void DocumentBroker::pollThread()
_poll->removeSockets();
// Async cleanup.
- LOOLWSD::doHousekeeping();
+ COOLWSD::doHousekeeping();
LOG_INF("Finished docBroker polling thread for docKey [" << _docKey << "].");
return;
@@ -234,7 +234,7 @@ void DocumentBroker::pollThread()
#if !MOBILEAPP
static const std::size_t IdleDocTimeoutSecs
- = LOOLWSD::getConfigValue<int>("per_document.idle_timeout_secs", 3600);
+ = COOLWSD::getConfigValue<int>("per_document.idle_timeout_secs", 3600);
// Used to accumulate B/W deltas.
uint64_t adminSent = 0;
@@ -248,7 +248,7 @@ void DocumentBroker::pollThread()
// ignore load time out
std::getenv("PAUSEFORDEBUGGER") ? -1 :
#endif
- LOOLWSD::getConfigValue<int>("per_document.limit_load_secs", 100);
+ COOLWSD::getConfigValue<int>("per_document.limit_load_secs", 100);
auto loadDeadline = std::chrono::steady_clock::now() + std::chrono::seconds(limit_load_secs);
#endif
@@ -495,7 +495,7 @@ void DocumentBroker::pollThread()
#if !MOBILEAPP
// Async cleanup.
- LOOLWSD::doHousekeeping();
+ COOLWSD::doHousekeeping();
#endif
if (_tileCache)
@@ -589,7 +589,7 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
// Pass the public URI to storage as it needs to load using the token
// and other storage-specific data provided in the URI.
const Poco::URI& uriPublic = session->getPublicUri();
- LOG_DBG("Loading, and creating new storage instance for URI [" << LOOLWSD::anonymizeUrl(uriPublic.toString()) << "].");
+ LOG_DBG("Loading, and creating new storage instance for URI [" << COOLWSD::anonymizeUrl(uriPublic.toString()) << "].");
try
{
@@ -638,11 +638,11 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
templateSource = wopifileinfo->getTemplateSource();
if (!wopifileinfo->getUserCanWrite() ||
- LOOLWSD::IsViewFileExtension(wopiStorage->getFileExtension()))
+ COOLWSD::IsViewFileExtension(wopiStorage->getFileExtension()))
{
LOG_DBG("Setting the session as readonly");
session->setReadOnly();
- if (LOOLWSD::IsViewWithCommentsFileExtension(wopiStorage->getFileExtension()))
+ if (COOLWSD::IsViewWithCommentsFileExtension(wopiStorage->getFileExtension()))
{
LOG_DBG("Allow session to change comments");
session->setAllowChangeComments();
@@ -664,7 +664,7 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
{
// Update the scheme to https if ssl or ssl termination is on
if (wopifileinfo->getPostMessageOrigin().substr(0, 7) == "http://" &&
- (LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()))
+ (COOLWSD::isSSLEnabled() || COOLWSD::isSSLTermination()))
{
wopifileinfo->getPostMessageOrigin().replace(0, 4, "https");
LOG_DBG("Updating PostMessageOrigin scheme to HTTPS. Updated origin is [" << wopifileinfo->getPostMessageOrigin() << "].");
@@ -737,11 +737,11 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
userId = localfileinfo->getUserId();
username = localfileinfo->getUsername();
- if (LOOLWSD::IsViewFileExtension(localStorage->getFileExtension()))
+ if (COOLWSD::IsViewFileExtension(localStorage->getFileExtension()))
{
LOG_DBG("Setting the session as readonly");
session->setReadOnly();
- if (LOOLWSD::IsViewWithCommentsFileExtension(localStorage->getFileExtension()))
+ if (COOLWSD::IsViewWithCommentsFileExtension(localStorage->getFileExtension()))
{
LOG_DBG("Allow session to change comments");
session->setAllowChangeComments();
@@ -791,8 +791,8 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
#endif
#if ENABLE_SUPPORT_KEY
- if (!LOOLWSD::OverrideWatermark.empty())
- watermarkText = LOOLWSD::OverrideWatermark;
+ if (!COOLWSD::OverrideWatermark.empty())
+ watermarkText = COOLWSD::OverrideWatermark;
#endif
session->setUserId(userId);
@@ -801,8 +801,8 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
session->setWatermarkText(watermarkText);
session->createCanonicalViewId(_sessions);
- LOG_DBG("Setting username [" << LOOLWSD::anonymizeUsername(username) << "] and userId [" <<
- LOOLWSD::anonymizeUsername(userId) << "] for session [" << sessionId <<
+ LOG_DBG("Setting username [" << COOLWSD::anonymizeUsername(username) << "] and userId [" <<
+ COOLWSD::anonymizeUsername(userId) << "] for session [" << sessionId <<
"] is canonical id " << session->getCanonicalViewId());
// Basic file information was stored by the above getWOPIFileInfo() or getLocalFileInfo() calls
@@ -868,7 +868,7 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
#if !MOBILEAPP
// Check if we have a prefilter "plugin" for this document format
- for (const auto& plugin : LOOLWSD::PluginConfigurations)
+ for (const auto& plugin : COOLWSD::PluginConfigurations)
{
try
{
@@ -941,13 +941,13 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
Poco::DigestOutputStream dos(sha1);
Poco::StreamCopier::copyStream(istr, dos);
dos.close();
- LOG_INF("SHA1 for DocKey [" << _docKey << "] of [" << LOOLWSD::anonymizeUrl(localPath) << "]: " <<
+ LOG_INF("SHA1 for DocKey [" << _docKey << "] of [" << COOLWSD::anonymizeUrl(localPath) << "]: " <<
Poco::DigestEngine::digestToHex(sha1.digest()));
std::string localPathEncoded;
Poco::URI::encode(localPath, "#?", localPathEncoded);
_uriJailed = Poco::URI(Poco::URI("file://"), localPathEncoded).toString();
- _uriJailedAnonym = Poco::URI(Poco::URI("file://"), LOOLWSD::anonymizeUrl(localPathEncoded)).toString();
+ _uriJailedAnonym = Poco::URI(Poco::URI("file://"), COOLWSD::anonymizeUrl(localPathEncoded)).toString();
_filename = fileInfo.getFilename();
@@ -979,7 +979,7 @@ bool DocumentBroker::download(const std::shared_ptr<ClientSession>& session, con
}
#if !MOBILEAPP
- LOOLWSD::dumpNewSessionTrace(getJailId(), sessionId, _uriOrig, _storage->getRootFilePath());
+ COOLWSD::dumpNewSessionTrace(getJailId(), sessionId, _uriOrig, _storage->getRootFilePath());
// Since document has been loaded, send the stats if its WOPI
if (wopiStorage != nullptr)
@@ -1076,7 +1076,7 @@ DocumentBroker::NeedToUpload DocumentBroker::needToUploadToStorage() const
if (isMarkedToDestroy() || _docState.isUnloadRequested())
{
static const bool always_save
- = LOOLWSD::getConfigValue<bool>("per_document.always_save_on_exit", false);
+ = COOLWSD::getConfigValue<bool>("per_document.always_save_on_exit", false);
if (always_save)
{
LOG_INF("Need to upload per always_save_on_exit config (MarkedToDestroy=true).");
@@ -1307,9 +1307,9 @@ void DocumentBroker::uploadToStorageInternal(const std::string& sessionId, bool
// Map the FileId from the docKey to the new filename to anonymize the new filename as the FileId.
const std::string newFilename = Util::getFilenameFromURL(uri);
const std::string fileId = Util::getFilenameFromURL(_docKey);
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
{
- LOG_DBG("New filename [" << LOOLWSD::anonymizeUrl(newFilename)
+ LOG_DBG("New filename [" << COOLWSD::anonymizeUrl(newFilename)
<< "] will be known by its fileId [" << fileId << ']');
Util::mapAnonymized(newFilename, fileId);
@@ -1317,7 +1317,7 @@ void DocumentBroker::uploadToStorageInternal(const std::string& sessionId, bool
assert(_storage && "Must have a valid Storage instance");
- const std::string uriAnonym = LOOLWSD::anonymizeUrl(uri);
+ const std::string uriAnonym = COOLWSD::anonymizeUrl(uri);
// If the file timestamp hasn't changed, skip uploading.
const std::string filePath = _storage->getRootFilePathUploading();
@@ -1493,7 +1493,7 @@ void DocumentBroker::handleUploadToStorageResponse(const StorageBase::UploadResu
const std::string url = uri.toString();
std::string encodedName;
Poco::URI::encode(filename, "", encodedName);
- const std::string filenameAnonym = LOOLWSD::anonymizeUrl(filename);
+ const std::string filenameAnonym = COOLWSD::anonymizeUrl(filename);
std::ostringstream oss;
oss << "renamefile: " << "filename=" << encodedName << " url=" << url;
broadcastMessage(oss.str());
@@ -1509,13 +1509,13 @@ void DocumentBroker::handleUploadToStorageResponse(const StorageBase::UploadResu
// encode the name
std::string encodedName;
Poco::URI::encode(filename, "", encodedName);
- const std::string filenameAnonym = LOOLWSD::anonymizeUrl(filename);
+ const std::string filenameAnonym = COOLWSD::anonymizeUrl(filename);
const auto session = _uploadRequest->session();
if (session)
{
LOG_DBG("Uploaded SaveAs docKey [" << _docKey << "] to URI ["
- << LOOLWSD::anonymizeUrl(url) << "] with name ["
+ << COOLWSD::anonymizeUrl(url) << "] with name ["
<< filenameAnonym << "] successfully.");
std::ostringstream oss;
@@ -1532,7 +1532,7 @@ void DocumentBroker::handleUploadToStorageResponse(const StorageBase::UploadResu
else
{
LOG_DBG("Uploaded SaveAs docKey ["
- << _docKey << "] to URI [" << LOOLWSD::anonymizeUrl(url) << "] with name ["
+ << _docKey << "] to URI [" << COOLWSD::anonymizeUrl(url) << "] with name ["
<< filenameAnonym << "] successfully, but the client session is closed.");
}
}
@@ -1629,7 +1629,7 @@ void DocumentBroker::broadcastSaveResult(bool success, const std::string& result
{
const std::string resultstr = success ? "true" : "false";
// Some sane limit, otherwise we get problems transferring this to the client with large strings (can be a whole webpage)
- std::string errorMsgFormatted = LOOLProtocol::getAbbreviatedMessage(errorMsg);
+ std::string errorMsgFormatted = COOLProtocol::getAbbreviatedMessage(errorMsg);
// Replace reserved characters
errorMsgFormatted = Poco::translate(errorMsgFormatted, "\"", "'");
broadcastMessage("commandresult: { \"command\": \"save\", \"success\": " + resultstr +
@@ -1745,11 +1745,11 @@ bool DocumentBroker::autoSave(const bool force, const bool dontSaveIfUnmodified)
{
// The configured maximum idle duration before saving. Zero to disable.
static const std::chrono::milliseconds MaxIdleSaveDurationMs = std::chrono::seconds(
- LOOLWSD::getConfigValue<int>("per_document.idlesave_duration_secs", 30));
+ COOLWSD::getConfigValue<int>("per_document.idlesave_duration_secs", 30));
// The configured maximum duration before saving. Zero to disable.
static const std::chrono::milliseconds MaxAutoSaveDurationMs = std::chrono::seconds(
- LOOLWSD::getConfigValue<int>("per_document.autosave_duration_secs", 300));
+ COOLWSD::getConfigValue<int>("per_document.autosave_duration_secs", 300));
const std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
const std::chrono::milliseconds inactivityTimeMs
@@ -1859,7 +1859,7 @@ bool DocumentBroker::sendUnoSave(const std::string& sessionId, bool dontTerminat
std::string DocumentBroker::getJailRoot() const
{
assert(!_jailId.empty());
- return Poco::Path(LOOLWSD::ChildRoot, _jailId).toString();
+ return Poco::Path(COOLWSD::ChildRoot, _jailId).toString();
}
std::size_t DocumentBroker::addSession(const std::shared_ptr<ClientSession>& session)
@@ -1870,7 +1870,7 @@ std::size_t DocumentBroker::addSession(const std::shared_ptr<ClientSession>& ses
}
catch (const std::exception& exc)
{
- LOG_ERR("Failed to add session to [" << _docKey << "] with URI [" << LOOLWSD::anonymizeUrl(session->getPublicUri().toString()) << "]: " << exc.what());
+ LOG_ERR("Failed to add session to [" << _docKey << "] with URI [" << COOLWSD::anonymizeUrl(session->getPublicUri().toString()) << "]: " << exc.what());
if (_sessions.empty())
{
LOG_INF("Doc [" << _docKey << "] has no more sessions. Marking to destroy.");
@@ -1959,7 +1959,7 @@ std::size_t DocumentBroker::removeSession(const std::string& id)
const bool isLastSession = (_sessions.size() == 1);
const bool lastEditableSession = (!session->isReadOnly() || session->isAllowChangeComments()) && !haveAnotherEditableSession(id);
- static const bool dontSaveIfUnmodified = !LOOLWSD::getConfigValue<bool>("per_document.always_save_on_exit", false);
+ static const bool dontSaveIfUnmodified = !COOLWSD::getConfigValue<bool>("per_document.always_save_on_exit", false);
LOG_INF("Removing session ["
<< id << "] on docKey [" << _docKey << "]. Have " << _sessions.size()
@@ -2036,7 +2036,7 @@ void DocumentBroker::disconnectSessionInternal(const std::string& id)
if (it != _sessions.end())
{
#if !MOBILEAPP
- LOOLWSD::dumpEndSessionTrace(getJailId(), id, _uriOrig);
+ COOLWSD::dumpEndSessionTrace(getJailId(), id, _uriOrig);
#endif
if (_docState.isUnloadRequested())
{
@@ -2247,11 +2247,11 @@ bool DocumentBroker::handleInput(const std::vector<char>& payload)
LOG_TRC("DocumentBroker handling child message: [" << message->abbr() << "].");
#if !MOBILEAPP
- if (LOOLWSD::TraceDumper)
- LOOLWSD::dumpOutgoingTrace(getJailId(), "0", message->abbr());
+ if (COOLWSD::TraceDumper)
+ COOLWSD::dumpOutgoingTrace(getJailId(), "0", message->abbr());
#endif
- if (LOOLProtocol::getFirstToken(message->forwardToken(), '-') == "client")
+ if (COOLProtocol::getFirstToken(message->forwardToken(), '-') == "client")
{
forwardToClient(message);
}
@@ -2269,9 +2269,9 @@ bool DocumentBroker::handleInput(const std::vector<char>& payload)
{
LOG_CHECK_RET(message->tokens().size() == 3, false);
std::string cmd, kind;
- LOOLProtocol::getTokenString((*message)[1], "cmd", cmd);
+ COOLProtocol::getTokenString((*message)[1], "cmd", cmd);
LOG_CHECK_RET(cmd != "", false);
- LOOLProtocol::getTokenString((*message)[2], "kind", kind);
+ COOLProtocol::getTokenString((*message)[2], "kind", kind);
LOG_CHECK_RET(kind != "", false);
Util::alertAllUsers(cmd, kind);
}
@@ -2279,9 +2279,9 @@ bool DocumentBroker::handleInput(const std::vector<char>& payload)
{
LOG_CHECK_RET(message->tokens().size() == 3, false);
std::string downloadid, url;
- LOOLProtocol::getTokenString((*message)[1], "downloadid", downloadid);
+ COOLProtocol::getTokenString((*message)[1], "downloadid", downloadid);
LOG_CHECK_RET(downloadid != "", false);
- LOOLProtocol::getTokenString((*message)[2], "url", url);
+ COOLProtocol::getTokenString((*message)[2], "url", url);
LOG_CHECK_RET(url != "", false);
_registeredDownloadLinks[downloadid] = url;
@@ -2289,21 +2289,21 @@ bool DocumentBroker::handleInput(const std::vector<char>& payload)
else if (message->firstTokenMatches("traceevent:"))
{
LOG_CHECK_RET(message->tokens().size() == 1, false);
- if (LOOLWSD::TraceEventFile != NULL && TraceEvent::isRecordingOn())
+ if (COOLWSD::TraceEventFile != NULL && TraceEvent::isRecordingOn())
{
const auto newLine = static_cast<const char*>(memchr(payload.data(), '\n', payload.size()));
if (newLine)
- LOOLWSD::writeTraceEventRecording(newLine + 1, payload.size() - (newLine + 1 - payload.data()));
+ COOLWSD::writeTraceEventRecording(newLine + 1, payload.size() - (newLine + 1 - payload.data()));
}
}
else if (message->firstTokenMatches("forcedtraceevent:"))
{
LOG_CHECK_RET(message->tokens().size() == 1, false);
- if (LOOLWSD::TraceEventFile != NULL)
+ if (COOLWSD::TraceEventFile != NULL)
{
const auto newLine = static_cast<const char*>(memchr(payload.data(), '\n', payload.size()));
if (newLine)
- LOOLWSD::writeTraceEventRecording(newLine + 1, payload.size() - (newLine + 1 - payload.data()));
+ COOLWSD::writeTraceEventRecording(newLine + 1, payload.size() - (newLine + 1 - payload.data()));
}
}
else
@@ -2469,7 +2469,7 @@ bool DocumentBroker::lookupSendClipboardTag(const std::shared_ptr<StreamSocket>
LOG_TRC("Clipboard request " << tag << " not for a live session - check cache.");
#if !MOBILEAPP
std::shared_ptr<std::string> saved =
- LOOLWSD::SavedClipboards->getClipboard(tag);
+ COOLWSD::SavedClipboards->getClipboard(tag);
if (saved)
{
std::ostringstream oss;
@@ -2729,7 +2729,7 @@ void DocumentBroker::setModified(const bool value)
if (value || _storageManager.lastUploadSuccessful())
{
- // Set the X-LOOL-WOPI-IsModifiedByUser header flag sent to storage.
+ // Set the X-COOL-WOPI-IsModifiedByUser header flag sent to storage.
// But retain the last value if we failed to upload, so we don't clobber it.
_storage->setUserModified(value);
}
@@ -2798,7 +2798,7 @@ bool DocumentBroker::forwardToClient(const std::shared_ptr<Message>& payload)
std::string name;
std::string sid;
- if (LOOLProtocol::parseNameValuePair(payload->forwardToken(), name, sid, '-') && name == "client")
+ if (COOLProtocol::parseNameValuePair(payload->forwardToken(), name, sid, '-') && name == "client")
{
const auto& data = payload->data().data();
const auto& size = payload->size();
@@ -2989,7 +2989,7 @@ ConvertToBroker::ConvertToBroker(const std::string& uri,
<< format << "], options: [" << sOptions << "].");
static const std::chrono::seconds limit_convert_secs(
- LOOLWSD::getConfigValue<int>("per_document.limit_convert_secs", 100));
+ COOLWSD::getConfigValue<int>("per_document.limit_convert_secs", 100));
_limitLifeSeconds = limit_convert_secs;
++gConvertToBrokerInstanceCouter;
}
@@ -3053,7 +3053,7 @@ void ConvertToBroker::setLoaded()
// file:///user/docs/filename.ext normally, file:///<jail-root>/user/docs/filename.ext in the nocaps case
const std::string toJailURL = "file://" +
- (LOOLWSD::NoCapsForKit? getJailRoot(): "") +
+ (COOLWSD::NoCapsForKit? getJailRoot(): "") +
std::string(JAILED_DOCUMENT_ROOT) + toPath.getFileName();
std::string encodedTo;
@@ -3202,7 +3202,7 @@ void DocumentBroker::dumpState(std::ostream& os)
auto now = std::chrono::steady_clock::now();
- os << " Broker: " << LOOLWSD::anonymizeUrl(_filename) << " pid: " << getPid();
+ os << " Broker: " << COOLWSD::anonymizeUrl(_filename) << " pid: " << getPid();
if (_docState.isMarkedToDestroy())
os << " *** Marked to destroy ***";
else
@@ -3217,9 +3217,9 @@ void DocumentBroker::dumpState(std::ostream& os)
os << "\n recv: " << recv;
os << "\n modified?: " << isModified();
os << "\n jail id: " << _jailId;
- os << "\n filename: " << LOOLWSD::anonymizeUrl(_filename);
+ os << "\n filename: " << COOLWSD::anonymizeUrl(_filename);
os << "\n public uri: " << _uriPublic.toString();
- os << "\n jailed uri: " << LOOLWSD::anonymizeUrl(_uriJailed);
+ os << "\n jailed uri: " << COOLWSD::anonymizeUrl(_uriJailed);
os << "\n doc key: " << _docKey;
os << "\n doc id: " << _docId;
os << "\n num sessions: " << _sessions.size();
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index ea916f9972..056f51719c 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -43,7 +43,7 @@ struct LockContext;
class TileCache;
class Message;
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
/// A ChildProcess object represents a Kit process that hosts a document and manipulates the
/// document using the LibreOfficeKit API. It isn't actually a child of the WSD process, but a
@@ -678,7 +678,7 @@ private:
SaveManager()
: _autosaveInterval(std::chrono::seconds(30))
, _lastAutosaveCheckTime(RequestManager::now())
- , _isAutosaveEnabled(std::getenv("LOOL_NO_AUTOSAVE") == nullptr)
+ , _isAutosaveEnabled(std::getenv("COOL_NO_AUTOSAVE") == nullptr)
{
}
diff --git a/wsd/Exceptions.hpp b/wsd/Exceptions.hpp
index f8aab3c186..c45d71ca6f 100644
--- a/wsd/Exceptions.hpp
+++ b/wsd/Exceptions.hpp
@@ -14,7 +14,7 @@
#include <stdexcept>
// Generic COOL errors and base for others.
-class LoolException : public std::runtime_error
+class CoolException : public std::runtime_error
{
public:
std::string toString() const
@@ -26,26 +26,26 @@ protected:
using std::runtime_error::runtime_error;
};
-class StorageSpaceLowException : public LoolException
+class StorageSpaceLowException : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/// General exception thrown when we are not able to
/// connect to storage.
-class StorageConnectionException : public LoolException
+class StorageConnectionException : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/// A bad-request exception that is meant to signify,
/// and translate into, an HTTP bad request.
-class BadRequestException : public LoolException
+class BadRequestException : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/// A bad-argument exception that is meant to signify,
@@ -58,25 +58,25 @@ public:
/// An authorization exception that is meant to signify,
/// and translate into, an HTTP unauthorized error.
-class UnauthorizedRequestException : public LoolException
+class UnauthorizedRequestException : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/// A service-unavailable exception that is meant to signify
/// an internal error.
-class ServiceUnavailableException : public LoolException
+class ServiceUnavailableException : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/// Badly formed data we are parsing
-class ParseError : public LoolException
+class ParseError : public CoolException
{
public:
- using LoolException::LoolException;
+ using CoolException::CoolException;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 3f24540d99..7467886a33 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -42,7 +42,7 @@
#include <Common.hpp>
#include <Crypto.hpp>
#include "FileServer.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "ServerURL.hpp"
#include <Log.hpp>
#include <Protocol.hpp>
@@ -84,7 +84,7 @@ bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& userProv
localConversation.appdata_ptr = const_cast<char *>(userProvidedPwd.c_str());
- retval = pam_start("loolwsd", userProvidedUsr.c_str(), &localConversation, &localAuthHandle);
+ retval = pam_start("coolwsd", userProvidedUsr.c_str(), &localConversation, &localAuthHandle);
if (retval != PAM_SUCCESS)
{
@@ -119,7 +119,7 @@ bool isPamAuthOk(const std::string& userProvidedUsr, const std::string& userProv
return true;
}
-/// Check for user / password set in loolwsd.xml.
+/// Check for user / password set in coolwsd.xml.
bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& userProvidedPwd)
{
const auto& config = Application::instance().config();
@@ -201,7 +201,7 @@ bool isConfigAuthOk(const std::string& userProvidedUsr, const std::string& userP
bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
HTTPResponse &response)
{
- assert(LOOLWSD::AdminEnabled);
+ assert(COOLWSD::AdminEnabled);
const auto& config = Application::instance().config();
@@ -259,9 +259,9 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
Poco::Net::HTTPCookie cookie("jwt", jwtToken);
// bundlify appears to add an extra /dist -> dist/dist/admin
- cookie.setPath(LOOLWSD::ServiceRoot + "/browser/dist/");
- cookie.setSecure(LOOLWSD::isSSLEnabled() ||
- LOOLWSD::isSSLTermination());
+ cookie.setPath(COOLWSD::ServiceRoot + "/browser/dist/");
+ cookie.setSecure(COOLWSD::isSSLEnabled() ||
+ COOLWSD::isSSLTermination());
response.addCookie(cookie);
return true;
@@ -289,7 +289,7 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
std::chrono::system_clock::time_point fileLastModifiedTime;
- enum class LOOLStatusCode
+ enum class COOLStatusCode
{
DocChanged = 1010 // Document changed externally in storage
};
@@ -428,7 +428,7 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
else if (request.getMethod() == "POST" && Util::endsWith(path.toString(), suffix))
{
int i = LocalFileInfo::getIndex(localPath);
- std::string wopiTimestamp = request.get("X-LOOL-WOPI-Timestamp", std::string());
+ std::string wopiTimestamp = request.get("X-COOL-WOPI-Timestamp", std::string());
if (!wopiTimestamp.empty())
{
const std::string fileModifiedTime = Util::getIso8601FracformatTime(LocalFileInfo::fileInfoVec[i].fileLastModifiedTime);
@@ -436,8 +436,8 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
{
http::Response httpResponse(http::StatusLine(409));
httpResponse.setBody(
- "{\"LOOLStatusCode\":" +
- std::to_string(static_cast<int>(LocalFileInfo::LOOLStatusCode::DocChanged)) + '}');
+ "{\"COOLStatusCode\":" +
+ std::to_string(static_cast<int>(LocalFileInfo::COOLStatusCode::DocChanged)) + '}');
socket->send(httpResponse);
return;
}
@@ -480,9 +480,9 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
LOG_TRC("Fileserver request: " << requestUri.toString());
requestUri.normalize(); // avoid .'s and ..'s
- if (requestUri.getPath().find("browser/" LOOLWSD_VERSION_HASH "/") == std::string::npos)
+ if (requestUri.getPath().find("browser/" COOLWSD_VERSION_HASH "/") == std::string::npos)
{
- LOG_WRN("client - server version mismatch, disabling browser cache. Expected: " LOOLWSD_VERSION_HASH);
+ LOG_WRN("client - server version mismatch, disabling browser cache. Expected: " COOLWSD_VERSION_HASH);
noCache = true;
}
@@ -495,7 +495,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
std::string endPoint = requestSegments[requestSegments.size() - 1];
const auto& config = Application::instance().config();
- static std::string etagString = "\"" LOOLWSD_VERSION_HASH +
+ static std::string etagString = "\"" COOLWSD_VERSION_HASH +
config.getString("ver_suffix", "") + "\"";
#if ENABLE_DEBUG
@@ -582,7 +582,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
{
noCache = true;
- if (!LOOLWSD::AdminEnabled)
+ if (!COOLWSD::AdminEnabled)
throw Poco::FileAccessDeniedException("Admin console disabled");
if (!FileServerRequestHandler::isAdminLoggedIn(request, response))
@@ -639,11 +639,11 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
bool gzip = request.hasToken("Accept-Encoding", "gzip");
const std::string *content;
#if ENABLE_DEBUG
- if (std::getenv("LOOL_SERVE_FROM_FS"))
+ if (std::getenv("COOL_SERVE_FROM_FS"))
{
// Useful to not serve from memory sometimes especially during cool development
// Avoids having to restart cool everytime you make a change in cool
- const std::string filePath = Poco::Path(LOOLWSD::FileServerRoot, relPath).absolute().toString();
+ const std::string filePath = Poco::Path(COOLWSD::FileServerRoot, relPath).absolute().toString();
HttpHelper::sendFileAndShutdown(socket, filePath, mimeType, &response, noCache);
return;
}
@@ -801,18 +801,18 @@ void FileServerRequestHandler::initialize()
{
// cool files
try {
- readDirToHash(LOOLWSD::FileServerRoot, "/browser/dist");
+ readDirToHash(COOLWSD::FileServerRoot, "/browser/dist");
} catch (...) {
- LOG_ERR("Failed to read from directory " << LOOLWSD::FileServerRoot);
+ LOG_ERR("Failed to read from directory " << COOLWSD::FileServerRoot);
}
// welcome / release notes files
- if (!LOOLWSD::WelcomeFilesRoot.empty())
+ if (!COOLWSD::WelcomeFilesRoot.empty())
{
try {
- readDirToHash(LOOLWSD::WelcomeFilesRoot, "", WELCOME_ENDPOINT);
+ readDirToHash(COOLWSD::WelcomeFilesRoot, "", WELCOME_ENDPOINT);
} catch (...) {
- LOG_ERR("Failed to read from directory " << LOOLWSD::WelcomeFilesRoot);
+ LOG_ERR("Failed to read from directory " << COOLWSD::WelcomeFilesRoot);
}
}
}
@@ -925,7 +925,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
Poco::replaceInPlace(preprocess, std::string("%ACCESS_TOKEN_TTL%"), std::to_string(tokenTtl));
Poco::replaceInPlace(preprocess, std::string("%ACCESS_HEADER%"), escapedAccessHeader);
Poco::replaceInPlace(preprocess, std::string("%HOST%"), cnxDetails.getWebSocketUrl());
- Poco::replaceInPlace(preprocess, std::string("%VERSION%"), std::string(LOOLWSD_VERSION_HASH));
+ Poco::replaceInPlace(preprocess, std::string("%VERSION%"), std::string(COOLWSD_VERSION_HASH));
Poco::replaceInPlace(preprocess, std::string("%SERVICE_ROOT%"), responseRoot);
Poco::replaceInPlace(preprocess, std::string("%UI_DEFAULTS%"), uiDefaultsToJSON(uiDefaults, userInterfaceMode));
Poco::replaceInPlace(preprocess, std::string("%POSTMESSAGE_ORIGIN%"), escapedPostmessageOrigin);
@@ -937,12 +937,12 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
Poco::replaceInPlace(preprocess, std::string("%PROTOCOL_DEBUG%"), protocolDebug);
static const std::string hexifyEmbeddedUrls =
- LOOLWSD::getConfigValue<bool>("hexify_embedded_urls", false) ? "true" : "false";
+ COOLWSD::getConfigValue<bool>("hexify_embedded_urls", false) ? "true" : "false";
Poco::replaceInPlace(preprocess, std::string("%HEXIFY_URL%"), hexifyEmbeddedUrls);
std::string themePreFix = (theme == "nextcloud") ? theme + "/" : "";
- const std::string linkCSS("<link rel=\"stylesheet\" href=\"%s/browser/" LOOLWSD_VERSION_HASH "/" + themePreFix + "%s.css\">");
- const std::string scriptJS("<script src=\"%s/browser/" LOOLWSD_VERSION_HASH "/" + themePreFix + "%s.js\"></script>");
+ const std::string linkCSS("<link rel=\"stylesheet\" href=\"%s/browser/" COOLWSD_VERSION_HASH "/" + themePreFix + "%s.css\">");
+ const std::string scriptJS("<script src=\"%s/browser/" COOLWSD_VERSION_HASH "/" + themePreFix + "%s.js\"></script>");
std::string brandCSS(Poco::format(linkCSS, responseRoot, std::string(BRANDING)));
std::string brandJS(Poco::format(scriptJS, responseRoot, std::string(BRANDING)));
@@ -1019,7 +1019,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
"font-src 'self' data:; "
"object-src 'self' blob:; ";
- // Frame ancestors: Allow loolwsd host, wopi host and anything configured.
+ // Frame ancestors: Allow coolwsd host, wopi host and anything configured.
std::string configFrameAncestor = config.getString("net.frame_ancestors", "");
std::string frameAncestors = configFrameAncestor;
Poco::URI uriHost(cnxDetails.getWebSocketUrl());
@@ -1069,7 +1069,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
"Last-Modified: " << Util::getHttpTimeNow() << "\r\n"
"User-Agent: " << WOPI_AGENT_STRING << "\r\n"
"Cache-Control:max-age=11059200\r\n"
- "ETag: \"" LOOLWSD_VERSION_HASH "\"\r\n"
+ "ETag: \"" COOLWSD_VERSION_HASH "\"\r\n"
"Content-Length: " << preprocess.size() << "\r\n"
"Content-Type: " << mimeType << "\r\n"
"X-Content-Type-Options: nosniff\r\n"
@@ -1080,7 +1080,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
oss << cspOss.str();
// Setup HTTP Public key pinning
- if ((LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination()) && config.getBool("ssl.hpkp[@enable]", false))
+ if ((COOLWSD::isSSLEnabled() || COOLWSD::isSSLTermination()) && config.getBool("ssl.hpkp[@enable]", false))
{
size_t i = 0;
std::string pinPath = "ssl.hpkp.pins.pin[" + std::to_string(i) + ']';
@@ -1149,7 +1149,7 @@ void FileServerRequestHandler::preprocessAdminFile(const HTTPRequest& request,
{
Poco::Net::HTTPResponse response;
- if (!LOOLWSD::AdminEnabled)
+ if (!COOLWSD::AdminEnabled)
throw Poco::FileAccessDeniedException("Admin console disabled");
if (!FileServerRequestHandler::isAdminLoggedIn(request, response))
@@ -1158,7 +1158,7 @@ void FileServerRequestHandler::preprocessAdminFile(const HTTPRequest& request,
ServerURL cnxDetails(requestDetails);
std::string responseRoot = cnxDetails.getResponseRoot();
- static const std::string scriptJS("<script src=\"%s/browser/" LOOLWSD_VERSION_HASH "/%s.js\"></script>");
+ static const std::string scriptJS("<script src=\"%s/browser/" COOLWSD_VERSION_HASH "/%s.js\"></script>");
static const std::string footerPage("<footer class=\"footer has-text-centered\"><strong>Key:</strong> %s &nbsp;&nbsp;<strong>Expiry Date:</strong> %s</footer>");
const std::string relPath = getRequestPathname(request);
@@ -1191,7 +1191,7 @@ void FileServerRequestHandler::preprocessAdminFile(const HTTPRequest& request,
Poco::replaceInPlace(templateFile, std::string("<!--%BRANDING_JS%-->"), brandJS);
Poco::replaceInPlace(templateFile, std::string("<!--%FOOTER%-->"), brandFooter);
- Poco::replaceInPlace(templateFile, std::string("%VERSION%"), std::string(LOOLWSD_VERSION_HASH));
+ Poco::replaceInPlace(templateFile, std::string("%VERSION%"), std::string(COOLWSD_VERSION_HASH));
Poco::replaceInPlace(templateFile, std::string("%SERVICE_ROOT%"), responseRoot);
// Ask UAs to block if they detect any XSS attempt
diff --git a/wsd/ProofKey.cpp b/wsd/ProofKey.cpp
index df5e52084e..ddb56d7a20 100644
--- a/wsd/ProofKey.cpp
+++ b/wsd/ProofKey.cpp
@@ -8,7 +8,7 @@
#include <config.h>
#include "ProofKey.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include <algorithm>
#include <cassert>
@@ -143,7 +143,7 @@ Proof::Proof()
"\n coolwsd-generate-proof-key"
"\nor if your config dir is not /etc, you can run ssh-keygen manually:"
"\n ssh-keygen -t rsa -N \"\" -m PEM -f \"" + keyPath + "\""
- "\nNote: the proof_key file must be readable by the loolwsd process.";
+ "\nNote: the proof_key file must be readable by the coolwsd process.";
LOG_WRN(msg);
}
catch (const Poco::Exception& e)
@@ -170,7 +170,7 @@ std::string Proof::ProofKeyPath()
#if ENABLE_DEBUG
DEBUG_ABSSRCDIR
#else
- LOOLWSD_CONFIGDIR
+ COOLWSD_CONFIGDIR
#endif
"/proof_key";
return keyPath;
diff --git a/wsd/ProxyProtocol.cpp b/wsd/ProxyProtocol.cpp
index 131d0181f2..7347ba5607 100644
--- a/wsd/ProxyProtocol.cpp
+++ b/wsd/ProxyProtocol.cpp
@@ -20,7 +20,7 @@
#include "ClientSession.hpp"
#include "ProxyProtocol.hpp"
#include "Exceptions.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include <Socket.hpp>
#include <atomic>
@@ -46,8 +46,8 @@ void DocumentBroker::handleProxyRequest(
std::make_shared<ProxyProtocolHandler>(),
id, uriPublic, isReadOnly, requestDetails);
addSession(clientSession);
- LOOLWSD::checkDiskSpaceAndWarnClients(true);
- LOOLWSD::checkSessionLimitsAndWarnClients();
+ COOLWSD::checkDiskSpaceAndWarnClients(true);
+ COOLWSD::checkSessionLimitsAndWarnClients();
const std::string &sessionId = clientSession->getOrCreateProxyAccess();
LOG_TRC("proxy: Returning sessionId " << sessionId);
diff --git a/wsd/QuarantineUtil.cpp b/wsd/QuarantineUtil.cpp
index d0c2e3d39f..621ae14f5e 100644
--- a/wsd/QuarantineUtil.cpp
+++ b/wsd/QuarantineUtil.cpp
@@ -10,7 +10,7 @@
#include <Poco/Path.h>
#include <Poco/URI.h>
#include "ClientSession.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "DocumentBroker.hpp"
#include <common/Common.hpp>
@@ -21,7 +21,7 @@ namespace Quarantine
{
bool isQuarantineEnabled()
{
- return LOOLWSD::getConfigValue<bool>("quarantine_files[@enable]", false);
+ return COOLWSD::getConfigValue<bool>("quarantine_files[@enable]", false);
}
void createQuarantineMap()
@@ -30,8 +30,8 @@ namespace Quarantine
return;
std::vector<std::string> files;
- Poco::File(LOOLWSD::QuarantinePath).list(files);
- LOOLWSD::QuarantineMap.clear();
+ Poco::File(COOLWSD::QuarantinePath).list(files);
+ COOLWSD::QuarantineMap.clear();
std::vector<StringToken> tokens;
std::string decoded;
@@ -42,7 +42,7 @@ namespace Quarantine
Util::tokenize(file.c_str(), file.size(), '_', tokens);
Poco::URI::decode(file.substr(tokens[2]._index), decoded);
- LOOLWSD::QuarantineMap[decoded].emplace_back(LOOLWSD::QuarantinePath + file);
+ COOLWSD::QuarantineMap[decoded].emplace_back(COOLWSD::QuarantinePath + file);
tokens.clear();
decoded.clear();
@@ -54,7 +54,7 @@ namespace Quarantine
if (!isQuarantineEnabled())
return;
- FileUtil::removeFile(LOOLWSD::QuarantinePath, true);
+ FileUtil::removeFile(COOLWSD::QuarantinePath, true);
}
// returns quarentine directory size in bytes
@@ -66,11 +66,11 @@ namespace Quarantine
return 0;
std::vector<std::string> files;
- Poco::File(LOOLWSD::QuarantinePath).list(files);
+ Poco::File(COOLWSD::QuarantinePath).list(files);
std::size_t size = 0;
for (auto file : files)
{
- FileUtil::Stat f(LOOLWSD::QuarantinePath + file);
+ FileUtil::Stat f(COOLWSD::QuarantinePath + file);
if (f.hardLinkCount() == 1)
size += f.size();
@@ -83,14 +83,14 @@ namespace Quarantine
if (!isQuarantineEnabled())
return;
- std::size_t sizeLimit = LOOLWSD::getConfigValue<std::size_t>("quarantine_files.limit_dir_size_mb", 0)*1024*1024;
+ std::size_t sizeLimit = COOLWSD::getConfigValue<std::size_t>("quarantine_files.limit_dir_size_mb", 0)*1024*1024;
std::vector<std::string> files;
- Poco::File(LOOLWSD::QuarantinePath).list(files);
+ Poco::File(COOLWSD::QuarantinePath).list(files);
std::sort(files.begin(), files.end());
- std::size_t timeLimit = LOOLWSD::getConfigValue<std::size_t>("quarantine_files.expiry_min", 30);
+ std::size_t timeLimit = COOLWSD::getConfigValue<std::size_t>("quarantine_files.expiry_min", 30);
const auto timeNow = std::chrono::system_clock::now();
const auto ts = std::chrono::duration_cast<std::chrono::seconds>(timeNow.time_since_epoch()).count();
@@ -98,14 +98,14 @@ namespace Quarantine
auto index = files.begin();
while (index != files.end() && !files.empty())
{
- FileUtil::Stat file(LOOLWSD::QuarantinePath + *index);
+ FileUtil::Stat file(COOLWSD::QuarantinePath + *index);
const auto modifyTime = std::chrono::duration_cast<std::chrono::seconds>(file.modifiedTimepoint().time_since_epoch()).count();
bool isExpired = static_cast<std::size_t>(ts - modifyTime) > timeLimit * 60;
if ( (file.hardLinkCount() == 1) && (isExpired || (currentSize >= sizeLimit)) )
{
currentSize -= file.size();
- FileUtil::removeFile(LOOLWSD::QuarantinePath + *index, true);
+ FileUtil::removeFile(COOLWSD::QuarantinePath + *index, true);
files.erase(index);
}
else
@@ -118,13 +118,13 @@ namespace Quarantine
if (!isQuarantineEnabled())
return;
- std::size_t maxVersionCount = LOOLWSD::getConfigValue<std::size_t>("quarantine_files.max_versions_to_maintain", 2);
+ std::size_t maxVersionCount = COOLWSD::getConfigValue<std::size_t>("quarantine_files.max_versions_to_maintain", 2);
std::string decoded;
Poco::URI::decode(Wopiscr, decoded);
- while (LOOLWSD::QuarantineMap[decoded].size() > maxVersionCount)
+ while (COOLWSD::QuarantineMap[decoded].size() > maxVersionCount)
{
- FileUtil::removeFile(LOOLWSD::QuarantineMap[decoded][0]);
- LOOLWSD::QuarantineMap[decoded].erase(LOOLWSD::QuarantineMap[decoded].begin());
+ FileUtil::removeFile(COOLWSD::QuarantineMap[decoded][0]);
+ COOLWSD::QuarantineMap[decoded].erase(COOLWSD::QuarantineMap[decoded].begin());
}
}
@@ -140,10 +140,10 @@ namespace Quarantine
const auto timeNow = std::chrono::system_clock::now();
const std::string ts = std::to_string(std::chrono::duration_cast<std::chrono::seconds>(timeNow.time_since_epoch()).count());
- std::string sourcefilePath = LOOLWSD::ChildRoot + "tmp/cool-" + docBroker->getJailId() + "/user/docs/" + docBroker->getJailId() + "/" + docName;
+ std::string sourcefilePath = COOLWSD::ChildRoot + "tmp/cool-" + docBroker->getJailId() + "/user/docs/" + docBroker->getJailId() + "/" + docName;
std::string linkedFileName = ts + "_" + std::to_string(docBroker->getPid()) + "_" + docKey;
- std::string linkedFilePath = LOOLWSD::QuarantinePath + linkedFileName;
+ std::string linkedFilePath = COOLWSD::QuarantinePath + linkedFileName;
FileUtil::Stat fileStat(linkedFilePath);
@@ -153,7 +153,7 @@ namespace Quarantine
if (result_link == 0)
{
- LOOLWSD::QuarantineMap[docBroker->getDocKey()].emplace_back(linkedFilePath);
+ COOLWSD::QuarantineMap[docBroker->getDocKey()].emplace_back(linkedFilePath);
clearOldQuarantineVersions(docKey);
makeQuarantineSpace();
diff --git a/wsd/README b/wsd/README
index 55e4a465ca..e7265404e5 100644
--- a/wsd/README
+++ b/wsd/README
@@ -30,7 +30,7 @@ See: https://www.collaboraoffice.com/code/linux-packages/
Building
--------
-loolwsd uses autoconf/automake, so especially when building from .git
+coolwsd uses autoconf/automake, so especially when building from .git
(as opposed to from a distribution tarball) you need to run:
./autogen.sh
@@ -94,10 +94,10 @@ chroot system, and directory for the jails:
./coolwsd-systemplate-setup ${SYSTEMPLATE} ${MASTER}/instdir # build template
mkdir -p ${ROOTFORJAILS} # create location for transient jails.
-To run loolwsd the way it is supposed to eventually be run "for real", you can
+To run coolwsd the way it is supposed to eventually be run "for real", you can
now do:
- ./loolwsd --o:sys_template_path=${SYSTEMPLATE} --o:child_root_path=${ROOTFORJAILS}
+ ./coolwsd --o:sys_template_path=${SYSTEMPLATE} --o:child_root_path=${ROOTFORJAILS}
The ${SYSTEMPLATE} is a directory tree set up using the
coolwsd-systemplate-setup script here. (It should not exist before
@@ -106,18 +106,18 @@ the LibreOffice dynamic libraries used through LibreOfficeKit.
Improvements to that script are very likely needed on various distros.
The ${ROOTFORJAILS} directory above is a presumably initially empty
-directory under which loolwsd will create chroot jails for editing
+directory under which coolwsd will create chroot jails for editing
each specific document.
-As loolwsd uses hardlinks to "copy" the contents of both
+As coolwsd uses hardlinks to "copy" the contents of both
${SYSTEMPLATE} and the ${MASTER}/instdir directories into each chroot
jail, ${SYSTEMPLATE} and ${MASTER}/instdir need to be on the same file
system as ${ROOTFORJAILS}.
-Leaflet files are served itself by loolwsd internal file server. You
+Leaflet files are served itself by coolwsd internal file server. You
can specify the root of this fileserver using the --o:file_server_root_path
-flag in loolwsd commandline. By default, if you do not specify this
-flag, the parent directory of loolwsd/ is assumed to be the
+flag in coolwsd commandline. By default, if you do not specify this
+flag, the parent directory of coolwsd/ is assumed to be the
file_server_root_path. So, for development purposes, you can access the
COOL files (using /browser/), but it is advised to explicitly set
the file_server_root_path to prevent any unwanted files from reading,
@@ -128,10 +128,10 @@ meant to be served is under a directory named 'browser'. Since, the
COOL files, in the git repo, are itself in a directory named
'browser', this would work out of the box for development purposes.
-If you run loolwsd on HTTPS, you have to set up your own private key
+If you run coolwsd on HTTPS, you have to set up your own private key
and certificates (in PEM format only). The name and location of key,
certificate and CA certificate chain is defined in
-${sysconfdir}/loolwsd/loolwsd.xml. Dummy self-signed cert.pem,
+${sysconfdir}/coolwsd/coolwsd.xml. Dummy self-signed cert.pem,
ca-chain.cert.pem and key.pem are already included, but it is better
to replace those with your own files.
@@ -174,8 +174,8 @@ there is a less verbose way, but this worked for me:
HTTPS is the default. HTTP-only mode can be enabled with --disable-ssl
configure option.
-If you plan to hack on loolwsd, you probably want to familiarize
-yourself with loolwsd's --o:num_prespawn_children switch, and the 'connect'
+If you plan to hack on coolwsd, you probably want to familiarize
+yourself with coolwsd's --o:num_prespawn_children switch, and the 'connect'
test program.
For interactive testing, you can use the 'connect' program. It accepts
@@ -197,8 +197,8 @@ http://localhost/nextcloud or at http://localhost/owncloud
go to Collabora Online settings, and set the WOPI URL to
http://localhost:9980
-Then in the build tree, edit the generated loolwsd.xml and set ssl setting to
-false. You can run make run, and test loolwsd with the ownCloud or Nextcloud
+Then in the build tree, edit the generated coolwsd.xml and set ssl setting to
+false. You can run make run, and test coolwsd with the ownCloud or Nextcloud
integration.
Admin Panel
@@ -208,7 +208,7 @@ You can access the admin panel by directly accessing the admin.html file
from browser directory. See browser/README for more details.
Websocket connections to admin console can be made at path: /adminws/ on the
-same url and port as loolwsd is running on. However, one needs a JWT token to
+same url and port as coolwsd is running on. However, one needs a JWT token to
authenticate to the admin console websocket. This is stored as a cookie with
`Path: /adminws/` when user successfully authenticates when trying to access
/browser/dist/admin/admin*html files (HTTP Basic authentication). Token
@@ -223,7 +223,7 @@ be obtained as described above.
Debugging
---------
-When debugging, you want to add --o:num_prespawn_children=1 to the loolwsd parameters to
+When debugging, you want to add --o:num_prespawn_children=1 to the coolwsd parameters to
limit the amount of concurrently running processes.
When the crash happens too early, you also want to
@@ -234,7 +234,7 @@ or
so that you have time to attach to the process.
-Then run loolwsd, and attach your debugger to the process you are
+Then run coolwsd, and attach your debugger to the process you are
interested in. Note that as the coolforkit executable file has
capabilities set, so when debugging that you need to run the debugger
with super-user privilege.
@@ -243,14 +243,14 @@ Also, note that as the child processes run in a chroot environment,
they see the LibreOffice shared libraries as being in a directory tree
/lo , but your debugger does not. So in order to be able to
effectively debug the LibreOffice code as used through LibreOfficeKit
-by a child loolwsd process, you need to symlink the "lo" subdirectory
-of a running child loolwsd process's chroot jail as /lo. Something like:
+by a child coolwsd process, you need to symlink the "lo" subdirectory
+of a running child coolwsd process's chroot jail as /lo. Something like:
-sudo ln -s ~/libreoffice/master/lool-child-roots/1046829984599121011/lo /lo
+sudo ln -s ~/libreoffice/master/cool-child-roots/1046829984599121011/lo /lo
Use the ps command to find out exactly the path to use.
-Set LOOL_DEBUG=1 to trap SIGSEGV and SEGBUS and prompt for debugger.
+Set COOL_DEBUG=1 to trap SIGSEGV and SEGBUS and prompt for debugger.
if you choose PAUSEFORDEBUGGER send the signal SIGUSR1 to resume the process
@@ -268,7 +268,7 @@ websocket.
Architecture
------------
-There are three processes: LoolWSD, CoolForKit, and LoolKit.
+There are three processes: CoolWSD, CoolForKit, and CoolKit.
WSD is the top-level server and is intended to run as a service.
It is responsible for spawning ForKit and listening on public
diff --git a/wsd/README.vars b/wsd/README.vars
index f15077ebd5..866eac527a 100644
--- a/wsd/README.vars
+++ b/wsd/README.vars
@@ -1,18 +1,18 @@
* Brief description of environment variables *
-LOOL_DEBUG <set/unset>
+COOL_DEBUG <set/unset>
if set handles a fatal signal by printing a message
containing the PID and waiting 30 seconds to allow
a 'sudo gdb' to be attached.
-LOOL_LOGLEVEL <level>
+COOL_LOGLEVEL <level>
set the log level & verbosity to <level> - values of
<level> are one of:
none (turns off logging), fatal, critical,
error, warning, notice, information, debug,
trace
-LOOL_NO_AUTOSAVE <set/unset>
+COOL_NO_AUTOSAVE <set/unset>
if set avoids automatic saving of the document being
edited.
@@ -25,11 +25,11 @@ SLEEPKITFORDEBUGGER <seconds to sleep>
to allow a 'sudo gdb' session to attach and debug that
process.
-LOOL_STORAGE_COOKIE <key:value>
+COOL_STORAGE_COOKIE <key:value>
Sets a cookie to all the requests made to storage. This is extremely useful for
debugging WOPI implementations. For eg: Using XDebug with OwnCloud/NextCloud.
-LOOL_SERVE_FROM_FS
+COOL_SERVE_FROM_FS
If mentioned, files are not loaded into the memory on start, instead they are
read from the filesystem. This can be helpful in COOL development
where you can tweak it without restarting wsd.
diff --git a/wsd/RequestDetails.cpp b/wsd/RequestDetails.cpp
index a15dd1c24c..0d779221c1 100644
--- a/wsd/RequestDetails.cpp
+++ b/wsd/RequestDetails.cpp
@@ -7,7 +7,7 @@
#include <config.h>
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "RequestDetails.hpp"
#include "common/Log.hpp"
diff --git a/wsd/RequestDetails.hpp b/wsd/RequestDetails.hpp
index 36e1ca0f8f..9da5de29f3 100644
--- a/wsd/RequestDetails.hpp
+++ b/wsd/RequestDetails.hpp
@@ -33,7 +33,7 @@
* cool URI: used to load cool.html and other static files.
* Origin: the page where the document will be embedded.
* Format:
- * /browser/<loolwsd-version-hash>/[path/]<filename>.<ext>[?WOPISrc=<encoded-document-URI>]
+ * /browser/<coolwsd-version-hash>/[path/]<filename>.<ext>[?WOPISrc=<encoded-document-URI>]
* Identifier: /browser/.
* Examples:
* /browser/49c225146/src/map/Clipboard.js
diff --git a/wsd/ServerURL.hpp b/wsd/ServerURL.hpp
index 26db1b6df8..85dfb27c7c 100644
--- a/wsd/ServerURL.hpp
+++ b/wsd/ServerURL.hpp
@@ -9,7 +9,7 @@
#include <string>
#include "RequestDetails.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
/** This class helps us to build a URL that will reliably point back
* at our service. It does very simple splitting of proxy URL
@@ -36,11 +36,11 @@ public:
void init(const std::string &host, const std::string &proxyPrefix)
{
// The user can override the ServerRoot with a new prefix.
- _pathPlus = LOOLWSD::ServiceRoot;
+ _pathPlus = COOLWSD::ServiceRoot;
- _ssl = (LOOLWSD::isSSLEnabled() || LOOLWSD::isSSLTermination());
+ _ssl = (COOLWSD::isSSLEnabled() || COOLWSD::isSSLTermination());
_websocket = true;
- std::string serverName = LOOLWSD::ServerName.empty() ? host : LOOLWSD::ServerName;
+ std::string serverName = COOLWSD::ServerName.empty() ? host : COOLWSD::ServerName;
_schemeAuthority = serverName;
// A well formed ProxyPrefix will override it.
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index d89b60a3c3..9f3376c257 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -131,11 +131,11 @@ void StorageBase::initialize()
// false default for upgrade to preserve legacy configuration
// in-config-file defaults are true.
- SSLAsScheme = LOOLWSD::getConfigValue<bool>("storage.ssl.as_scheme", false);
+ SSLAsScheme = COOLWSD::getConfigValue<bool>("storage.ssl.as_scheme", false);
// Fallback to ssl.enable if not set - for back compatibility & simplicity.
- SSLEnabled = LOOLWSD::getConfigValue<bool>(
- "storage.ssl.enable", LOOLWSD::getConfigValue<bool>("ssl.enable", true));
+ SSLEnabled = COOLWSD::getConfigValue<bool>(
+ "storage.ssl.enable", COOLWSD::getConfigValue<bool>("ssl.enable", true));
#if ENABLE_DEBUG
char *StorageSSLEnabled = getenv("STORAGE_SSL_ENABLE");
@@ -150,10 +150,10 @@ void StorageBase::initialize()
if (SSLEnabled)
{
- sslClientParams.certificateFile = LOOLWSD::getPathFromConfigWithFallback("storage.ssl.cert_file_path", "ssl.cert_file_path");
- sslClientParams.privateKeyFile = LOOLWSD::getPathFromConfigWithFallback("storage.ssl.key_file_path", "ssl.key_file_path");
- sslClientParams.caLocation = LOOLWSD::getPathFromConfigWithFallback("storage.ssl.ca_file_path", "ssl.ca_file_path");
- sslClientParams.cipherList = LOOLWSD::getPathFromConfigWithFallback("storage.ssl.cipher_list", "ssl.cipher_list");
+ sslClientParams.certificateFile = COOLWSD::getPathFromConfigWithFallback("storage.ssl.cert_file_path", "ssl.cert_file_path");
+ sslClientParams.privateKeyFile = COOLWSD::getPathFromConfigWithFallback("storage.ssl.key_file_path", "ssl.key_file_path");
+ sslClientParams.caLocation = COOLWSD::getPathFromConfigWithFallback("storage.ssl.ca_file_path", "ssl.ca_file_path");
+ sslClientParams.cipherList = COOLWSD::getPathFromConfigWithFallback("storage.ssl.cipher_list", "ssl.cipher_list");
sslClientParams.verificationMode = (sslClientParams.caLocation.empty() ? Poco::Net::Context::VERIFY_NONE : Poco::Net::Context::VERIFY_STRICT);
sslClientParams.loadDefaultCAs = true;
@@ -231,7 +231,7 @@ std::unique_ptr<StorageBase> StorageBase::create(const Poco::URI& uri, const std
}
else if (uri.isRelative() || uri.getScheme() == "file")
{
- LOG_INF("Public URI [" << LOOLWSD::anonymizeUrl(uri.toString()) << "] is a file.");
+ LOG_INF("Public URI [" << COOLWSD::anonymizeUrl(uri.toString()) << "] is a file.");
#if ENABLE_DEBUG
if (std::getenv("FAKE_UNAUTHORIZED"))
@@ -251,7 +251,7 @@ std::unique_ptr<StorageBase> StorageBase::create(const Poco::URI& uri, const std
#if !MOBILEAPP
else if (WopiEnabled)
{
- LOG_INF("Public URI [" << LOOLWSD::anonymizeUrl(uri.toString()) << "] considered WOPI.");
+ LOG_INF("Public URI [" << COOLWSD::anonymizeUrl(uri.toString()) << "] considered WOPI.");
const auto& targetHost = uri.getHost();
bool allowed(false);
if (WopiHosts.match(targetHost) || isLocalhost(targetHost))
@@ -285,7 +285,7 @@ std::atomic<unsigned> LocalStorage::LastLocalStorageId;
std::unique_ptr<LocalStorage::LocalFileInfo> LocalStorage::getLocalFileInfo()
{
const Poco::Path path = getUri().getPath();
- LOG_DBG("Getting info for local uri [" << LOOLWSD::anonymizeUrl(getUri().toString()) << "], path [" << LOOLWSD::anonymizeUrl(path.toString()) << "].");
+ LOG_DBG("Getting info for local uri [" << COOLWSD::anonymizeUrl(getUri().toString()) << "], path [" << COOLWSD::anonymizeUrl(path.toString()) << "].");
const FileUtil::Stat stat(path.toString());
const std::chrono::system_clock::time_point lastModified = stat.modifiedTimepoint();
@@ -316,8 +316,8 @@ std::string LocalStorage::downloadStorageFileToLocal(const Authorization& /*auth
// /chroot/jailId/user/doc/childId/file.ext
const std::string filename = Poco::Path(getUri().getPath()).getFileName();
setRootFilePath(Poco::Path(getLocalRootPath(), filename).toString());
- setRootFilePathAnonym(LOOLWSD::anonymizeUrl(getRootFilePath()));
- LOG_INF("Public URI [" << LOOLWSD::anonymizeUrl(getUri().getPath()) <<
+ setRootFilePathAnonym(COOLWSD::anonymizeUrl(getRootFilePath()));
+ LOG_INF("Public URI [" << COOLWSD::anonymizeUrl(getUri().getPath()) <<
"] jailed to [" << getRootFilePathAnonym() << "].");
// Despite the talk about URIs it seems that _uri is actually just a pathname here
@@ -347,7 +347,7 @@ std::string LocalStorage::downloadStorageFileToLocal(const Authorization& /*auth
}
catch (const Poco::Exception& exc)
{
- LOG_ERR("Failed to move [" << LOOLWSD::anonymizeUrl(publicFilePath) << "] to ["
+ LOG_ERR("Failed to move [" << COOLWSD::anonymizeUrl(publicFilePath) << "] to ["
<< getRootFilePathAnonym() << "]: " << exc.displayText());
}
}
@@ -355,13 +355,13 @@ std::string LocalStorage::downloadStorageFileToLocal(const Authorization& /*auth
if (!FileUtil::Stat(getRootFilePath()).exists())
{
// Try to link.
- LOG_INF("Linking " << LOOLWSD::anonymizeUrl(publicFilePath) << " to "
+ LOG_INF("Linking " << COOLWSD::anonymizeUrl(publicFilePath) << " to "
<< getRootFilePathAnonym());
if (!Poco::File(getRootFilePath()).exists()
&& link(publicFilePath.c_str(), getRootFilePath().c_str()) == -1)
{
// Failed
- LOG_INF("link(\"" << LOOLWSD::anonymizeUrl(publicFilePath) << "\", \""
+ LOG_INF("link(\"" << COOLWSD::anonymizeUrl(publicFilePath) << "\", \""
<< getRootFilePathAnonym() << "\") failed. Will copy. Linking error: "
<< Util::symbolicErrno(errno) << ' ' << strerror(errno));
}
@@ -378,7 +378,7 @@ std::string LocalStorage::downloadStorageFileToLocal(const Authorization& /*auth
}
catch (const Poco::Exception& exc)
{
- LOG_ERR("copyTo(\"" << LOOLWSD::anonymizeUrl(publicFilePath) << "\", \""
+ LOG_ERR("copyTo(\"" << COOLWSD::anonymizeUrl(publicFilePath) << "\", \""
<< getRootFilePathAnonym() << "\") failed: " << exc.displayText());
throw;
}
@@ -387,7 +387,7 @@ std::string LocalStorage::downloadStorageFileToLocal(const Authorization& /*auth
// Now return the jailed path.
#ifndef KIT_IN_PROCESS
- if (LOOLWSD::NoCapsForKit)
+ if (COOLWSD::NoCapsForKit)
return getRootFilePath();
else
return Poco::Path(getJailPath(), filename).toString();
@@ -427,7 +427,7 @@ LocalStorage::uploadLocalFileToStorage(const Authorization& /*auth*/, LockContex
}
catch (const Poco::Exception& exc)
{
- LOG_ERR("copyTo(\"" << getRootFilePathAnonym() << "\", \"" << LOOLWSD::anonymizeUrl(path)
+ LOG_ERR("copyTo(\"" << getRootFilePathAnonym() << "\", \"" << COOLWSD::anonymizeUrl(path)
<< "\") failed: " << exc.displayText());
return UploadResult(UploadResult::Result::FAILED, "Internal error.");
}
@@ -451,7 +451,7 @@ Poco::Net::HTTPClientSession* StorageBase::getHTTPClientSession(const Poco::URI&
// We decoupled the Wopi communication from client communication because
// the Wopi communication must have an independent policy.
// So, we will use here only Storage settings.
- useSSL = SSLEnabled || LOOLWSD::isSSLTermination();
+ useSSL = SSLEnabled || COOLWSD::isSSLTermination();
}
// We decoupled the Wopi communication from client communication because
// the Wopi communication must have an independent policy.
@@ -462,7 +462,7 @@ Poco::Net::HTTPClientSession* StorageBase::getHTTPClientSession(const Poco::URI&
: new Poco::Net::HTTPClientSession(uri.getHost(), uri.getPort());
// Set the timeout to the configured value.
- static int timeoutSec = LOOLWSD::getConfigValue<int>("net.connection_timeout_secs", 30);
+ static int timeoutSec = COOLWSD::getConfigValue<int>("net.connection_timeout_secs", 30);
session->setTimeout(Poco::Timespan(timeoutSec, 0));
return session;
@@ -482,7 +482,7 @@ std::shared_ptr<http::Session> StorageBase::getHttpSession(const Poco::URI& uri)
// We decoupled the Wopi communication from client communication because
// the Wopi communication must have an independent policy.
// So, we will use here only Storage settings.
- useSSL = SSLEnabled || LOOLWSD::isSSLTermination();
+ useSSL = SSLEnabled || COOLWSD::isSSLTermination();
}
const auto protocol
@@ -491,7 +491,7 @@ std::shared_ptr<http::Session> StorageBase::getHttpSession(const Poco::URI& uri)
// Create the session.
auto httpSession = http::Session::create(uri.getHost(), protocol, uri.getPort());
- static int timeoutSec = LOOLWSD::getConfigValue<int>("net.connection_timeout_secs", 30);
+ static int timeoutSec = COOLWSD::getConfigValue<int>("net.connection_timeout_secs", 30);
httpSession->setTimeout(std::chrono::seconds(timeoutSec));
return httpSession;
@@ -504,10 +504,10 @@ static void addStorageDebugCookie(Poco::Net::HTTPRequest& request)
{
(void) request;
#if ENABLE_DEBUG
- if (std::getenv("LOOL_STORAGE_COOKIE"))
+ if (std::getenv("COOL_STORAGE_COOKIE"))
{
Poco::Net::NameValueCollection nvcCookies;
- StringVector cookieTokens = Util::tokenize(std::string(std::getenv("LOOL_STORAGE_COOKIE")), ':');
+ StringVector cookieTokens = Util::tokenize(std::string(std::getenv("COOL_STORAGE_COOKIE")), ':');
if (cookieTokens.size() == 2)
{
nvcCookies.add(cookieTokens[0], cookieTokens[1]);
@@ -555,7 +555,7 @@ void LockContext::initSupportsLocks()
bool LockContext::needsRefresh(const std::chrono::steady_clock::time_point &now) const
{
- static int refreshSeconds = LOOLWSD::getConfigValue<int>("storage.wopi.locking.refresh", 900);
+ static int refreshSeconds = COOLWSD::getConfigValue<int>("storage.wopi.locking.refresh", 900);
return _supportsLocks && _isLocked && refreshSeconds > 0 &&
std::chrono::duration_cast<std::chrono::seconds>
(now - _lastLockTime).count() >= refreshSeconds;
@@ -589,7 +589,7 @@ void WopiStorage::initHttpRequest(Poco::Net::HTTPRequest& request, const Poco::U
addWopiProof(request, uri, it->second);
// Helps wrt. debugging cluster cases from the logs
- request.set("X-LOOL-WOPI-ServerId", Util::getProcessIdentifier());
+ request.set("X-COOL-WOPI-ServerId", Util::getProcessIdentifier());
}
http::Request WopiStorage::initHttpRequest(const Poco::URI& uri, const Authorization& auth) const
@@ -617,7 +617,7 @@ WopiStorage::getWOPIFileInfoForUri(Poco::URI uriObject, const Authorization& aut
// update the access_token to the one matching to the session
auth.authorizeURI(uriObject);
- const std::string uriAnonym = LOOLWSD::anonymizeUrl(uriObject.toString());
+ const std::string uriAnonym = COOLWSD::anonymizeUrl(uriObject.toString());
LOG_DBG("Getting info for wopi uri [" << uriAnonym << "].");
@@ -656,7 +656,7 @@ WopiStorage::getWOPIFileInfoForUri(Poco::URI uriObject, const Authorization& aut
if (redirectLimit)
{
const std::string& location = httpResponse->get("Location");
- LOG_TRC("WOPI::CheckFileInfo redirect to URI [" << LOOLWSD::anonymizeUrl(location) << "]");
+ LOG_TRC("WOPI::CheckFileInfo redirect to URI [" << COOLWSD::anonymizeUrl(location) << "]");
Poco::URI redirectUriObject(location);
setUri(redirectUriObject);
@@ -713,7 +713,7 @@ WopiStorage::getWOPIFileInfoForUri(Poco::URI uriObject, const Authorization& aut
Poco::JSON::Object::Ptr object;
if (JsonUtil::parseJSON(wopiResponse, object))
{
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
LOG_DBG("WOPI::CheckFileInfo (" << callDurationMs << "): anonymizing...");
else
LOG_DBG("WOPI::CheckFileInfo (" << callDurationMs << "): " << wopiResponse);
@@ -730,7 +730,7 @@ WopiStorage::getWOPIFileInfoForUri(Poco::URI uriObject, const Authorization& aut
FileInfo fileInfo = FileInfo({filename, ownerId, modifiedTime, size});
setFileInfo(fileInfo);
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
Util::mapAnonymized(Util::getFilenameFromURL(filename), Util::getFilenameFromURL(getUri().toString()));
auto wopiInfo = Util::make_unique<WopiStorage::WOPIFileInfo>(fileInfo, callDurationMs, object);
@@ -744,7 +744,7 @@ WopiStorage::getWOPIFileInfoForUri(Poco::URI uriObject, const Authorization& aut
}
else
{
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
wopiResponse = "obfuscated";
LOG_ERR("WOPI::CheckFileInfo ("
@@ -818,7 +818,7 @@ WopiStorage::WOPIFileInfo::WOPIFileInfo(const FileInfo &fileInfo,
std::ostringstream wopiResponse;
// Anonymize key values.
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
{
JsonUtil::findJSONValue(object, "ObfuscatedUserId", _obfuscatedUserId, false);
if (!_obfuscatedUserId.empty())
@@ -832,15 +832,15 @@ WopiStorage::WOPIFileInfo::WOPIFileInfo(const FileInfo &fileInfo,
// Set anonymized version of the above fields before logging.
// Note: anonymization caches the result, so we don't need to store here.
- if (LOOLWSD::AnonymizeUserData)
- anonObject->set("BaseFileName", LOOLWSD::anonymizeUrl(filename));
+ if (COOLWSD::AnonymizeUserData)
+ anonObject->set("BaseFileName", COOLWSD::anonymizeUrl(filename));
// If obfuscatedUserId is provided, then don't log the originals and use it.
- if (LOOLWSD::AnonymizeUserData && _obfuscatedUserId.empty())
+ if (COOLWSD::AnonymizeUserData && _obfuscatedUserId.empty())
{
- anonObject->set("OwnerId", LOOLWSD::anonymizeUsername(ownerId));
- anonObject->set("UserId", LOOLWSD::anonymizeUsername(_userId));
- anonObject->set("UserFriendlyName", LOOLWSD::anonymizeUsername(_username));
+ anonObject->set("OwnerId", COOLWSD::anonymizeUsername(ownerId));
+ anonObject->set("UserId", COOLWSD::anonymizeUsername(_userId));
+ anonObject->set("UserFriendlyName", COOLWSD::anonymizeUsername(_username));
}
anonObject->stringify(wopiResponse);
}
@@ -888,7 +888,7 @@ WopiStorage::WOPIFileInfo::WOPIFileInfo(const FileInfo &fileInfo,
_hideChangeTrackingControls = (booleanFlag ? WOPIFileInfo::TriState::True : WOPIFileInfo::TriState::False);
static const std::string overrideWatermarks
- = LOOLWSD::getConfigValue<std::string>("watermark.text", "");
+ = COOLWSD::getConfigValue<std::string>("watermark.text", "");
if (!overrideWatermarks.empty())
_watermarkText = overrideWatermarks;
}
@@ -903,7 +903,7 @@ bool WopiStorage::updateLockState(const Authorization& auth, LockContext& lockCt
auth.authorizeURI(uriObject);
Poco::URI uriObjectAnonym(getUri());
- uriObjectAnonym.setPath(LOOLWSD::anonymizeUrl(uriObjectAnonym.getPath()));
+ uriObjectAnonym.setPath(COOLWSD::anonymizeUrl(uriObjectAnonym.getPath()));
const std::string uriAnonym = uriObjectAnonym.toString();
const std::string wopiLog(lock ? "WOPI::Lock" : "WOPI::Unlock");
@@ -921,7 +921,7 @@ bool WopiStorage::updateLockState(const Authorization& auth, LockContext& lockCt
request.set("X-WOPI-Override", lock ? "LOCK" : "UNLOCK");
request.set("X-WOPI-Lock", lockCtx._lockToken);
if (!getExtendedData().empty())
- request.set("X-LOOL-WOPI-ExtendedData", getExtendedData());
+ request.set("X-COOL-WOPI-ExtendedData", getExtendedData());
// IIS requires content-length for POST requests: see https://forums.iis.net/t/1119456.aspx
request.setContentLength(0);
@@ -978,7 +978,7 @@ std::string WopiStorage::downloadStorageFileToLocal(const Authorization& auth,
{
// Download the template file and load it normally.
// The document will get saved once loading in Core is complete.
- const std::string templateUriAnonym = LOOLWSD::anonymizeUrl(templateUri);
+ const std::string templateUriAnonym = COOLWSD::anonymizeUrl(templateUri);
try
{
LOG_INF("WOPI::GetFile template source: " << templateUriAnonym);
@@ -997,7 +997,7 @@ std::string WopiStorage::downloadStorageFileToLocal(const Authorization& auth,
// First try the FileUrl, if provided.
if (!_fileUrl.empty())
{
- const std::string fileUrlAnonym = LOOLWSD::anonymizeUrl(_fileUrl);
+ const std::string fileUrlAnonym = COOLWSD::anonymizeUrl(_fileUrl);
try
{
LOG_INF("WOPI::GetFile using FileUrl: " << fileUrlAnonym);
@@ -1019,7 +1019,7 @@ std::string WopiStorage::downloadStorageFileToLocal(const Authorization& auth,
auth.authorizeURI(uriObject);
Poco::URI uriObjectAnonym(getUri());
- uriObjectAnonym.setPath(LOOLWSD::anonymizeUrl(uriObjectAnonym.getPath()) + "/contents");
+ uriObjectAnonym.setPath(COOLWSD::anonymizeUrl(uriObjectAnonym.getPath()) + "/contents");
const std::string uriAnonym = uriObjectAnonym.toString();
try
@@ -1052,7 +1052,7 @@ std::string WopiStorage::downloadDocument(const Poco::URI& uriObject, const std:
http::Request httpRequest = initHttpRequest(uriObject, auth);
setRootFilePath(Poco::Path(getLocalRootPath(), getFileInfo().getFilename()).toString());
- setRootFilePathAnonym(LOOLWSD::anonymizeUrl(getRootFilePath()));
+ setRootFilePathAnonym(COOLWSD::anonymizeUrl(getRootFilePath()));
LOG_TRC("Downloading from [" << uriAnonym << "] to [" << getRootFilePath()
<< "]: " << httpRequest.header().toString());
@@ -1085,7 +1085,7 @@ std::string WopiStorage::downloadDocument(const Poco::URI& uriObject, const std:
if (redirectLimit)
{
const std::string& location = httpResponse->get("Location");
- LOG_TRC("WOPI::GetFile redirect to URI [" << LOOLWSD::anonymizeUrl(location) << "]");
+ LOG_TRC("WOPI::GetFile redirect to URI [" << COOLWSD::anonymizeUrl(location) << "]");
Poco::URI redirectUriObject(location);
return downloadDocument(redirectUriObject, uriAnonym, auth, redirectLimit - 1);
@@ -1113,7 +1113,7 @@ std::string WopiStorage::downloadDocument(const Poco::URI& uriObject, const std:
setDownloaded(true);
// Now return the jailed path.
- if (LOOLWSD::NoCapsForKit)
+ if (COOLWSD::NoCapsForKit)
return getRootFilePath();
else
return Poco::Path(getJailPath(), getFileInfo().getFilename()).toString();
@@ -1169,7 +1169,7 @@ void WopiStorage::uploadLocalFileToStorageAsync(const Authorization& auth, LockC
const bool isSaveAs = !saveAsPath.empty() && !saveAsFilename.empty();
const std::string filePath(isSaveAs ? saveAsPath : getRootFilePathUploading());
- const std::string filePathAnonym = LOOLWSD::anonymizeUrl(filePath);
+ const std::string filePathAnonym = COOLWSD::anonymizeUrl(filePath);
const FileUtil::Stat fileStat(filePath);
if (!fileStat.good())
@@ -1188,7 +1188,7 @@ void WopiStorage::uploadLocalFileToStorageAsync(const Authorization& auth, LockC
: uriObject.getPath() + "/contents");
auth.authorizeURI(uriObject);
- const std::string uriAnonym = LOOLWSD::anonymizeUrl(uriObject.toString());
+ const std::string uriAnonym = COOLWSD::anonymizeUrl(uriObject.toString());
LOG_INF("Uploading " << size << " bytes from [" << filePathAnonym << "] to URI via WOPI ["
<< uriAnonym << "].");
@@ -1212,18 +1212,18 @@ void WopiStorage::uploadLocalFileToStorageAsync(const Authorization& auth, LockC
{
// normal save
httpHeader.set("X-WOPI-Override", "PUT");
- httpHeader.set("X-LOOL-WOPI-IsModifiedByUser", isUserModified() ? "true" : "false");
- httpHeader.set("X-LOOL-WOPI-IsAutosave", isAutosave() ? "true" : "false");
- httpHeader.set("X-LOOL-WOPI-IsExitSave", isExitSave() ? "true" : "false");
+ httpHeader.set("X-COOL-WOPI-IsModifiedByUser", isUserModified() ? "true" : "false");
+ httpHeader.set("X-COOL-WOPI-IsAutosave", isAutosave() ? "true" : "false");
+ httpHeader.set("X-COOL-WOPI-IsExitSave", isExitSave() ? "true" : "false");
if (isExitSave())
httpHeader.set("Connection", "close"); // Don't maintain the socket if we are exiting.
if (!getExtendedData().empty())
- httpHeader.set("X-LOOL-WOPI-ExtendedData", getExtendedData());
+ httpHeader.set("X-COOL-WOPI-ExtendedData", getExtendedData());
if (!getForceSave())
{
// Request WOPI host to not overwrite if timestamps mismatch
- httpHeader.set("X-LOOL-WOPI-Timestamp",
+ httpHeader.set("X-COOL-WOPI-Timestamp",
Util::getIso8601FracformatTime(getFileInfo().getModifiedTime()));
}
}
@@ -1358,7 +1358,7 @@ WopiStorage::handleUploadToStorageResponse(const WopiUploadDetails& details,
if (Log::infoEnabled())
{
- if (LOOLWSD::AnonymizeUserData)
+ if (COOLWSD::AnonymizeUserData)
{
Poco::JSON::Object::Ptr object;
if (JsonUtil::parseJSON(responseString, object))
@@ -1378,7 +1378,7 @@ WopiStorage::handleUploadToStorageResponse(const WopiUploadDetails& details,
const std::string filenameOnly = Util::getFilenameFromURL(filename);
Util::mapAnonymized(filenameOnly, obfuscatedFileId);
- object->set("Name", LOOLWSD::anonymizeUrl(filename));
+ object->set("Name", COOLWSD::anonymizeUrl(filename));
}
// Stringify to log.
@@ -1409,10 +1409,10 @@ WopiStorage::handleUploadToStorageResponse(const WopiUploadDetails& details,
if (details.isSaveAs || details.isRename)
{
const std::string name = JsonUtil::getJSONValue<std::string>(object, "Name");
- LOG_TRC(wopiLog << " returns Name [" << LOOLWSD::anonymizeUrl(name) << "].");
+ LOG_TRC(wopiLog << " returns Name [" << COOLWSD::anonymizeUrl(name) << "].");
const std::string url = JsonUtil::getJSONValue<std::string>(object, "Url");
- LOG_TRC(wopiLog << " returns Url [" << LOOLWSD::anonymizeUrl(url) << "].");
+ LOG_TRC(wopiLog << " returns Url [" << COOLWSD::anonymizeUrl(url) << "].");
result.setSaveAsResult(name, url);
}
@@ -1440,9 +1440,9 @@ WopiStorage::handleUploadToStorageResponse(const WopiUploadDetails& details,
Poco::JSON::Object::Ptr object;
if (JsonUtil::parseJSON(origResponseString, object))
{
- const unsigned loolStatusCode
- = JsonUtil::getJSONValue<unsigned>(object, "LOOLStatusCode");
- if (loolStatusCode == static_cast<unsigned>(LOOLStatusCode::DOC_CHANGED))
+ const unsigned coolStatusCode
+ = JsonUtil::getJSONValue<unsigned>(object, "COOLStatusCode");
+ if (coolStatusCode == static_cast<unsigned>(COOLStatusCode::DOC_CHANGED))
{
result.setResult(StorageBase::UploadResult::Result::DOC_CHANGED);
}
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index b007cff4f7..4bdc8aeaad 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -19,7 +19,7 @@
#include "Auth.hpp"
#include "HttpRequest.hpp"
-#include "LOOLWSD.hpp"
+#include "COOLWSD.hpp"
#include "Log.hpp"
#include "Util.hpp"
#include <common/Authorization.hpp>
@@ -185,7 +185,7 @@ public:
UploadResult _result;
};
- enum class LOOLStatusCode
+ enum class COOLStatusCode
{
DOC_CHANGED = 1010 // Document changed externally in storage
};
@@ -205,7 +205,7 @@ public:
_isExitSave(false)
{
setUri(uri);
- LOG_DBG("Storage ctor: " << LOOLWSD::anonymizeUrl(_uri.toString()));
+ LOG_DBG("Storage ctor: " << COOLWSD::anonymizeUrl(_uri.toString()));
}
virtual ~StorageBase() {}
@@ -404,7 +404,7 @@ public:
, _isCopy(false)
{
LOG_INF("LocalStorage ctor with localStorePath: [" << localStorePath <<
- "], jailPath: [" << jailPath << "], uri: [" << LOOLWSD::anonymizeUrl(uri.toString()) << "].");
+ "], jailPath: [" << jailPath << "], uri: [" << COOLWSD::anonymizeUrl(uri.toString()) << "].");
}
class LocalFileInfo
@@ -463,7 +463,7 @@ public:
{
LOG_INF("WopiStorage ctor with localStorePath: ["
<< localStorePath << "], jailPath: [" << jailPath << "], uri: ["
- << LOOLWSD::anonymizeUrl(uri.toString()) << ']');
+ << COOLWSD::anonymizeUrl(uri.toString()) << ']');
}
class WOPIFileInfo
diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index 90219865de..320499efc4 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -28,7 +28,7 @@
#include <Util.hpp>
#include <common/FileUtil.hpp>
-using namespace LOOLProtocol;
+using namespace COOLProtocol;
TileCache::TileCache(std::string docURL, const std::chrono::system_clock::time_point& modifiedTime,
bool dontCache)
@@ -38,7 +38,7 @@ TileCache::TileCache(std::string docURL, const std::chrono::system_clock::time_p
, _maxCacheSize(512 * 1024)
{
#ifndef BUILDING_TESTS
- LOG_INF("TileCache ctor for uri [" << LOOLWSD::anonymizeUrl(_docURL) <<
+ LOG_INF("TileCache ctor for uri [" << COOLWSD::anonymizeUrl(_docURL) <<
"], modifiedTime=" << std::chrono::duration_cast<std::chrono::seconds>
(modifiedTime.time_since_epoch()).count() << "], dontCache=" << _dontCache);
#endif
@@ -49,7 +49,7 @@ TileCache::~TileCache()
{
_owner = std::thread::id();
#ifndef BUILDING_TESTS
- LOG_INF("~TileCache dtor for uri [" << LOOLWSD::anonymizeUrl(_docURL) << "].");
+ LOG_INF("~TileCache dtor for uri [" << COOLWSD::anonymizeUrl(_docURL) << "].");
#endif
}
@@ -259,7 +259,7 @@ bool TileCache::getTextStream(StreamType type, const std::string& fileName, std:
buffer.pop_back();
content = std::string(buffer.data(), buffer.size());
- LOG_INF("Read '" << LOOLProtocol::getAbbreviatedMessage(content.c_str(), content.size()) <<
+ LOG_INF("Read '" << COOLProtocol::getAbbreviatedMessage(content.c_str(), content.size()) <<
"' from " << fileName);
return true;
@@ -267,7 +267,7 @@ bool TileCache::getTextStream(StreamType type, const std::string& fileName, std:
void TileCache::saveTextStream(StreamType type, const std::string& text, const std::string& fileName)
{
- LOG_INF("Saving '" << LOOLProtocol::getAbbreviatedMessage(text.c_str(), text.size()) <<
+ LOG_INF("Saving '" << COOLProtocol::getAbbreviatedMessage(text.c_str(), text.size()) <<
"' to " << fileName << " of size " << text.size() << " bytes");
saveDataToStreamCache(type, fileName, text.c_str(), text.size());
diff --git a/wsd/TileDesc.hpp b/wsd/TileDesc.hpp
index d1cbf2062a..776bb35b94 100644
--- a/wsd/TileDesc.hpp
+++ b/wsd/TileDesc.hpp
@@ -231,7 +231,7 @@ public:
}
std::string s;
- const bool broadcast = (LOOLProtocol::getTokenString(tokens, "broadcast", s) &&
+ const bool broadcast = (COOLProtocol::getTokenString(tokens, "broadcast", s) &&
s == "yes");
TileDesc result(pairs["nviewid"], pairs["part"], pairs["width"], pairs["height"],
@@ -326,37 +326,37 @@ private:
for (std::size_t i = 0; i < numberOfPositions; ++i)
{
int x = 0;
- if (!LOOLProtocol::stringToInteger(positionXtokens[i], x))
+ if (!COOLProtocol::stringToInteger(positionXtokens[i], x))
{
throw BadArgumentException("Invalid 'tileposx' in tilecombine descriptor.");
}
int y = 0;
- if (!LOOLProtocol::stringToInteger(positionYtokens[i], y))
+ if (!COOLProtocol::stringToInteger(positionYtokens[i], y))
{
throw BadArgumentException("Invalid 'tileposy' in tilecombine descriptor.");
}
int imgSize = 0;
- if (!imgSizeTokens.empty() && !LOOLProtocol::stringToInteger(imgSizeTokens[i], imgSize))
+ if (!imgSizeTokens.empty() && !COOLProtocol::stringToInteger(imgSizeTokens[i], imgSize))
{
throw BadArgumentException("Invalid 'imgsize' in tilecombine descriptor.");
}
int ver = -1;
- if (!verTokens.empty() && !verTokens[i].empty() && !LOOLProtocol::stringToInteger(verTokens[i], ver))
+ if (!verTokens.empty() && !verTokens[i].empty() && !COOLProtocol::stringToInteger(verTokens[i], ver))
{
throw BadArgumentException("Invalid 'ver' in tilecombine descriptor.");
}
TileWireId oldWireId = 0;
- if (!oldWireIdTokens.empty() && !LOOLProtocol::stringToUInt32(oldWireIdTokens[i], oldWireId))
+ if (!oldWireIdTokens.empty() && !COOLProtocol::stringToUInt32(oldWireIdTokens[i], oldWireId))
{
throw BadArgumentException("Invalid tilecombine descriptor.");
}
TileWireId wireId = 0;
- if (!wireIdTokens.empty() && !LOOLProtocol::stringToUInt32(wireIdTokens[i], wireId))
+ if (!wireIdTokens.empty() && !COOLProtocol::stringToUInt32(wireIdTokens[i], wireId))
{
throw BadArgumentException("Invalid tilecombine descriptor.");
}
@@ -476,7 +476,7 @@ public:
{
std::string name;
std::string value;
- if (LOOLProtocol::parseNameValuePair(tokens.getParam(token), name, value))
+ if (COOLProtocol::parseNameValuePair(tokens.getParam(token), name, value))
{
if (name == "tileposx")
{
@@ -505,7 +505,7 @@ public:
else
{
int v = 0;
- if (LOOLProtocol::stringToInteger(value, v))
+ if (COOLProtocol::stringToInteger(value, v))
{
pairs[name] = v;
}
diff --git a/wsd/TraceFile.hpp b/wsd/TraceFile.hpp
index abf08b88be..2ae89cc840 100644
--- a/wsd/TraceFile.hpp
+++ b/wsd/TraceFile.hpp
@@ -195,13 +195,13 @@ public:
if (_filter.match(data))
{
// Remap the URL to the snapshot.
- if (LOOLProtocol::matchPrefix("load", data))
+ if (COOLProtocol::matchPrefix("load", data))
{
StringVector tokens = Util::tokenize(data);
if (tokens.size() >= 2)
{
std::string url;
- if (LOOLProtocol::getTokenString(tokens[1], "url", url))
+ if (COOLProtocol::getTokenString(tokens[1], "url", url))
{
std::string decodedUrl;
Poco::URI::decode(url, decodedUrl);
@@ -230,7 +230,7 @@ public:
}
}
- if (!LOOLProtocol::matchPrefix("tileprocessed ", data))
+ if (!COOLProtocol::matchPrefix("tileprocessed ", data))
writeLocked(id, sessionId, data, static_cast<char>(TraceFileRecord::Direction::Incoming));
}
}
diff --git a/wsd/metrics.txt b/wsd/metrics.txt
index 09c0a13ef5..b5c097c9bd 100644
--- a/wsd/metrics.txt
+++ b/wsd/metrics.txt
@@ -5,16 +5,16 @@ which can be found here: https://prometheus.io/docs/instrumenting/exposition_for
GLOBAL
global_host_system_memory_bytes - Total host system memory in bytes.
- global_memory_available_bytes – Memory available to our application in bytes. This is equal to global_host_system_memory_bytes * memproportion where memproportion represents the maximum percentage of system memory consumed by all of the Collabora Online, after which we start cleaning up idle documents. This parameter can be setup in loolwsd.xml.
- global_memory_used_bytes – Total memory usage: PSS(loolwsd) + RSS(forkit) + Private_Dirty(all assigned loolkits).
+ global_memory_available_bytes – Memory available to our application in bytes. This is equal to global_host_system_memory_bytes * memproportion where memproportion represents the maximum percentage of system memory consumed by all of the Collabora Online, after which we start cleaning up idle documents. This parameter can be setup in coolwsd.xml.
+ global_memory_used_bytes – Total memory usage: PSS(coolwsd) + RSS(forkit) + Private_Dirty(all assigned coolkits).
global_memory_free_bytes - global_memory_available_bytes - global_memory_used_bytes
-LOOLWSD
+COOLWSD
- loolwsd_count – number of running loolwsd processes.
- loolwsd_thread_count – number of threads in the current loolwsd process.
- loolwsd_cpu_time_seconds – the CPU usage by current loolwsd process.
- loolwsd_memory_used_bytes – the memory used by current loolwsd process: PSS(loolwsd).
+ coolwsd_count – number of running coolwsd processes.
+ coolwsd_thread_count – number of threads in the current coolwsd process.
+ coolwsd_cpu_time_seconds – the CPU usage by current coolwsd process.
+ coolwsd_memory_used_bytes – the memory used by current coolwsd process: PSS(coolwsd).
FORKIT
@@ -29,7 +29,7 @@ KITS
kit_unassigned_count – number of running kit processes that are not assigned to documents.
kit_assigned_count – number of running kit processes that are assigned to documents.
kit_segfault_count - number of kit processes terminated with SIGSEGV or SIGBUS signals since the start of application.
- kit_lost_terminated_count - number of kit processes that were lost by loolwsd and were terminated by cleanup mechanism.
+ kit_lost_terminated_count - number of kit processes that were lost by coolwsd and were terminated by cleanup mechanism.
kit_thread_count_total - total number of threads in all running kit processes.
kit_thread_count_average – average number of threads per running kit process.
kit_thread_count_min - minimum from the number of threads in each running kit process.
@@ -43,10 +43,10 @@ KITS
kit_cpu_time_min_seconds – minimum from the CPU time each running kit process used.
kit_cpu_time_max_seconds - maximum from the CPU time each running kit process used.
-RESOURCE CONSUMING DOCUMENTS (See config.per_document.cleanup section in loolwsd.xml)
+RESOURCE CONSUMING DOCUMENTS (See config.per_document.cleanup section in coolwsd.xml)
document_resource_consuming_count - number of active documents that were detected as resource consuming.
- document_resource_consuming_abort_started_count - number of resource consuming documents for which the termination process started (SIGABRT/SIGKILL signal was sent to the associated kit process) but they are still considered active by loolwsd. This is relevant because it shows how many resource consuming docs possibly could not be terminated or for which the termination process is too long.
+ document_resource_consuming_abort_started_count - number of resource consuming documents for which the termination process started (SIGABRT/SIGKILL signal was sent to the associated kit process) but they are still considered active by coolwsd. This is relevant because it shows how many resource consuming docs possibly could not be terminated or for which the termination process is too long.
document_resource_consuming_aborted_count - number of terminated resource consuming documents.
DOCUMENT VIEWS
diff --git a/wsd/protocol.txt b/wsd/protocol.txt
index c42871900d..eec554d96c 100644
--- a/wsd/protocol.txt
+++ b/wsd/protocol.txt
@@ -354,7 +354,7 @@ loggingleveloverride <default|max|verbose|terse|none|fatal|critical|error|warnin
server -> client
================
-coolserver <loolwsd version> <loolwsd git hash> <major.minor[-patch]>
+coolserver <coolwsd version> <coolwsd git hash> <major.minor[-patch]>
Upon connection, the server must announce the version number it supports.
Major: an integer that must always match between client and server,
@@ -809,7 +809,7 @@ sent_bytes
recv_bytes
Queries for total memory or bandwidth being consumed by the server
- in kilobytes. For mem_consumed this includes processes - loolwsd,
+ in kilobytes. For mem_consumed this includes processes - coolwsd,
coolforkit, and child processes hosting various documents. For
sent/recv_bytes this includes only external traffic.
@@ -827,7 +827,7 @@ settings
Queries the server for configurable settings from admin console.
log_lines
- Gets last n lines from "loolwsd.log" file.
+ Gets last n lines from "coolwsd.log" file.
channel_list
Gets the log channels list with their respective log levels.