Skip to content

Commit 1319364

Browse files
cut/paste dump* function implementations from COOLWSD.cpp into dumpWsdState.cpp
Signed-off-by: Sahil Gautam <[email protected]> Change-Id: Ia61f8a68f5a2a0be999a8506cc6df2a69c28fc29
1 parent 44d4eea commit 1319364

File tree

7 files changed

+81
-54
lines changed

7 files changed

+81
-54
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ coolwsd_sources = common/Crypto.cpp \
165165
wsd/Auth.cpp \
166166
wsd/CacheUtil.cpp \
167167
wsd/COOLWSD.cpp \
168+
wsd/dumpWsdState.cpp \
168169
wsd/ClientRequestDispatcher.cpp \
169170
wsd/ClientSession.cpp \
170171
wsd/DocumentBroker.cpp \

android/lib/src/main/cpp/CMakeLists.txt.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ add_library(androidapp SHARED
3838
../../../../../wsd/ClientSession.cpp
3939
../../../../../wsd/DocumentBroker.cpp
4040
../../../../../wsd/COOLWSD.cpp
41+
../../../../../wsd/dumpWsdState.cpp
4142
../../../../../wsd/ClientRequestDispatcher.cpp
4243
../../../../../wsd/RequestDetails.cpp
4344
../../../../../wsd/RequestVettingStation.cpp

gtk/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ cmake_list= \
5959
../wsd/ClientSession.cpp \
6060
../wsd/DocumentBroker.cpp \
6161
../wsd/COOLWSD.cpp \
62+
../wsd/dumpWsdState.cpp \
6263
../wsd/ClientRequestDispatcher.cpp \
6364
../wsd/RequestDetails.cpp \
6465
../wsd/RequestVettingStation.cpp \

ios/Mobile.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
BE5EB5CF213FE2D000E0826C /* ClientSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5CC213FE2D000E0826C /* ClientSession.cpp */; };
4141
BE5EB5D0213FE2D000E0826C /* TileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5CD213FE2D000E0826C /* TileCache.cpp */; };
4242
BE5EB5D22140039100E0826C /* COOLWSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D12140039100E0826C /* COOLWSD.cpp */; };
43+
BE5EB5D22140039101E0927D /* dumpWsdState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D12140039110E0836F /* dumpWsdState.cpp */; };
4344
BE5EB5D22140039100E0826D /* ClientRequestDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D12140039100E0826D /* ClientRequestDispatcher.cpp */; };
4445
BE5EB5D421400DC100E0826C /* DocumentBroker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */; };
4546
BE5EB5D621401E0F00E0826C /* Storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5EB5D521401E0F00E0826C /* Storage.cpp */; };
@@ -616,6 +617,7 @@
616617
BE5EB5CC213FE2D000E0826C /* ClientSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientSession.cpp; sourceTree = "<group>"; };
617618
BE5EB5CD213FE2D000E0826C /* TileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TileCache.cpp; sourceTree = "<group>"; };
618619
BE5EB5D12140039100E0826C /* COOLWSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COOLWSD.cpp; sourceTree = "<group>"; };
620+
BE5EB5D12140039110E0836F /* dumpWsdState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dumpWsdState.cpp; sourceTree = "<group>"; };
619621
BE5EB5D12140039100E0826D /* ClientRequestDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientRequestDispatcher.cpp; sourceTree = "<group>"; };
620622
BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentBroker.cpp; sourceTree = "<group>"; };
621623
BE5EB5D521401E0F00E0826C /* Storage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Storage.cpp; sourceTree = "<group>"; };
@@ -2286,6 +2288,7 @@
22862288
BE5EB5D321400DC100E0826C /* DocumentBroker.cpp */,
22872289
BE484B71228D8622001EE76C /* DocumentBroker.hpp */,
22882290
BE5EB5D12140039100E0826C /* COOLWSD.cpp */,
2291+
BE5EB5D12140039110E0836F /* dumpWsdState.cpp */,
22892292
BE5EB5D12140039100E0826D /* ClientRequestDispatcher.cpp */,
22902293
BE5EB5E621401E0F00E0826C /* RequestVettingStation.cpp */,
22912294
BE5EB5D521401E0F00E0826C /* Storage.cpp */,
@@ -3766,6 +3769,7 @@
37663769
BE5EB5C3213FE29900E0826C /* Session.cpp in Sources */,
37673770
BE980C592CEB557A00FED7BC /* FileUtil-apple.mm in Sources */,
37683771
BE5EB5D22140039100E0826C /* COOLWSD.cpp in Sources */,
3772+
BE5EB5D22140039101E0927D /* dumpWsdState.cpp in Sources */,
37693773
BE5EB5D22140039100E0826D /* ClientRequestDispatcher.cpp in Sources */,
37703774
BEFB1EE121C29CC70081D757 /* L10n.mm in Sources */,
37713775
BEDCC8992456FFAD00FB02BD /* SceneDelegate.mm in Sources */,

wasm/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ online_SOURCES = \
6363
../wsd/ClientSession.cpp \
6464
../wsd/DocumentBroker.cpp \
6565
../wsd/COOLWSD.cpp \
66+
../wsd/dumpWsdState.cpp \
6667
../wsd/ClientRequestDispatcher.cpp \
6768
../wsd/RequestDetails.cpp \
6869
../wsd/RequestVettingStation.cpp \

wsd/COOLWSD.cpp

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,60 +2264,6 @@ void COOLWSD::initializeSSL()
22642264
#endif
22652265
}
22662266

2267-
void COOLWSD::dumpNewSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri, const std::string& path)
2268-
{
2269-
if (TraceDumper)
2270-
{
2271-
try
2272-
{
2273-
TraceDumper->newSession(id, sessionId, uri, path);
2274-
}
2275-
catch (const std::exception& exc)
2276-
{
2277-
LOG_ERR("Exception in tracer newSession: " << exc.what());
2278-
}
2279-
}
2280-
}
2281-
2282-
void COOLWSD::dumpEndSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri)
2283-
{
2284-
if (TraceDumper)
2285-
{
2286-
try
2287-
{
2288-
TraceDumper->endSession(id, sessionId, uri);
2289-
}
2290-
catch (const std::exception& exc)
2291-
{
2292-
LOG_ERR("Exception in tracer newSession: " << exc.what());
2293-
}
2294-
}
2295-
}
2296-
2297-
void COOLWSD::dumpEventTrace(const std::string& id, const std::string& sessionId, const std::string& data)
2298-
{
2299-
if (TraceDumper)
2300-
{
2301-
TraceDumper->writeEvent(id, sessionId, data);
2302-
}
2303-
}
2304-
2305-
void COOLWSD::dumpIncomingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
2306-
{
2307-
if (TraceDumper)
2308-
{
2309-
TraceDumper->writeIncoming(id, sessionId, data);
2310-
}
2311-
}
2312-
2313-
void COOLWSD::dumpOutgoingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
2314-
{
2315-
if (TraceDumper)
2316-
{
2317-
TraceDumper->writeOutgoing(id, sessionId, data);
2318-
}
2319-
}
2320-
23212267
void COOLWSD::defineOptions(Poco::Util::OptionSet& optionSet)
23222268
{
23232269
if constexpr (Util::isMobileApp())

wsd/dumpWsdState.cpp

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2+
/*
3+
* Copyright the Collabora Online contributors.
4+
*
5+
* SPDX-License-Identifier: MPL-2.0
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
10+
*/
11+
12+
#include <config.h>
13+
14+
#include <wsd/COOLWSD.hpp>
15+
#include <wsd/TraceFile.hpp>
16+
17+
#include <string>
18+
19+
void COOLWSD::dumpNewSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri, const std::string& path)
20+
{
21+
if (TraceDumper)
22+
{
23+
try
24+
{
25+
TraceDumper->newSession(id, sessionId, uri, path);
26+
}
27+
catch (const std::exception& exc)
28+
{
29+
LOG_ERR("Exception in tracer newSession: " << exc.what());
30+
}
31+
}
32+
}
33+
34+
void COOLWSD::dumpEndSessionTrace(const std::string& id, const std::string& sessionId, const std::string& uri)
35+
{
36+
if (TraceDumper)
37+
{
38+
try
39+
{
40+
TraceDumper->endSession(id, sessionId, uri);
41+
}
42+
catch (const std::exception& exc)
43+
{
44+
LOG_ERR("Exception in tracer newSession: " << exc.what());
45+
}
46+
}
47+
}
48+
49+
void COOLWSD::dumpEventTrace(const std::string& id, const std::string& sessionId, const std::string& data)
50+
{
51+
if (TraceDumper)
52+
{
53+
TraceDumper->writeEvent(id, sessionId, data);
54+
}
55+
}
56+
57+
void COOLWSD::dumpIncomingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
58+
{
59+
if (TraceDumper)
60+
{
61+
TraceDumper->writeIncoming(id, sessionId, data);
62+
}
63+
}
64+
65+
void COOLWSD::dumpOutgoingTrace(const std::string& id, const std::string& sessionId, const std::string& data)
66+
{
67+
if (TraceDumper)
68+
{
69+
TraceDumper->writeOutgoing(id, sessionId, data);
70+
}
71+
}
72+
73+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

0 commit comments

Comments
 (0)