24#ifndef HTML_WEB_USER_INTERACTION_HPP
25#define HTML_WEB_USER_INTERACTION_HPP
35#include <libthreadar/libthreadar.hpp>
40#include "body_builder.hpp"
43#include "html_form_input.hpp"
44#include "html_form.hpp"
45#include "html_form_radio.hpp"
46#include "html_form_fieldset.hpp"
47#include "html_text.hpp"
48#include "html_button.hpp"
49#include "html_statistics.hpp"
50#include "web_user_interaction.hpp"
139 virtual void on_event(
const std::string & event_name)
override;
147 void auto_hide(
bool mode,
bool unless_interrupted) { autohide = mode; hide_unless_interrupted = unless_interrupted; };
226 static const std::string class_button;
227 static const std::string class_web;
228 static const std::string class_inter;
231 static const std::string ask_end_libdar;
232 static const std::string force_end_libdar;
233 static const std::string close_libdar_screen;
246 std::shared_ptr<web_user_interaction> lib_data;
251 bool hide_unless_interrupted;
252 bool was_interrupted;
256 libthreadar::thread* managed_thread;
257 mutable libthreadar::condition all_threads_pending;
276 void adjust_visibility();
277 void check_libdata() {
if(!lib_data)
throw WEBDAR_BUG; };
278 void set_mode(mode_type m);
279 void update_html_from_libdar_status();
280 void update_controlled_thread_status();
281 void clean_threads_termination(
bool force);
282 void trigger_refresh();
283 void check_clean_status();
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
void set_visible(bool mode)
ask for the object to become visible in HTML page or temporarily hidden
Definition: body_builder.cpp:211
unsigned int size() const
access to adopted childs
Definition: body_builder.hpp:395
class chemin definition
Definition: chemin.hpp:51
class events
Definition: events.hpp:52
html component to display libdar returned statistics object
Definition: html_statistics.hpp:47
class html_text manage text and header in html document
Definition: html_text.hpp:52
body_builder component, providing an html interface to libdar::user_interaction
Definition: html_web_user_interaction.hpp:119
static const std::string dont_refresh
last changes forbid html refresh
Definition: html_web_user_interaction.hpp:124
bool has_libdar_been_aborted() const
whether libdar thread has been aborted (to be checked by the caller upon libdar_has_finished event)
Definition: html_web_user_interaction.hpp:211
void clear()
clear counters, logs and reset html interface and make the component become visible if it was not alr...
Definition: html_web_user_interaction.cpp:364
virtual void my_visibility_has_changed() override
available for inherited class to be informed when their visibility changes
Definition: html_web_user_interaction.cpp:424
virtual std::string inherited_get_body_part(const chemin &path, const request &req) override
inherited from body_builder, called by the webdar thread
Definition: html_web_user_interaction.cpp:256
static const std::string can_refresh
last changes makes the object html refreshable
Definition: html_web_user_interaction.hpp:123
void run_and_control_thread(libthreadar::thread *arg)
provide a libdar thread to be managed by this html_web_component (stop actions)
Definition: html_web_user_interaction.cpp:161
virtual void new_css_library_available() override
Definition: html_web_user_interaction.cpp:390
void hide_statistics()
hide statistics fields in the web interface
Definition: html_web_user_interaction.hpp:165
bool is_libdar_running() const
whether a libdar thread is running under "this" management
Definition: html_web_user_interaction.cpp:234
static const std::string display_started
when the object has been set visible
Definition: html_web_user_interaction.hpp:122
static const std::string libdar_has_finished
inform the caller that libdar has finished and user asked to close the "window" (or autohide was set)
Definition: html_web_user_interaction.hpp:125
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_web_user_interaction.cpp:291
void auto_hide(bool mode, bool unless_interrupted)
when the control thread has finished, this html_web_user_interaction object becomes invisible
Definition: html_web_user_interaction.hpp:147
void join_controlled_thread()
let the calling thread suspended until the controlled thread ends (the one passed to run_and_control_...
Definition: html_web_user_interaction.cpp:207
html_statistics & get_statistics()
libdar structure provided for user information
Definition: html_web_user_interaction.hpp:160
void set_warning_list_size(unsigned int size)
change the number of last warnings to display
Definition: html_web_user_interaction.hpp:136
std::shared_ptr< web_user_interaction > get_user_interaction()
libdar strcture provided for user interaction
Definition: html_web_user_interaction.hpp:157
class holding fields of an HTTP request (method, URI, header, cookies, and so on)
Definition: request.hpp:45