File Linux/ClientPlatformSpecific.cpp
FileList > api > cppSDK > SDKClient > PlatformSpecific > Linux > ClientPlatformSpecific.cpp
Go to the source code of this file
#include "ClientPlatformSpecific.hpp"
#include <csignal>
#include <filesystem>
#include <fstream>
#include "ManusSDK.h"
#include <map>
#include <ncursesw/ncurses.h>
#include <termios.h>
#include "spdlog/spdlog.h"
Classes
Type | Name |
---|---|
class | ClientInput Handles keyboard input. Requires things to be set up with Ncurses and Termios. |
Public Static Attributes
Type | Name |
---|---|
ClientInput | g_Input |
Public Static Functions
Type | Name |
---|---|
void | HandleHangupSignal (int p_Parameter) Handle a hangup signal. Called to report that the user's terminal has disconnected. This can happen when connecting over the network, for example. It also happens if the terminal window is closed while debugging. |
void | HandleInterruptSignal (int p_Parameter) Handle an interrupt signal. Called when the INTR character is typed - usually ctrl + c. |
void | HandleQuitSignal (int p_Parameter) Handle a quit signal. Called when the QUIT character is typed - usually ctrl + . |
void | HandleTerminationSignal (int p_Parameter) Handle a signal telling the SDK client to quit. A generic signal used to "politely ask a program to terminate". On Linux, this can be sent by using the Gnome System Monitor and telling the SDK client process to end. |
bool | InitializeNcurses (void) Initialise Ncurses so that we can check for input. |
bool | InitializeTermios (void) Initialise Termios so that terminal output is correct. |
bool | SetUpSignalHandlers (void) Register our signal handling functions. |
Macros
Type | Name |
---|---|
define | CALL_DEFAULT_SIGNAL_HANDLER (p_SignalType) Reset a signal handler to its default, and then call it. For signal types and explanation, see: https://www.gnu.org/software/libc/manual/html_node/Standard-Signals.html . |
Public Static Attributes Documentation
variable g_Input
Public Static Functions Documentation
function HandleHangupSignal
function HandleInterruptSignal
function HandleQuitSignal
function HandleTerminationSignal
function InitializeNcurses
function InitializeTermios
function SetUpSignalHandlers
Macro Definition Documentation
define CALL_DEFAULT_SIGNAL_HANDLER
#define CALL_DEFAULT_SIGNAL_HANDLER (
p_SignalType
) /* Reset the handler for this signal to the default. */ \
signal(p_SignalType, SIG_DFL); \
/* Re-raise this signal, causing the normal handler to run. */ \
raise(p_SignalType);
The documentation for this class was generated from the following file api/cppSDK/SDKClient/PlatformSpecific/Linux/ClientPlatformSpecific.cpp