|
Babel
1
The voip software that only works on your local network
|
Manages user input and control states. More...
#include <UserControls.hpp>

Public Member Functions | |
| UserControls () | |
| ~UserControls () | |
| void | setEcho (const bool echo) |
| Sets the echo state. | |
| void | setHelp (const bool help) |
| Sets the help state. | |
| void | setPlaying (const bool playing) |
| Sets the playing state. | |
| void | setLooping (const bool looping) |
| Sets the looping state. | |
| void | setRecording (const bool recording) |
| Sets the recording state. | |
| void | setUserChoice (const std::string &userChoice) |
| Processes the user choice. | |
| const bool | isEcho () const |
| Checks if echo is enabled. | |
| const bool | isHelp () const |
| Checks if help is enabled. | |
| const bool | isPlaying () const |
| Checks if playing is enabled. | |
| const bool | isLooping () const |
| Checks if looping is enabled. | |
| const bool | isRecording () const |
| Checks if recording is enabled. | |
| const bool | hangUpTheCall () const |
| Checks if the call should be hung up. | |
| void | toggleEcho () |
| Toggles the echo state. | |
| void | toggleHelp () |
| Toggles the help state. | |
| void | togglePlaying () |
| Toggles the playing state. | |
| void | toggleLooping () |
| Toggles the looping state. | |
| void | toggleRecording () |
| Toggles the recording state. | |
| const bool | getEcho () const |
| Gets the echo state. | |
| const bool | getHelp () const |
| Gets the help state. | |
| const bool | getPlaying () const |
| Gets the playing state. | |
| const bool | getLooping () const |
| Gets the looping state. | |
| const bool | getRecording () const |
| Gets the recording state. | |
| void | spamUserChoice () |
| Continuously prompts the user for input and processes it. | |
| const std::string | getInfo (const unsigned int indent=0) const |
| Dumps the current state of the variables for debugging purposes. | |
| void | showPrompt () const |
| Displays the prompt to the user. | |
Manages user input and control states.
Definition at line 26 of file UserControls.hpp.
| Controls::UserControls::UserControls | ( | ) |
Definition at line 18 of file UserControls.cpp.
| Controls::UserControls::~UserControls | ( | ) |
Definition at line 23 of file UserControls.cpp.
| const bool Controls::UserControls::getEcho | ( | ) | const |
| const bool Controls::UserControls::getHelp | ( | ) | const |
| const std::string Controls::UserControls::getInfo | ( | const unsigned int | indent = 0 | ) | const |
Dumps the current state of the variables for debugging purposes.
| indent | The level to which the class should be indented in the dump. |
Definition at line 382 of file UserControls.cpp.
| const bool Controls::UserControls::getLooping | ( | ) | const |
| const bool Controls::UserControls::getPlaying | ( | ) | const |
| const bool Controls::UserControls::getRecording | ( | ) | const |
Gets the recording state.
Definition at line 289 of file UserControls.cpp.
| const bool Controls::UserControls::hangUpTheCall | ( | ) | const |
Checks if the call should be hung up.
Definition at line 199 of file UserControls.cpp.
| const bool Controls::UserControls::isEcho | ( | ) | const |
Checks if echo is enabled.
Definition at line 149 of file UserControls.cpp.
| const bool Controls::UserControls::isHelp | ( | ) | const |
Checks if help is enabled.
Definition at line 159 of file UserControls.cpp.
| const bool Controls::UserControls::isLooping | ( | ) | const |
Checks if looping is enabled.
Definition at line 179 of file UserControls.cpp.
| const bool Controls::UserControls::isPlaying | ( | ) | const |
Checks if playing is enabled.
Definition at line 169 of file UserControls.cpp.
| const bool Controls::UserControls::isRecording | ( | ) | const |
Checks if recording is enabled.
Definition at line 189 of file UserControls.cpp.
| void Controls::UserControls::setEcho | ( | const bool | echo | ) |
Sets the echo state.
| echo | The new echo state. |
Definition at line 32 of file UserControls.cpp.
| void Controls::UserControls::setHelp | ( | const bool | help | ) |
Sets the help state.
| help | The new help state. |
Definition at line 42 of file UserControls.cpp.
| void Controls::UserControls::setLooping | ( | const bool | looping | ) |
Sets the looping state.
| looping | The new looping state. |
Definition at line 62 of file UserControls.cpp.
| void Controls::UserControls::setPlaying | ( | const bool | playing | ) |
Sets the playing state.
| playing | The new playing state. |
Definition at line 52 of file UserControls.cpp.
| void Controls::UserControls::setRecording | ( | const bool | recording | ) |
Sets the recording state.
| recording | The new recording state. |
Definition at line 72 of file UserControls.cpp.
| void Controls::UserControls::setUserChoice | ( | const std::string & | userChoice | ) |
Processes the user choice.
Sets the user choice and performs the corresponding action.
| userChoice | The user choice. |
Definition at line 82 of file UserControls.cpp.
| void Controls::UserControls::showPrompt | ( | ) | const |
Displays the prompt to the user.
Shows the prompt to the user.
Definition at line 332 of file UserControls.cpp.
| void Controls::UserControls::spamUserChoice | ( | ) |
Continuously prompts the user for input and processes it.
Continuously prompts the user for input and processes the choice.
Definition at line 354 of file UserControls.cpp.
| void Controls::UserControls::toggleEcho | ( | ) |
Toggles the echo state.
Definition at line 207 of file UserControls.cpp.
| void Controls::UserControls::toggleHelp | ( | ) |
Toggles the help state.
Definition at line 215 of file UserControls.cpp.
| void Controls::UserControls::toggleLooping | ( | ) |
Toggles the looping state.
Definition at line 231 of file UserControls.cpp.
| void Controls::UserControls::togglePlaying | ( | ) |
Toggles the playing state.
Definition at line 223 of file UserControls.cpp.
| void Controls::UserControls::toggleRecording | ( | ) |
Toggles the recording state.
Definition at line 239 of file UserControls.cpp.