Webdar 1.0.0
Web user interface to libdar
html_form_ignore_as_symlink.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 HTML_FORM_IGNORE_AS_SYMLINK_HPP
25#define HTML_FORM_IGNORE_AS_SYMLINK_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 <set>
36
37 // webdar headers
38#include "html_form_dynamic_table.hpp"
39#include "jsoner.hpp"
40#include "actor.hpp"
41#include "events.hpp"
42
44
47
75
76
77
80 public jsoner,
81 public actor,
82 public events
83{
84public:
85 static const std::string changed;
86
90 html_form_ignore_as_symlink & operator = (const html_form_ignore_as_symlink & ref) = delete;
91 html_form_ignore_as_symlink & operator = (html_form_ignore_as_symlink && ref) noexcept = delete;
93
95 bool empty() const { return table.empty(); };
96
98 std::set<std::string> get_symlink_list() const;
99
101 std::vector<std::string> get_gnupg_signatories() const;
102
104 virtual std::unique_ptr<body_builder> provide_object_of_type(unsigned int num,
105 const std::string & context,
106 std::string & changed_event) const override;
107
109 virtual void load_json(const json & source) override;
110
112 virtual json save_json() const override;
113
115 virtual void clear_json() override;
116
118 virtual void on_event(const std::string & event_name) override;
119
120protected:
122 virtual std::string inherited_get_body_part(const chemin & path,
123 const request & req) override;
124
126 virtual void new_css_library_available() override;
127
128private:
129 std::vector<std::string> gather_content_of_type(unsigned int type) const;
130
132
133 static constexpr const unsigned int format_version = 1;
134 static constexpr const char* myclass_id = "html_form_ignore_as_symlink";
135
136 static constexpr const char* jlabel_contents = "contents";
137
138};
139
140#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 events
Definition: events.hpp:52
class html_form_dynamic_table_object_provider
Definition: html_form_dynamic_table.hpp:60
class html_form_dynamic_table web user dynamically add new lines in a table
Definition: html_form_dynamic_table.hpp:121
bool empty() const
whether the current dynamic_table is empty
Definition: html_form_dynamic_table.hpp:170
class jsoner
Definition: jsoner.hpp:73
class holding fields of an HTTP request (method, URI, header, cookies, and so on)
Definition: request.hpp:45
defines the event class
defines jsoner class and class exception_json