QTfrontend/net/newnetclient.h
changeset 14865 90cf07c60feb
parent 14838 bdb47255d7e4
child 14866 e088bd03812d
equal deleted inserted replaced
14864:0c231b5184c5 14865:90cf07c60feb
    41 class HWNewNet : public QObject
    41 class HWNewNet : public QObject
    42 {
    42 {
    43         Q_OBJECT
    43         Q_OBJECT
    44 
    44 
    45     public:
    45     public:
    46         enum ClientState { Disconnected, Connecting, Connected, InLobby, InRoom, InGame };
    46         enum ClientState { Disconnected, Connecting, Redirected, Connected, InLobby, InRoom, InGame };
    47 
    47 
    48         HWNewNet();
    48         HWNewNet();
    49         ~HWNewNet();
    49         ~HWNewNet();
    50         void Connect(const QString & hostName, quint16 port, const QString & nick);
    50         void Connect(const QString & hostName, quint16 port, bool useTls, const QString & nick);
       
    51         void ContinueConnection();
    51         void Disconnect();
    52         void Disconnect();
    52         void SendPasswordHash(const QString & hash);
    53         void SendPasswordHash(const QString & hash);
    53         void NewNick(const QString & nick);
    54         void NewNick(const QString & nick);
    54         bool isRoomChief();
    55         bool isRoomChief();
    55         bool isInRoom();
    56         bool isInRoom();
    85         QStringList cmdbuf;
    86         QStringList cmdbuf;
    86 
    87 
    87         int  ByteLength(const QString & str);
    88         int  ByteLength(const QString & str);
    88         void RawSendNet(const QString & buf);
    89         void RawSendNet(const QString & buf);
    89         void RawSendNet(const QByteArray & buf);
    90         void RawSendNet(const QByteArray & buf);
    90         void ParseCmd(const QStringList & lst);
    91         void ParseCmd(const QStringList & lst);        
    91         void handleNotice(int n);
    92         void handleNotice(int n);
    92 
    93 
    93         void maybeSendPassword();
    94         void maybeSendPassword();
    94 
    95 
    95         ClientState netClientState;
    96         ClientState netClientState;