62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#pragma once
|
|
/*
|
|
* Copyright (C) 2024 Dominik Meyer
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
#include <CLI/App.hpp>
|
|
#include <Redmine/API.hpp>
|
|
#include <memory>
|
|
#include <string>
|
|
#define LOGURU_WITH_STREAMS 1
|
|
#include <loguru.hpp>
|
|
#include <CLI/CLI.hpp>
|
|
|
|
// forward declaration
|
|
namespace RedmineCLI
|
|
{
|
|
class Redmine;
|
|
};
|
|
|
|
namespace Command
|
|
{
|
|
|
|
/**
|
|
* @brief Command for printing the version of the redmine-cli
|
|
*
|
|
*/
|
|
class Version
|
|
{
|
|
|
|
private:
|
|
|
|
/// the main redmine cli application context
|
|
RedmineCLI::Redmine *redmine_;
|
|
|
|
/// pointer to the version subcommand
|
|
CLI::App* version_;
|
|
|
|
public:
|
|
/**
|
|
* @brief Construct a new CLIProcessor object
|
|
*
|
|
* @param redmineURL - the url to the redmine instance
|
|
* @param apiToken - the token to authenticate api requests
|
|
*/
|
|
Version(RedmineCLI::Redmine *r);
|
|
|
|
|
|
}; // class Version
|
|
|
|
}; // namespace Command
|