summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h
diff options
context:
space:
mode:
authorFishbone <fishbone@miranda-ng.org>2013-06-02 16:19:21 +0000
committerFishbone <fishbone@miranda-ng.org>2013-06-02 16:19:21 +0000
commitab7e0b08fa8c31cf1d468ab4b3c660e2b1836811 (patch)
tree52977603ea0f431adff16573d3d5b46a95843c7f /protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h
parent8320783f99419db1e40346fdb292c19ee008948b (diff)
Added WhatsApp-protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@4861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h b/protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h
new file mode 100644
index 0000000000..a2d82efc64
--- /dev/null
+++ b/protocols/WhatsApp/src/WhatsAPI++/ISocketConnection.h
@@ -0,0 +1,25 @@
+#ifndef ISOCKETCONNECTION_H_
+#define ISOCKETCONNECTION_H_
+
+#include <vector>
+
+class ISocketConnection {
+
+public:
+ ISocketConnection() {}
+ virtual void write(int i) = 0;
+ virtual unsigned char read() = 0;
+ virtual void flush() = 0;
+ virtual void write(const std::vector<unsigned char>& b, int length) = 0;
+ virtual void write(const std::vector<unsigned char>& bytes, int offset, int length) = 0;
+ virtual int read(std::vector<unsigned char>& b, int off, int length) = 0;
+ virtual void makeNonBlock() = 0;
+ virtual int waitForRead() = 0;
+ virtual void forceShutdown() = 0;
+
+ virtual ~ISocketConnection() {}
+ //static void initNetwork();
+ //static void quitNetwork();
+};
+
+#endif /* ISOCKETCONNECTION_H_ */