Webdar 1.0.0
Web user interface to libdar
html_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#ifndef HTML_ARCHIVE_COMPARE_HPP
24#define HTML_ARCHIVE_COMPARE_HPP
25
26 // C system header files
27#include "my_config.h"
28extern "C"
29{
30
31}
32
33 // C++ system header files
34#include <libthreadar/libthreadar.hpp>
35
36 // webdar headers
37#include "body_builder.hpp"
38#include "actor.hpp"
39#include "html_derouleur.hpp"
40#include "html_form_fieldset.hpp"
41#include "html_form_input_file.hpp"
42#include "html_form.hpp"
43#include "html_options_compare.hpp"
44#include "guichet.hpp"
45#include "html_text.hpp"
46
48
50{
51public:
53 html_archive_compare(const html_archive_compare & ref) = delete;
54 html_archive_compare(html_archive_compare && ref) noexcept = delete;
55 html_archive_compare & operator = (const html_archive_compare & ref) = delete;
56 html_archive_compare & operator = (html_archive_compare && ref) noexcept = delete;
57 ~html_archive_compare() = default;
58
60 void set_biblio(const std::shared_ptr<bibliotheque> & ptr);
61
62
64 const std::string & get_fs_root() const { return diff_fs_root.get_value(); };
65
66
68 libdar::archive_options_diff get_options() const;
69
70
72 virtual void on_event(const std::string & event_name) override;
73
74protected:
75
77 virtual std::string inherited_get_body_part(const chemin & path,
78 const request & req) override;
79
81 virtual void new_css_library_available() override;
82
83private:
84 html_derouleur diff_params;
85 html_form_fieldset diff_fs_root_fs;
86 html_form_input_file diff_fs_root;
87 html_form diff_fs_root_form;
88 html_text in_place_msg;
89
90 guichet guichet_opt_diff;
91 std::shared_ptr<html_options_compare> opt_diff;
92
93 static const std::string diff_root_changed;
94 static constexpr const char* css_grey_text = "hac_grey";
95};
96
97#endif
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
class body_builder is the root class of object generating HTML body
Definition: body_builder.hpp:99
class chemin definition
Definition: chemin.hpp:51
class guichet let one fetch config from a bibliotheque, save as or setup manually for a given compone...
Definition: guichet.hpp:92
html component used to let the user provide parameters for an isolation operation
Definition: html_archive_compare.hpp:50
libdar::archive_options_diff get_options() const
gathering options parameter for libdar
Definition: html_archive_compare.cpp:136
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_archive_compare.cpp:144
const std::string & get_fs_root() const
the current fs_root parameter
Definition: html_archive_compare.hpp:64
void set_biblio(const std::shared_ptr< bibliotheque > &ptr)
mandatory call to invoke ASAP after constructor
Definition: html_archive_compare.cpp:107
virtual void new_css_library_available() override
inherited from body_builder
Definition: html_archive_compare.cpp:164
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
inherited from body_builder
Definition: html_archive_compare.cpp:158
class html_derouleur is a pure virtual class
Definition: html_derouleur.hpp:55
class html_form_fieldset implements HTML fieldset feature
Definition: html_form_fieldset.hpp:51
class html_form_input_file provides a mean to the user to navigate in a file system to select a file ...
Definition: html_form_input_file.hpp:60
class html_form implements HTML form feature
Definition: html_form.hpp:51
class html_text manage text and header in html document
Definition: html_text.hpp:52
class holding fields of an HTTP request (method, URI, header, cookies, and so on)
Definition: request.hpp:45