Webdar 1.0.0
Web user interface to libdar
Public Member Functions | Protected Member Functions | List of all members
web_user_interaction Class Reference

class web_user_interaction provides a libdar::user_interaction interface to libdar More...

#include <web_user_interaction.hpp>

Inheritance diagram for web_user_interaction:
Inheritance graph
[legend]
Collaboration diagram for web_user_interaction:
Collaboration graph
[legend]

Public Member Functions

 web_user_interaction (unsigned int x_warn_size=10)
 the argument is the number latest message to retain from libdar
 
 web_user_interaction (const web_user_interaction &ref)=delete
 
 web_user_interaction (web_user_interaction &&ref) noexcept=delete
 
web_user_interactionoperator= (const web_user_interaction &ref)=delete
 
web_user_interactionoperator= (web_user_interaction &&ref) noexcept=delete
 
void set_warning_list_size (unsigned int size)
 change the number of last warnings to display
 
void clear ()
 clear logs and reset the object
 
std::list< std::string > get_warnings ()
 obtain a copy of the current log buffer
 
bool pending_pause (std::string &msg) const
 wether libdar is pending for pause answer
 
bool pending_get_string (std::string &msg, bool &echo) const
 wether libdar is pending for get_string answer
 
bool pending_get_secu_string (std::string &msg, bool &echo) const
 wether libdar is pending for a get_secu_string answer
 
void set_pause_answer (bool val)
 provide the answer to libdar for pause() request
 
void set_get_string_answer (const std::string &val)
 provide the answer to libdar for get_string() request
 
void set_get_secu_string_answer (const libdar::secu_string &val)
 provide the answer to libdar for get_secu_string() request
 
bool has_libdar_pending () const
 whether libdar is waiting for an answer
 

Protected Member Functions

virtual void inherited_message (const std::string &message) override
 
virtual bool inherited_pause (const std::string &message) override
 
virtual std::string inherited_get_string (const std::string &message, bool echo) override
 
virtual libdar::secu_string inherited_get_secu_string (const std::string &message, bool echo) override
 

Detailed Description

class web_user_interaction provides a libdar::user_interaction interface to libdar

this class is not an html_ body_builder class but rather holds information fields and status provided by libdar through the libdar::user_interaction interface. The main role of this class is to allow any thread to get access to this libdar running thread provided information, by mean of mutex on the internal/private data structure.

Note
web_user_interaction can has two sides, the libdar::user_interaction interface which is implemented by the inherited_* protected methods and the web_user_interaction interface that is provided by the public methods of the class. This object is given to libdar as is for user_interaction. And this object is consulted/interacted inside webdar possibly from another thread for html_ interaction (see html_web_user_interaction class for example)

The documentation for this class was generated from the following files: