forward the device form factor of the client on a new view request

This patch allows the lok core to know about the device form facor of
the client requesting the creation of a new view, immediately instead
of a later time.
When a request for a new view is sent a 'deviceFormFactor' parameter
is appended to the message.
This parameter can have one of the following values: 'desktop',
'tablet','mobile' and is forwarded to the lok core.

Change-Id: I21739ddb8c43c960164b3c625e4cf0a80f4616a4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92691
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
This commit is contained in:
Marco Cecchetti
2020-04-20 21:26:21 +02:00
parent b67b335b50
commit 255d24ba8f
8 changed files with 46 additions and 5 deletions

View File

@ -197,6 +197,8 @@ public:
_canonicalViewId = map.getCanonicalId(_watermarkText);
}
const std::string& getDeviceFormFactor() const { return _deviceFormFactor; }
protected:
Session(const std::shared_ptr<ProtocolHandlerInterface> &handler,
const std::string& name, const std::string& id, bool readonly);
@ -288,6 +290,9 @@ private:
/// the canonical id unique to the set of rendering properties of this session
int _canonicalViewId;
/// The form factor of the device where the client is running: desktop, tablet, mobile.
std::string _deviceFormFactor;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */