24#ifndef HTML_ENTREPOT_HPP
25#define HTML_ENTREPOT_HPP
37#include <libthreadar/libthreadar.hpp>
40#include "body_builder.hpp"
41#include "html_form.hpp"
42#include "html_form_input.hpp"
43#include "html_form_input_file.hpp"
44#include "html_form_fieldset.hpp"
45#include "html_form_select.hpp"
48#include "html_web_user_interaction.hpp"
56 public libthreadar::thread_signal,
79 std::shared_ptr<libdar::entrepot> &
get_entrepot(std::shared_ptr<html_web_user_interaction> & webui)
const;
82 virtual void on_event(
const std::string & event_name)
override;
88 virtual void load_json(
const json & source)
override;
121 static constexpr const char* type_local =
"local";
122 static constexpr const char* type_ftp =
"ftp";
123 static constexpr const char* type_sftp =
"sftp";
124 static constexpr const char* auth_pass =
"password";
125 static constexpr const char* auth_key =
"keyfile";
127 static const std::string repo_type_changed;
129 std::string custom_event_name;
131 mutable std::shared_ptr<libdar::user_interaction> dialog;
132 mutable std::shared_ptr<libdar::entrepot> entrep;
133 mutable libthreadar::mutex entrep_ctrl;
134 mutable bool entrep_type_has_changed;
135 mutable bool entrep_need_update;
153 void update_visible();
154 void trigger_changed_event();
156 void reset_ssh_files();
158 static constexpr const unsigned int format_version = 1;
159 static constexpr const char* myclass_id =
"html_entrepot";
161 static constexpr const char* jlabel_type =
"type";
162 static constexpr const char* jlabel_host =
"host";
163 static constexpr const char* jlabel_port =
"port";
164 static constexpr const char* jlabel_authtype =
"authtype";
165 static constexpr const char* jlabel_login =
"login";
166 static constexpr const char* jlabel_pass =
"pass";
167 static constexpr const char* jlabel_auth_from_file =
"auth_file";
168 static constexpr const char* jlabel_pubkey =
"pubkey";
169 static constexpr const char* jlabel_prvkey =
"prvkey";
170 static constexpr const char* jlabel_knownhosts =
"knownhosts";
171 static constexpr const char* jlabel_knownhosts_file =
"knownhosts_file";
172 static constexpr const char* jlabel_waittime =
"wait";
173 static constexpr const char* jlabel_verbose =
"verbose";
175 static constexpr const char* default_waittime =
"30";
176 static constexpr const char* default_verbose =
"";
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_entrepot let user define an entrepot parameters
Definition: html_entrepot.hpp:58
virtual void clear_json() override
inherited from jsoner
Definition: html_entrepot.cpp:338
virtual void signaled_inherited_cancel() override
inherited from libthreadar::thread
Definition: html_entrepot.cpp:482
virtual void bind_to_anchor(const std::string &val) override
inherited from body_builder
Definition: html_entrepot.hpp:100
virtual void inherited_run() override
inherited from libthreadar::thread
Definition: html_entrepot.cpp:426
virtual void css_classes_have_changed() override
inherited from body_builder
Definition: html_entrepot.cpp:406
virtual json save_json() const override
inherited from jsoner
Definition: html_entrepot.cpp:315
virtual void load_json(const json &source) override
inherited from jsoner
Definition: html_entrepot.cpp:248
virtual void on_event(const std::string &event_name) override
inherited from actor parent class
Definition: html_entrepot.cpp:194
void set_to_webdar_defaults()
set the object to webdar defaults
Definition: html_entrepot.cpp:368
void set_event_name(const std::string &name)
change the change event name
Definition: html_entrepot.cpp:242
static const std::string changed
event triggered when any entrepot parameters has changed
Definition: html_entrepot.hpp:63
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
inherited from body_builder
Definition: html_entrepot.cpp:373
virtual void new_css_library_available() override
inherited from body_builder
Definition: html_entrepot.cpp:417
std::shared_ptr< libdar::entrepot > & get_entrepot(std::shared_ptr< html_web_user_interaction > &webui) const
run the entrepot building in a dedicated thread and display/control this thread
Definition: html_entrepot.cpp:142
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