Webdar 1.0.0
Web user interface to libdar
archive_compare.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2025 Denis Corbin
4//
5// This file is part of Webdar
6//
7// Webdar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Webdar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Webdar. If not, see <http://www.gnu.org/licenses/>
19//
20//----
21// to contact the author: dar.linux@free.fr
22/*********************************************************************/
23
24#ifndef ARCHIVE_COMPARE_HPP
25#define ARCHIVE_COMPARE_HPP
26
27 // C system header files
28#include "my_config.h"
29extern "C"
30{
31
32}
33
34 // C++ system header files
35#include <dar/libdar.hpp>
36#include <libthreadar/libthreadar.hpp>
37
38 // webdar headers
39#include "html_web_user_interaction.hpp"
40#include "saisie.hpp"
41
43
52
53class archive_compare : public libthreadar::thread_signal
54{
55public:
57 archive_compare(const archive_compare & ref) = delete;
58 archive_compare(archive_compare && ref) noexcept = default;
59 archive_compare & operator = (const archive_compare & ref) = delete;
60 archive_compare & operator = (archive_compare && ref) noexcept = default;
61 ~archive_compare() { cancel(); join(); };
62
63 // parameters expected by the libdar::archive constructor
64 // and libdar::archive::op_diff method
65
66 void set_user_interaction(std::shared_ptr<html_web_user_interaction> ref) { ui = ref; };
67 void set_parametrage(const saisie* x_param) { param = x_param; };
68
69protected:
70
72
75 virtual void inherited_run() override;
76
78 virtual void signaled_inherited_cancel() override;
79
80private:
81 const saisie* param;
82 std::shared_ptr<html_web_user_interaction> ui;
83
84};
85
86#endif
class archive_compare run libdar comparison in a dedicated thread
Definition: archive_compare.hpp:54
virtual void inherited_run() override
inherited from class libthreadar::thread
Definition: archive_compare.cpp:50
virtual void signaled_inherited_cancel() override
inherited from libthreadar::thread
Definition: archive_compare.cpp:104
class saisie
Definition: saisie.hpp:106