Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
system_tray Namespace Reference

Handles the system tray icon and notification system. More...

Functions

void tray_open_ui_cb (struct tray_menu *item)
 Callback for opening the UI from the system tray.
void tray_force_stop_cb (struct tray_menu *item)
void tray_restart_cb (struct tray_menu *item)
 Callback for resetting display device configuration.
void tray_quit_cb (struct tray_menu *item)
 Callback for exiting Sunshine from the system tray.
int init_tray ()
 Initializes the system tray without starting a loop.
int process_tray_events ()
 Processes a single tray event iteration.
int end_tray ()
 Exit the system tray.
void update_tray_playing (std::string app_name)
 Sets the tray icon in playing mode and spawns the appropriate notification.
void update_tray_pausing (std::string app_name)
 Sets the tray icon in pausing mode (stream stopped but app running) and spawns the appropriate notification.
void update_tray_stopped (std::string app_name)
 Sets the tray icon in stopped mode (app and stream stopped) and spawns the appropriate notification.
void update_tray_launch_error (std::string app_name, int exit_code)
void update_tray_session_error (std::string reason)
 Spawns a notification for a session that could not start at all.
void update_tray_require_pin ()
 Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
void update_tray_paired (std::string device_name)
void update_tray_client_connected (std::string client_name)
int init_tray_threaded ()
 Initializes and runs the system tray in a separate thread.
int end_tray_threaded ()
 Stops the threaded system tray and waits for the thread to finish.

Detailed Description

Handles the system tray icon and notification system.

Function Documentation

◆ end_tray()

int system_tray::end_tray ( )

Exit the system tray.

Returns
0 after exiting the system tray.

Definition at line 135 of file system_tray.cpp.

◆ end_tray_threaded()

int system_tray::end_tray_threaded ( )

Stops the threaded system tray and waits for the thread to finish.

Returns
0 after stopping the threaded tray.

Definition at line 405 of file system_tray.cpp.

◆ init_tray()

int system_tray::init_tray ( )

Initializes the system tray without starting a loop.

Returns
0 if initialization was successful, non-zero otherwise.

Definition at line 109 of file system_tray.cpp.

◆ init_tray_threaded()

int system_tray::init_tray_threaded ( )

Initializes and runs the system tray in a separate thread.

Returns
0 if initialization was successful, non-zero otherwise.

Definition at line 355 of file system_tray.cpp.

◆ process_tray_events()

int system_tray::process_tray_events ( )

Processes a single tray event iteration.

Returns
0 if processing was successful, non-zero otherwise.

Definition at line 121 of file system_tray.cpp.

◆ tray_force_stop_cb()

void system_tray::tray_force_stop_cb ( struct tray_menu * item)

Definition at line 60 of file system_tray.cpp.

◆ tray_open_ui_cb()

void system_tray::tray_open_ui_cb ( struct tray_menu * item)

Callback for opening the UI from the system tray.

Parameters
itemThe tray menu item.

Definition at line 54 of file system_tray.cpp.

◆ tray_quit_cb()

void system_tray::tray_quit_cb ( struct tray_menu * item)

Callback for exiting Sunshine from the system tray.

Parameters
itemThe tray menu item.

Definition at line 72 of file system_tray.cpp.

◆ tray_restart_cb()

void system_tray::tray_restart_cb ( struct tray_menu * item)

Callback for resetting display device configuration.

Parameters
itemThe tray menu item.

Callback for restarting Sunshine from the system tray.

Parameters
itemThe tray menu item.

Definition at line 65 of file system_tray.cpp.

◆ update_tray_client_connected()

void system_tray::update_tray_client_connected ( std::string client_name)

Definition at line 305 of file system_tray.cpp.

◆ update_tray_launch_error()

void system_tray::update_tray_launch_error ( std::string app_name,
int exit_code )

Definition at line 212 of file system_tray.cpp.

◆ update_tray_paired()

void system_tray::update_tray_paired ( std::string device_name)

Definition at line 285 of file system_tray.cpp.

◆ update_tray_pausing()

void system_tray::update_tray_pausing ( std::string app_name)

Sets the tray icon in pausing mode (stream stopped but app running) and spawns the appropriate notification.

Parameters
app_nameThe paused application name

Definition at line 168 of file system_tray.cpp.

◆ update_tray_playing()

void system_tray::update_tray_playing ( std::string app_name)

Sets the tray icon in playing mode and spawns the appropriate notification.

Parameters
app_nameThe started application name

Definition at line 143 of file system_tray.cpp.

◆ update_tray_require_pin()

void system_tray::update_tray_require_pin ( )

Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.

Definition at line 262 of file system_tray.cpp.

◆ update_tray_session_error()

void system_tray::update_tray_session_error ( std::string reason)

Spawns a notification for a session that could not start at all.

A stream that fails before it begins is felt as "it just does not work": the client shows a generic error and the host shows nothing. This puts the reason where someone will actually see it.

Parameters
reasonPlain-language reason, shown as the notification body.

Definition at line 237 of file system_tray.cpp.

◆ update_tray_stopped()

void system_tray::update_tray_stopped ( std::string app_name)

Sets the tray icon in stopped mode (app and stream stopped) and spawns the appropriate notification.

Parameters
app_nameThe started application name

Definition at line 189 of file system_tray.cpp.