/* This file is part of remwharead. * Copyright © 2019 tastytea * * 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, version 3. * * 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 . */ #ifndef REMWHAREAD_PARSE_OPTIONS_HPP #define REMWHAREAD_PARSE_OPTIONS_HPP #include "types.hpp" #include #include #include #include #include #include namespace remwharead_cli { using namespace remwharead; using std::string; using std::vector; using std::array; using std::chrono::system_clock; using time_point = system_clock::time_point; using Poco::Util::OptionSet; class App : public Poco::Util::Application { public: App(); protected: void defineOptions(OptionSet& options) override; void handle_options(const string &name, const string &value); void print_help(const string &option); static void print_version(); int main(const std::vector &args) override; private: bool _exit_requested; bool _argument_error; string _uri; vector _tags; export_format _format; string _file; array _timespan; string _search_tags; string _search_all; bool _archive; bool _regex; }; } // namespace remwharead_cli #endif // REMWHAREAD_PARSE_OPTIONS_HPP