libreoffice-online/common/Freemium.hpp
Pranam Lashkari dcd6795e57 use pragma instead of header guards in freemium header files
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5b55c2de4a2467503108e4172de84a27e207ba3c
2021-08-06 17:21:04 +02:00

43 lines
1.8 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <string>
#include <vector>
#include "ConfigUtil.hpp"
namespace Freemium
{
class FreemiumManager
{
static std::vector<std::string> FreemiumDenyList;
static bool _isFreemiumUser;
static std::string FreemiumDenyListString;
static void generateDenyList();
public:
FreemiumManager();
static const std::vector<std::string>& getFreemiumDenyList();
static const std::string getFreemiumDenyListString();
static bool isFreemiumUser() { return _isFreemiumUser; }
static void setFreemiumUser(bool isFreemiumUser) { _isFreemiumUser = isFreemiumUser; }
static std::string getFreemiumPurchaseTitle() { return config::getString("freemium.purchase_title", ""); }
static std::string getFreemiumPurchaseLink() { return config::getString("freemium.purchase_link", ""); }
static std::string getFreemiumPurchaseDiscription() { return config::getString("freemium.purchase_discription", ""); }
static std::string getWriterHighlights() { return config::getString("freemium.writer_subscription_highlights", ""); }
static std::string getCalcHighlights() { return config::getString("freemium.calc_subscription_highlights", ""); }
static std::string getImpressHighlights() { return config::getString("freemium.impress_subscription_highlights", ""); }
static std::string getDrawHighlights() { return config::getString("freemium.draw_subscription_highlights", ""); }
};
} // namespace Freemium
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */