mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 18:13:55 -07:00
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
This commit is contained in:
parent
8dbdd24c8e
commit
b29bd9e070
272 changed files with 13378 additions and 9535 deletions
|
|
@ -1,12 +1,13 @@
|
|||
#ifndef REMOTECLIENT_H
|
||||
#define REMOTECLIENT_H
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include "abstractclient.h"
|
||||
#include <QTcpSocket>
|
||||
|
||||
class QTimer;
|
||||
|
||||
class RemoteClient : public AbstractClient {
|
||||
class RemoteClient : public AbstractClient
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void maxPingTime(int seconds, int maxSeconds);
|
||||
|
|
@ -17,8 +18,16 @@ signals:
|
|||
void socketError(const QString &errorString);
|
||||
void protocolVersionMismatch(int clientVersion, int serverVersion);
|
||||
void protocolError();
|
||||
void sigConnectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void sigRegisterToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password, const QString &_email, const int _gender, const QString &_country, const QString &_realname);
|
||||
void
|
||||
sigConnectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void sigRegisterToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_password,
|
||||
const QString &_email,
|
||||
const int _gender,
|
||||
const QString &_country,
|
||||
const QString &_realname);
|
||||
void sigActivateToServer(const QString &_token);
|
||||
void sigDisconnectFromServer();
|
||||
void notifyUserAboutUpdate();
|
||||
|
|
@ -26,9 +35,16 @@ signals:
|
|||
void sigForgotPasswordSuccess();
|
||||
void sigForgotPasswordError();
|
||||
void sigPromptForForgotPasswordReset();
|
||||
void sigSubmitForgotPasswordResetToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_token, const QString &_newpassword);
|
||||
void sigSubmitForgotPasswordResetToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_token,
|
||||
const QString &_newpassword);
|
||||
void sigPromptForForgotPasswordChallenge();
|
||||
void sigSubmitForgotPasswordChallengeToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_email);
|
||||
void sigSubmitForgotPasswordChallengeToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_email);
|
||||
private slots:
|
||||
void slotConnected();
|
||||
void readData();
|
||||
|
|
@ -39,17 +55,33 @@ private slots:
|
|||
void loginResponse(const Response &response);
|
||||
void registerResponse(const Response &response);
|
||||
void activateResponse(const Response &response);
|
||||
void doConnectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void doRegisterToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password, const QString &_email, const int _gender, const QString &_country, const QString &_realname);
|
||||
void
|
||||
doConnectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void doRegisterToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_password,
|
||||
const QString &_email,
|
||||
const int _gender,
|
||||
const QString &_country,
|
||||
const QString &_realname);
|
||||
void doLogin();
|
||||
void doDisconnectFromServer();
|
||||
void doActivateToServer(const QString &_token);
|
||||
void doRequestForgotPasswordToServer(const QString &hostname, unsigned int port, const QString &_userName);
|
||||
void requestForgotPasswordResponse(const Response &response);
|
||||
void doSubmitForgotPasswordResetToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_token, const QString &_newpassword);
|
||||
void doSubmitForgotPasswordResetToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_token,
|
||||
const QString &_newpassword);
|
||||
void submitForgotPasswordResetResponse(const Response &response);
|
||||
void doSubmitForgotPasswordChallengeToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_email);
|
||||
void doSubmitForgotPasswordChallengeToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_email);
|
||||
void submitForgotPasswordChallengeResponse(const Response &response);
|
||||
|
||||
private:
|
||||
static const int maxTimeout = 10;
|
||||
int timeRunning, lastDataReceived;
|
||||
|
|
@ -60,25 +92,44 @@ private:
|
|||
bool newMissingFeatureFound(QString _serversMissingFeatures);
|
||||
void clearNewClientFeatures();
|
||||
int messageLength;
|
||||
|
||||
|
||||
QTimer *timer;
|
||||
QTcpSocket *socket;
|
||||
QString lastHostname;
|
||||
int lastPort;
|
||||
QString getSrvClientID(const QString _hostname);
|
||||
protected slots:
|
||||
protected slots:
|
||||
void sendCommandContainer(const CommandContainer &cont);
|
||||
|
||||
public:
|
||||
RemoteClient(QObject *parent = 0);
|
||||
~RemoteClient();
|
||||
QString peerName() const { return socket->peerName(); }
|
||||
void connectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void registerToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password, const QString &_email, const int _gender, const QString &_country, const QString &_realname);
|
||||
QString peerName() const
|
||||
{
|
||||
return socket->peerName();
|
||||
}
|
||||
void
|
||||
connectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void registerToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_password,
|
||||
const QString &_email,
|
||||
const int _gender,
|
||||
const QString &_country,
|
||||
const QString &_realname);
|
||||
void activateToServer(const QString &_token);
|
||||
void disconnectFromServer();
|
||||
void requestForgotPasswordToServer(const QString &hostname, unsigned int port, const QString &_userName);
|
||||
void submitForgotPasswordResetToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_token, const QString &_newpassword);
|
||||
void submitForgotPasswordChallengeToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_email);
|
||||
void submitForgotPasswordResetToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_token,
|
||||
const QString &_newpassword);
|
||||
void submitForgotPasswordChallengeToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
const QString &_userName,
|
||||
const QString &_email);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue