24#ifndef HTML_OPTIONS_READ_HPP
25#define HTML_OPTIONS_READ_HPP
35#include <dar/libdar.hpp>
40#include "body_builder.hpp"
41#include "html_div.hpp"
42#include "html_form.hpp"
43#include "html_form_fieldset.hpp"
44#include "html_form_select.hpp"
45#include "html_form_input.hpp"
46#include "html_form_input_file.hpp"
47#include "html_form_input_unit.hpp"
48#include "html_crypto_algo.hpp"
50#include "html_derouleur.hpp"
51#include "html_text.hpp"
52#include "html_entrepot_landing.hpp"
53#include "html_libdar_running_popup.hpp"
57#include "bibliotheque_subconfig.hpp"
84 public libthreadar::thread_signal,
101 void set_biblio(
const std::shared_ptr<bibliotheque> & ptr);
104 libdar::archive_options_read
get_options(std::shared_ptr<html_web_user_interaction> & webui)
const;
107 std::shared_ptr<libdar::entrepot>
get_entrepot(std::shared_ptr<html_web_user_interaction> webui)
const
108 {
return entrep->get_entrepot(webui); };
117 virtual void load_json(
const json & source)
override;
129 virtual void on_event(
const std::string & event_name)
override;
144 virtual void inherited_run()
override;
151 static const std::string ref_entrepot_has_changed;
152 static const std::string ref_entrepot_landing_path_changed;
153 static constexpr const char* sect_entrep =
"entrep";
154 static constexpr const char* sect_opt =
"options";
155 static constexpr const char* sect_ref_entrep =
"ref_entrep";
156 static constexpr const char* sect_extcat =
"externalcat";
165 bool need_ref_entrepot_update;
166 bool updating_entrepot;
167 bool update_from_load_json;
176 std::shared_ptr<html_entrepot_landing> entrep;
194 std::shared_ptr<html_entrepot_landing> ref_entrep;
208 void update_ref_entrepot();
210 void set_defaults_for_ref();
211 void trigger_changed();
213 static constexpr const unsigned int format_version = 1;
214 static constexpr const char* myclass_id =
"html_options_read";
216 static constexpr const char* jlabel_entrep =
"entrepot";
217 static constexpr const char* jlabel_crypto_algo =
"cryto-algo";
218 static constexpr const char* jlabel_crypto_pass =
"crypto-pass";
219 static constexpr const char* jlabel_crypto_size =
"crytpo-size";
220 static constexpr const char* jlabel_ignore_sig_failure =
"ignore-sig-failure";
221 static constexpr const char* jlabel_execute =
"execute";
222 static constexpr const char* jlabel_slice_min_digits =
"min-digits";
223 static constexpr const char* jlabel_info_details =
"info-details";
224 static constexpr const char* jlabel_lax =
"lax-mode";
225 static constexpr const char* jlabel_seq_read =
"sequential-read";
226 static constexpr const char* jlabel_force_first_slice =
"first-slice-reading";
227 static constexpr const char* jlabel_thread_crypto =
"cipher-threads";
228 static constexpr const char* jlabel_thread_compress =
"compr-threads";
229 static constexpr const char* jlabel_ref_entrep =
"ref-entrepot";
230 static constexpr const char* jlabel_ref_used =
"ref-used";
231 static constexpr const char* jlabel_ref_path =
"ref-path";
232 static constexpr const char* jlabel_ref_crypto_algo =
"ref-crypto-algo";
233 static constexpr const char* jlabel_ref_crypto_pass =
"ref-crypt-pass";
234 static constexpr const char* jlabel_ref_crypto_size =
"ref-crypto-size";
235 static constexpr const char* jlabel_ref_execute =
"ref-execute";
236 static constexpr const char* jlabel_ref_slice_min_digits =
"ref-min-digits";
defines bibliotheque class
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
class bibliotheque_subconfig is an interface (pure virtual class)
Definition: bibliotheque_subconfig.hpp:50
std::set< coordinates > using_set
list of configs a given config depends on
Definition: bibliotheque.hpp:117
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 guichet let one fetch config from a bibliotheque, save as or setup manually for a given compone...
Definition: guichet.hpp:92
html component in the form of a drop-down list used to let the user define the crypto algo
Definition: html_crypto_algo.hpp:46
class html_derouleur is a pure virtual class
Definition: html_derouleur.hpp:55
class html_options_read implementes the html components to setup optional parameters while reading an...
Definition: html_options_read.hpp:87
virtual json save_json() const override
inherited from jsoner
Definition: html_options_read.cpp:375
virtual bibliotheque::using_set get_using_set() const override
inherited from bibliotheque_subconfig
Definition: html_options_read.cpp:426
virtual void signaled_inherited_cancel() override
inherited from libthreadar::thread
Definition: html_options_read.cpp:568
void set_to_webdar_defaults()
set the object to webdar defaults
Definition: html_options_read.cpp:526
virtual void clear_json() override
inherited from jsoner
Definition: html_options_read.cpp:410
virtual void load_json(const json &source) override
inherited from jsoner
Definition: html_options_read.cpp:303
static const std::string changed
any parameter changed (including entrepot change)
Definition: html_options_read.hpp:91
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
implementation of get_body_part() method for inherited classes
Definition: html_options_read.cpp:537
static const std::string entrepot_has_changed
entrepot parameter changed
Definition: html_options_read.hpp:90
virtual void new_css_library_available() override
Definition: html_options_read.cpp:549
static const std::string landing_path_changed
landing path has changed
Definition: html_options_read.hpp:89
void set_biblio(const std::shared_ptr< bibliotheque > &ptr)
mandatory call to invoke ASAP after constructor
Definition: html_options_read.cpp:223
std::shared_ptr< libdar::entrepot > get_entrepot(std::shared_ptr< html_web_user_interaction > webui) const
obtain just the entrepot object from the option fields
Definition: html_options_read.hpp:107
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_options_read.cpp:436
void set_src_min_digits(const std::string &val)
set min-digits field for the archive to read (not the archive of reference if any)
Definition: html_options_read.cpp:288
const std::string & get_landing_path() const
obtain the entrepot landing path
Definition: html_options_read.hpp:111
libdar::archive_options_read get_options(std::shared_ptr< html_web_user_interaction > &webui) const
obtain the libdar archive_option_read object from the html filled fields
Definition: html_options_read.cpp:240
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 jsoner class and class exception_json