2017-07-21 09:33:19 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* 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/.
|
|
|
|
*/
|
|
|
|
|
2020-04-18 03:39:50 -05:00
|
|
|
#pragma once
|
2017-07-21 09:33:19 -05:00
|
|
|
|
|
|
|
#if ENABLE_SUPPORT_KEY
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
struct SupportKeyImpl;
|
2018-04-25 14:53:38 -05:00
|
|
|
namespace Poco {
|
|
|
|
class DateTime;
|
|
|
|
}
|
2017-07-21 09:33:19 -05:00
|
|
|
|
|
|
|
class SupportKey {
|
|
|
|
std::unique_ptr<SupportKeyImpl> _impl;
|
|
|
|
|
|
|
|
public:
|
|
|
|
SupportKey(const std::string &key);
|
|
|
|
virtual ~SupportKey();
|
|
|
|
|
|
|
|
/// Check the key is validly signed.
|
|
|
|
bool verify();
|
|
|
|
|
|
|
|
/// How many days until key expires
|
|
|
|
int validDaysRemaining();
|
2018-04-25 14:53:38 -05:00
|
|
|
|
|
|
|
Poco::DateTime expiry() const;
|
|
|
|
|
|
|
|
std::string data() const;
|
2017-07-21 09:33:19 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|