[Libreoffice-commits] online.git: loolwsd/ClientSession.cpp loolwsd/ClientSession.hpp loolwsd/MasterProcessSession.hpp loolwsd/PrisonerSession.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue May 17 03:13:59 UTC 2016
loolwsd/ClientSession.cpp | 12 ++++++++++++
loolwsd/ClientSession.hpp | 21 +++++++++------------
loolwsd/MasterProcessSession.hpp | 4 ----
loolwsd/PrisonerSession.hpp | 12 ------------
4 files changed, 21 insertions(+), 28 deletions(-)
New commits:
commit e5f76d46f46d78be0fb63849235cfe60bbcffdc3
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon May 16 18:22:41 2016 -0400
loolwsd: MasterProcessSession splitting: edit lock handlers
Change-Id: Id3f961ea8da2689889e0d7810ec222d21132c7c6
Reviewed-on: https://gerrit.libreoffice.org/25039
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp
index 6da51ec..b266e9d 100644
--- a/loolwsd/ClientSession.cpp
+++ b/loolwsd/ClientSession.cpp
@@ -19,12 +19,24 @@
#include "LOOLProtocol.hpp"
#include "LOOLSession.hpp"
#include "LOOLWSD.hpp"
+#include "ClientSession.hpp"
#include "MasterProcessSession.hpp"
#include "Rectangle.hpp"
#include "Storage.hpp"
#include "TileCache.hpp"
#include "IoUtil.hpp"
#include "Util.hpp"
+
+/*
+void ClientSession::setEditLock(const bool value)
+{
+ // Update the sate and forward to child.
+ _bEditLock = value;
+ const auto msg = std::string("editlock: ") + (value ? "1" : "0");
+ forwardToPeer(msg.data(), msg.size());
+}
+*/
+
#if 0
using namespace LOOLProtocol;
diff --git a/loolwsd/ClientSession.hpp b/loolwsd/ClientSession.hpp
index fcbc152..8cc0b6a 100644
--- a/loolwsd/ClientSession.hpp
+++ b/loolwsd/ClientSession.hpp
@@ -26,10 +26,19 @@ class ClientSession final : public MasterProcessSession//, public std::enable_sh
public:
using MasterProcessSession::MasterProcessSession;
+ //void setEditLock(const bool value);
+ //void markEditLock(const bool value) { _bEditLock = value; }
+ //bool isEditLocked() const { return _bEditLock; }
+
+
//void setPeer(const std::shared_ptr<PrisonerSession>& peer) { _peer = peer; }
private:
+ // If this document holds the edit lock.
+ // An edit lock will only allow the current session to make edits,
+ // while other session opening the same document can only see
+ bool _bEditLock = false;
//std::weak_ptr<PrisonerSession> _peer;
#if 0
@@ -59,10 +68,6 @@ private:
void setPeer(const std::shared_ptr<MasterProcessSession>& peer) { _peer = peer; }
- void setEditLock(const bool value);
- void markEditLock(const bool value) { _bEditLock = value; }
- bool isEditLocked() const { return _bEditLock; }
-
bool shutdownPeer(Poco::UInt16 statusCode, const std::string& message);
public:
@@ -91,9 +96,6 @@ public:
// per document being edited (i.e., per child process).
std::weak_ptr<MasterProcessSession> _peer;
- static
- Poco::Path getJailPath(const std::string& childId);
-
virtual bool _handleInput(const char *buffer, int length) override;
int _curPart;
@@ -102,11 +104,6 @@ public:
MessageQueue _saveAsQueue;
std::shared_ptr<DocumentBroker> _docBroker;
std::shared_ptr<BasicTileQueue> _queue;
-
- // If this document holds the edit lock.
- // An edit lock will only allow the current session to make edits,
- // while other session opening the same document can only see
- bool _bEditLock = false;
#endif
};
diff --git a/loolwsd/MasterProcessSession.hpp b/loolwsd/MasterProcessSession.hpp
index c8f0c61..fbdc41f 100644
--- a/loolwsd/MasterProcessSession.hpp
+++ b/loolwsd/MasterProcessSession.hpp
@@ -66,7 +66,6 @@ public:
virtual void sendFontRendering(const char *buffer, int length, Poco::StringTokenizer& tokens) override;
- private:
void dispatchChild();
void forwardToPeer(const char *buffer, int length);
@@ -79,9 +78,6 @@ public:
// per document being edited (i.e., per child process).
std::weak_ptr<MasterProcessSession> _peer;
- static
- Poco::Path getJailPath(const std::string& childId);
-
virtual bool _handleInput(const char *buffer, int length) override;
int _curPart;
diff --git a/loolwsd/PrisonerSession.hpp b/loolwsd/PrisonerSession.hpp
index 9b8745f..3cbbe33 100644
--- a/loolwsd/PrisonerSession.hpp
+++ b/loolwsd/PrisonerSession.hpp
@@ -58,10 +58,6 @@ private:
void setPeer(const std::shared_ptr<MasterProcessSession>& peer) { _peer = peer; }
- void setEditLock(const bool value);
- void markEditLock(const bool value) { _bEditLock = value; }
- bool isEditLocked() const { return _bEditLock; }
-
bool shutdownPeer(Poco::UInt16 statusCode, const std::string& message);
public:
@@ -90,9 +86,6 @@ public:
// per document being edited (i.e., per child process).
std::weak_ptr<MasterProcessSession> _peer;
- static
- Poco::Path getJailPath(const std::string& childId);
-
virtual bool _handleInput(const char *buffer, int length) override;
int _curPart;
@@ -101,11 +94,6 @@ public:
MessageQueue _saveAsQueue;
std::shared_ptr<DocumentBroker> _docBroker;
std::shared_ptr<BasicTileQueue> _queue;
-
- // If this document holds the edit lock.
- // An edit lock will only allow the current session to make edits,
- // while other session opening the same document can only see
- bool _bEditLock = false;
#endif
};
More information about the Libreoffice-commits
mailing list