summaryrefslogtreecommitdiff
path: root/qt/consoleserver/irc.h
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-07-06 19:04:48 +0930
committerdaniel-Jones <daniel@danieljon.es>2017-07-06 19:04:48 +0930
commitd3624454f67e3afc026d7e16546f5549e67f6102 (patch)
treee370fc7bd48c58f9d4a523d9eb7c554ebf6b461e /qt/consoleserver/irc.h
parent9834782c287b1dc6df59a03e5992911d8fb70a83 (diff)
downloadRGB-Controller-d3624454f67e3afc026d7e16546f5549e67f6102.tar.gz
RGB-Controller-d3624454f67e3afc026d7e16546f5549e67f6102.zip
Added console based server that allows clients to connect and send commands to the microcontroller, does not require X to use, includes the IRC bot. Also included my beginning works on a c ncurses based client.
Diffstat (limited to 'qt/consoleserver/irc.h')
-rw-r--r--qt/consoleserver/irc.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/qt/consoleserver/irc.h b/qt/consoleserver/irc.h
new file mode 100644
index 0000000..733bebf
--- /dev/null
+++ b/qt/consoleserver/irc.h
@@ -0,0 +1,38 @@
+#ifndef IRC_H
+#define IRC_H
+
+#include <QtNetwork/QTcpSocket>
+#include <QDebug>
+#include <QTimer>
+
+class irc : public QObject
+{
+ Q_OBJECT
+ public:
+ explicit irc(QObject *parent = 0);
+ void setup(QString srv, int p, QString c, QString n);
+ void discon();
+ void sendmsg(QString msg);
+ private:
+ QTcpSocket *socket;
+ QString server;
+ int port;
+ QString channel;
+ QString name;
+ QString buf;
+ bool pinged;
+ QTimer *pingcheck;
+
+ private slots:
+ void read();
+ void con();
+ void handle(QString str);
+ void pingcheckfunc();
+
+ signals:
+ void sendcmd(QString cmd);
+
+ public slots:
+};
+
+#endif // IRC_H