2017-07-21 09:33:19 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
|
|
/*
|
2023-11-09 12:23:00 -06:00
|
|
|
* Copyright the Collabora Online contributors.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*
|
2017-07-21 09:33:19 -05:00
|
|
|
* 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
|
|
|
|
|
|
|
#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
|
|
|
};
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|