From 062574341f79e41320af6df6a759b39435f185e6 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 24 Mar 2024 09:03:11 -0400 Subject: [PATCH] wsd: move wopi stub/dummy interface to MobileApp.hpp Change-Id: I58ac7467c4e74059e4de08c914546614ed6fe883 Signed-off-by: Ashod Nakashian --- common/MobileApp.cpp | 7 ++++--- common/MobileApp.hpp | 29 +++++++++++++++++++++++++++++ wsd/DocumentBroker.hpp | 31 +++---------------------------- 3 files changed, 36 insertions(+), 31 deletions(-) diff --git a/common/MobileApp.cpp b/common/MobileApp.cpp index e04600fe0..7638655a4 100644 --- a/common/MobileApp.cpp +++ b/common/MobileApp.cpp @@ -11,14 +11,15 @@ #include "config.h" +#if MOBILEAPP + +#include "MobileApp.hpp" + #include #include #include #include "Log.hpp" -#include "MobileApp.hpp" - -#if MOBILEAPP static std::map idToDocDataMap; static std::mutex idToDocDataMapMutex; diff --git a/common/MobileApp.hpp b/common/MobileApp.hpp index 0787a778e..9ff8532af 100644 --- a/common/MobileApp.hpp +++ b/common/MobileApp.hpp @@ -15,6 +15,8 @@ #include +#include + #ifdef IOS #import "CODocument.h" #import @@ -59,4 +61,31 @@ public: #endif }; +/// Stub/Dummy WOPI types/interface. +class WopiStorage : public StorageBase +{ +public: + class WOPIFileInfo : public FileInfo + { + public: + enum class TriState + { + False, + True, + Unset + }; + + std::string getTemplateSource() const { return std::string(); } + + bool getDisablePrint() const { return false; } + bool getDisableExport() const { return false; } + bool getDisableCopy() const { return false; } + bool getEnableOwnerTermination() const { return false; } + + TriState getDisableChangeTrackingShow() const { return TriState::Unset; } + TriState getDisableChangeTrackingRecord() const { return TriState::Unset; } + TriState getHideChangeTrackingControls() const { return TriState::Unset; } + }; +}; + #endif diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp index 77e13eb33..eb9bd3fe7 100644 --- a/wsd/DocumentBroker.hpp +++ b/wsd/DocumentBroker.hpp @@ -37,34 +37,9 @@ #if !MOBILEAPP #include "Admin.hpp" #include -#else -//FIXME: Move to a stub file. -class WopiStorage : public StorageBase -{ -public: - class WOPIFileInfo : public FileInfo - { - public: - enum class TriState - { - False, - True, - Unset - }; - - std::string getTemplateSource() const { return std::string(); } - - bool getDisablePrint() const { return false; } - bool getDisableExport() const { return false; } - bool getDisableCopy() const { return false; } - bool getEnableOwnerTermination() const { return false; } - - TriState getDisableChangeTrackingShow() const { return TriState::Unset; } - TriState getDisableChangeTrackingRecord() const { return TriState::Unset; } - TriState getHideChangeTrackingControls() const { return TriState::Unset; } - }; -}; -#endif +#else // MOBILEAPP +#include +#endif // MOBILEAPP // Forwards. class PrisonerRequestDispatcher;