1#ifndef WAVELENGTH_JOINER_H
2#define WAVELENGTH_JOINER_H
void wavelengthClosed(QString frequency)
Emitted if the WebSocket connection for the wavelength is closed unexpectedly (e.g....
JoinResult JoinWavelength(QString frequency, const QString &password=QString())
Attempts to join an existing wavelength hosted on the relay server. Checks if the wavelength is alrea...
Definition wavelength_joiner.cpp:12
~WavelengthJoiner() override=default
Private destructor.
void authenticationFailed(QString frequency)
Emitted if the join attempt fails due to incorrect or missing password.
void wavelengthLeft(QString frequency)
Emitted when the user explicitly leaves or is disconnected from the active wavelength.
void connectionError(const QString &error_message)
Emitted if an error occurs during the connection or join process.
WavelengthJoiner(QObject *parent=nullptr)
Private constructor to enforce the singleton pattern.
Definition wavelength_joiner.h:99
void wavelengthJoined(QString frequency)
Emitted when the user successfully joins the specified wavelength.
static WavelengthJoiner * GetInstance()
Gets the singleton instance of the WavelengthJoiner.
Definition wavelength_joiner.h:33
void messageReceived(QString frequency, const QString &formatted_message)
Emitted when a regular chat message is received for the joined frequency. Note: This signal seems mis...
WavelengthJoiner & operator=(const WavelengthJoiner &)=delete
Deleted assignment operator to prevent assignment.
WavelengthJoiner(const WavelengthJoiner &)=delete
Deleted copy constructor to prevent copying.
Represents the result of an attempt to join a wavelength.
Definition wavelength_joiner.h:9
bool success
True if the join attempt was successful, false otherwise.
Definition wavelength_joiner.h:11
QString error_reason
If success is false, contains a string describing the reason for failure (e.g., "Password required",...
Definition wavelength_joiner.h:13