summaryrefslogtreecommitdiff
path: root/src/protocol/fqterm_local_socket.h
diff options
context:
space:
mode:
authorIru Dog <mytbk920423@gmail.com>2014-11-02 19:36:03 +0800
committerIru Dog <mytbk920423@gmail.com>2014-11-02 19:36:03 +0800
commit68d84181d53cc1b3cfab0b9a1505a1599744991d (patch)
treedb1a4cf95686f5ebe9804b666375f94e5630dd45 /src/protocol/fqterm_local_socket.h
parent12544b035e8b5fdecfad472e5a9b1eea106d42a1 (diff)
downloadfqterm-68d84181d53cc1b3cfab0b9a1505a1599744991d.tar.xz
split fqterm_socket to fqterm_*_socket files
Diffstat (limited to 'src/protocol/fqterm_local_socket.h')
-rw-r--r--src/protocol/fqterm_local_socket.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/protocol/fqterm_local_socket.h b/src/protocol/fqterm_local_socket.h
new file mode 100644
index 0000000..87bd692
--- /dev/null
+++ b/src/protocol/fqterm_local_socket.h
@@ -0,0 +1,34 @@
+#ifndef FQTERM_LOCAL_SOCKET_H
+#define FQTERM_LOCAL_SOCKET_H
+
+#include "fqterm_socket.h"
+
+namespace FQTerm {
+
+class FQTermLocalSocket: public FQTermSocket {
+ Q_OBJECT;
+private:
+ QString shell_bin_;
+ QProcess* shell_process_;
+public:
+ FQTermLocalSocket(const QString& shell_bin);
+ ~FQTermLocalSocket();
+ void flush(){}
+ void setProxy(int nProxyType, bool bAuth, const QString &strProxyHost,
+ quint16 uProxyPort, const QString &strProxyUsr,
+ const QString &strProxyPwd){}
+ void connectToHost(const QString &host, quint16 port);
+ void close();
+ QByteArray readBlock(unsigned long maxlen);
+ long writeBlock(const QByteArray &data);
+ unsigned long bytesAvailable();
+
+public slots:
+ void stateChanged(QProcess::ProcessState newState);
+ void finished (int exitCode, QProcess::ExitStatus exitStatus);
+
+};
+
+}
+
+#endif