mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
General: 80 columns refactor in C/C++ headers
This commit is contained in:
parent
a3cbbf3ea9
commit
386e1f3b46
3
Config.h
3
Config.h
@ -33,7 +33,8 @@ class Config
|
||||
void SetPassword(const char *password);
|
||||
bool CheckAuth(const char *userChallenge);
|
||||
const char* GenerateSalt();
|
||||
static const char* GenerateSecret(const char *password, const char *salt);
|
||||
static const char* GenerateSecret(
|
||||
const char *password, const char *salt);
|
||||
|
||||
bool ServerEnabled;
|
||||
uint64_t ServerPort;
|
||||
|
8
Utils.h
8
Utils.h
@ -34,7 +34,8 @@ class Utils
|
||||
public:
|
||||
static obs_data_array_t* GetSceneItems(obs_source_t *source);
|
||||
static obs_data_t* GetSceneItemData(obs_scene_item *item);
|
||||
static obs_sceneitem_t* GetSceneItemFromName(obs_source_t *source, const char *name);
|
||||
static obs_sceneitem_t* GetSceneItemFromName(
|
||||
obs_source_t *source, const char *name);
|
||||
static obs_source_t* GetTransitionFromName(const char *search_name);
|
||||
static obs_source_t* GetSceneFromNameOrCurrent(const char *scene_name);
|
||||
|
||||
@ -67,7 +68,10 @@ class Utils
|
||||
static const char* OBSVersionString();
|
||||
|
||||
static QSystemTrayIcon* GetTrayIcon();
|
||||
static void SysTrayNotify(QString &text, QSystemTrayIcon::MessageIcon n, QString title = QString("obs-websocket"));
|
||||
static void SysTrayNotify(
|
||||
QString &text,
|
||||
QSystemTrayIcon::MessageIcon n,
|
||||
QString title = QString("obs-websocket"));
|
||||
|
||||
static QString FormatIPAddress(QHostAddress &addr);
|
||||
static const char* GetRecordingFolder();
|
||||
|
@ -31,7 +31,8 @@ class WSEvents : public QObject
|
||||
public:
|
||||
explicit WSEvents(WSServer *srv);
|
||||
~WSEvents();
|
||||
static void FrontendEventHandler(enum obs_frontend_event event, void *private_data);
|
||||
static void FrontendEventHandler(
|
||||
enum obs_frontend_event event, void *private_data);
|
||||
void connectTransitionSignals(obs_source_t* transition);
|
||||
void connectSceneSignals(obs_source_t* scene);
|
||||
static WSEvents* Instance;
|
||||
@ -45,7 +46,8 @@ class WSEvents : public QObject
|
||||
void deferredInitOperations();
|
||||
void StreamStatus();
|
||||
void TransitionDurationChanged(int ms);
|
||||
void SelectedSceneChanged(QListWidgetItem *current, QListWidgetItem *prev);
|
||||
void SelectedSceneChanged(
|
||||
QListWidgetItem *current, QListWidgetItem *prev);
|
||||
void ModeSwitchClicked(bool checked);
|
||||
|
||||
private:
|
||||
@ -62,7 +64,8 @@ class WSEvents : public QObject
|
||||
uint64_t _lastBytesSent;
|
||||
uint64_t _lastBytesSentTime;
|
||||
|
||||
void broadcastUpdate(const char *updateType, obs_data_t *additionalFields);
|
||||
void broadcastUpdate(const char *updateType,
|
||||
obs_data_t *additionalFields);
|
||||
|
||||
void OnSceneChange();
|
||||
void OnSceneListChange();
|
||||
|
@ -54,22 +54,18 @@ void SettingsDialog::showEvent(QShowEvent *event)
|
||||
|
||||
void SettingsDialog::ToggleShowHide()
|
||||
{
|
||||
if (!isVisible()) {
|
||||
if (!isVisible())
|
||||
setVisible(true);
|
||||
}
|
||||
else {
|
||||
else
|
||||
setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::AuthCheckboxChanged()
|
||||
{
|
||||
if (ui->authRequired->isChecked()) {
|
||||
if (ui->authRequired->isChecked())
|
||||
ui->password->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
else
|
||||
ui->password->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::FormAccepted()
|
||||
@ -90,14 +86,10 @@ void SettingsDialog::FormAccepted()
|
||||
}
|
||||
|
||||
if (strcmp(Config::Current()->Secret, "") != 0)
|
||||
{
|
||||
conf->AuthRequired = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
conf->AuthRequired = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
conf->AuthRequired = false;
|
||||
@ -106,13 +98,9 @@ void SettingsDialog::FormAccepted()
|
||||
conf->Save();
|
||||
|
||||
if (conf->ServerEnabled)
|
||||
{
|
||||
WSServer::Instance->Start(conf->ServerPort);
|
||||
}
|
||||
else
|
||||
{
|
||||
WSServer::Instance->Stop();
|
||||
}
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog()
|
||||
|
Loading…
x
Reference in New Issue
Block a user