Fix build for MOBILEAPP

No Admin.hpp needed (which would cause a conflicting definitions of a
class called Document when compiling Kit.cpp).

No locks "supported" in the way the code expects for WOPI-like things.

Change-Id: Ie43311af054f2940576ce9b2b13520f24887628e
Reviewed-on: https://gerrit.libreoffice.org/84018
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
Tor Lillqvist 2019-11-28 18:09:58 +02:00
parent a252c98240
commit 29b603a34f
2 changed files with 11 additions and 1 deletions

View file

@ -33,7 +33,9 @@
#include "common/SigUtil.hpp"
#if !MOBILEAPP
#include "Admin.hpp"
#endif
// Forwards.
class PrisonerRequestDispatcher;

View file

@ -462,14 +462,20 @@ std::map<std::string, std::string> GetQueryParams(const Poco::URI& uri)
} // anonymous namespace
#endif // !MOBILEAPP
void LockContext::initSupportsLocks()
{
#if MOBILEAPP
_supportsLocks = false;
#else
if (_supportsLocks)
return;
// first time token setup
_supportsLocks = true;
_lockToken = "lool-lock" + Util::rng::getHexString(8);
#endif
}
bool LockContext::needsRefresh(const std::chrono::steady_clock::time_point &now) const
@ -490,6 +496,8 @@ void LockContext::dumpState(std::ostream& os)
os << " last locked: " << Util::getSteadyClockAsString(_lastLockTime) << "\n";
}
#if !MOBILEAPP
std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Authorization& auth, LockContext &lockCtx)
{
// update the access_token to the one matching to the session
@ -1100,6 +1108,6 @@ StorageBase::SaveResult WebDAVStorage::saveLocalFileToStorage(
return StorageBase::SaveResult(StorageBase::SaveResult::OK);
}
#endif
#endif // !MOBILEAPP
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */