|
@@ -17,11 +17,11 @@ class App : public QCoreApplication
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
- explicit App(int &argc, char **argv);
|
|
|
- ~App();
|
|
|
+ explicit App(int &argc, char **argv);
|
|
|
+ ~App();
|
|
|
|
|
|
- void print(const QString& msg);
|
|
|
- void broadcast(const QString& msg, int *serverCount, int *userCount);
|
|
|
+ void print(const QString& msg);
|
|
|
+ void broadcast(const QString& msg, int *serverCount, int *userCount);
|
|
|
void broadcast(const QString& msg, ActiveClient* ignoredClient = 0);
|
|
|
void requestBroadcast(const QString& type, const QString& user, const QString& server, const QString& message);
|
|
|
void setReplyHash(const QString& serverAddress, const QString& hash);
|
|
@@ -35,39 +35,39 @@ protected:
|
|
|
private:
|
|
|
QTcpSocket* mySocket;
|
|
|
QTcpServer* myServer;
|
|
|
- bool mySocketConnectedFlag;
|
|
|
+ bool mySocketConnectedFlag;
|
|
|
SshClient* myQWNETSshClient;
|
|
|
|
|
|
QList<ActiveClient*> myClients;
|
|
|
- quint32 myCurrentClient;
|
|
|
- QSettings mySettings;
|
|
|
- int myClientsFrameTimerID; //timer for mainloop
|
|
|
+ quint32 myCurrentClient;
|
|
|
+ QSettings mySettings;
|
|
|
+ int myClientsFrameTimerID; //timer for mainloop
|
|
|
QStringList myLastMessages;
|
|
|
|
|
|
- void loadServerList();
|
|
|
+ void loadServerList();
|
|
|
void saveServerList();
|
|
|
- void cleanup();
|
|
|
+ void cleanup();
|
|
|
void addMessageToHistory(const QString& msg);
|
|
|
|
|
|
/* TCP Server */
|
|
|
- bool checkPassword(const QString& password);
|
|
|
- void addClient(const QString& host, quint16 port);
|
|
|
- void removeClient(const QString& host, quint16 port);
|
|
|
- void parseAddClientCommand(const QString& args);
|
|
|
- void parseRemoveClientCommand(const QString& args);
|
|
|
- void setTeam(const QString& team);
|
|
|
- void listClients();
|
|
|
- void setColor(const QString& args);
|
|
|
- void setNick(const QString& args);
|
|
|
- void setPing(const QString& args);
|
|
|
- void help();
|
|
|
+ bool checkPassword(const QString& password);
|
|
|
+ void addClient(const QString& host, quint16 port);
|
|
|
+ void removeClient(const QString& host, quint16 port);
|
|
|
+ void parseAddClientCommand(const QString& args);
|
|
|
+ void parseRemoveClientCommand(const QString& args);
|
|
|
+ void setTeam(const QString& team);
|
|
|
+ void listClients();
|
|
|
+ void setColor(const QString& args);
|
|
|
+ void setNick(const QString& args);
|
|
|
+ void setPing(const QString& args);
|
|
|
+ void help();
|
|
|
bool parseCommandLine();
|
|
|
|
|
|
private slots:
|
|
|
/* TCP server */
|
|
|
- void onDataArrival();
|
|
|
- void onNewConnection();
|
|
|
- void onDisconnection();
|
|
|
+ void onDataArrival();
|
|
|
+ void onNewConnection();
|
|
|
+ void onDisconnection();
|
|
|
};
|
|
|
|
|
|
#endif // APP_H
|