|
Babel
1
The voip software that only works on your local network
|
Manages a thread for user controls. More...
#include <ThreadCapsule.hpp>

Public Member Functions | |
| ThreadCapsule () | |
| ~ThreadCapsule () | |
| void | startThread () |
| Starts the thread to run the spamUserChoice function. | |
| void | stopThread (const unsigned int delay=2) |
| Stops the thread safely. | |
| const bool | isRunning () const |
| Checks if the thread is running. | |
| const std::string | getInfo (const unsigned int indent=0) const |
| Dumps the current state of the variables for debugging purposes. | |
| 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 | showPrompt () const |
| Displays the prompt to the user. | |
| 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. | |
Manages a thread for user controls.
Definition at line 28 of file ThreadCapsule.hpp.
| Controls::ThreadCapsule::ThreadCapsule | ( | ) |
Definition at line 15 of file ThreadCapsule.cpp.
| Controls::ThreadCapsule::~ThreadCapsule | ( | ) |
Definition at line 21 of file ThreadCapsule.cpp.
| const std::string Controls::ThreadCapsule::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 279 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::hangUpTheCall | ( | ) | const |
Checks if the call should be hung up.
Definition at line 220 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isEcho | ( | ) | const |
Checks if echo is enabled.
Definition at line 170 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isHelp | ( | ) | const |
Checks if help is enabled.
Definition at line 180 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isLooping | ( | ) | const |
Checks if looping is enabled.
Definition at line 200 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isPlaying | ( | ) | const |
Checks if playing is enabled.
Definition at line 190 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isRecording | ( | ) | const |
Checks if recording is enabled.
Definition at line 210 of file ThreadCapsule.cpp.
| const bool Controls::ThreadCapsule::isRunning | ( | ) | const |
Checks if the thread is running.
Definition at line 100 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::setEcho | ( | const bool | echo | ) |
Sets the echo state.
| echo | The new echo state. |
Definition at line 110 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::setHelp | ( | const bool | help | ) |
Sets the help state.
| help | The new help state. |
Definition at line 120 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::setLooping | ( | const bool | looping | ) |
Sets the looping state.
| looping | The new looping state. |
Definition at line 140 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::setPlaying | ( | const bool | playing | ) |
Sets the playing state.
| playing | The new playing state. |
Definition at line 130 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::setRecording | ( | const bool | recording | ) |
Sets the recording state.
| recording | The new recording state. |
Definition at line 150 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::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 160 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::showPrompt | ( | ) | const |
Displays the prompt to the user.
Shows the prompt to the user.
Definition at line 228 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::startThread | ( | ) |
Starts the thread to run the spamUserChoice function.
Starts the thread for user controls.
Definition at line 31 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::stopThread | ( | const unsigned int | delay = 2 | ) |
Stops the thread safely.
Stops the thread for user controls.
Definition at line 43 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::toggleEcho | ( | ) |
Toggles the echo state.
Definition at line 236 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::toggleHelp | ( | ) |
Toggles the help state.
Definition at line 244 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::toggleLooping | ( | ) |
Toggles the looping state.
Definition at line 260 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::togglePlaying | ( | ) |
Toggles the playing state.
Definition at line 252 of file ThreadCapsule.cpp.
| void Controls::ThreadCapsule::toggleRecording | ( | ) |
Toggles the recording state.
Definition at line 268 of file ThreadCapsule.cpp.