summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPixel <Pixel>2001-10-29 16:23:12 +0000
committerPixel <Pixel>2001-10-29 16:23:12 +0000
commita259ec553a1d685ebb976ec34eaaf700d24ee0c4 (patch)
treeca310bfa8858bc3d5a1602789ecbe41e9c2ca3dd /include
parent2e5bed84841f33ff28dd95b77b555720c875a286 (diff)
More tasking implementation
Diffstat (limited to 'include')
-rw-r--r--include/CopyJob.h20
-rw-r--r--include/Exceptions.h1
-rw-r--r--include/Handle.h6
-rw-r--r--include/Makefile.am3
-rw-r--r--include/ReadJob.h20
5 files changed, 45 insertions, 5 deletions
diff --git a/include/CopyJob.h b/include/CopyJob.h
index e69de29..69eb088 100644
--- a/include/CopyJob.h
+++ b/include/CopyJob.h
@@ -0,0 +1,20 @@
+#ifndef __COPYJOB_H__
+#define __COPYJOB_H__
+#ifdef __cplusplus
+
+#include <Task.h>
+#include <Handle.h>
+
+class CopyJob : public Task {
+ public:
+ CopyJob(Handle &, Handle &);
+ virtual ~CopyJob();
+ virtual int Do();
+ private:
+ Handle s, d;
+};
+
+#else
+#error This only works with a C++ compiler
+#endif
+#endif
diff --git a/include/Exceptions.h b/include/Exceptions.h
index 16737e0..87ba6d1 100644
--- a/include/Exceptions.h
+++ b/include/Exceptions.h
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <unistd.h>
#include <stddef.h>
+#include <string.h>
/*
* Gère les exceptions du système. Le programme principal devrait tenter
diff --git a/include/Handle.h b/include/Handle.h
index 3cb16f1..1541bbe 100644
--- a/include/Handle.h
+++ b/include/Handle.h
@@ -33,9 +33,9 @@ class Handle : public Base {
bool IsClosed(void);
bool IsNonBlock(void);
void SetNonBlock(void);
- virtual bool CanRead() = 0;
- virtual bool CanWrite() = 0;
- virtual String GetName() = 0;
+ virtual bool CanRead();
+ virtual bool CanWrite();
+ virtual String GetName();
protected:
Handle(int h);
int GetHandle();
diff --git a/include/Makefile.am b/include/Makefile.am
index 4175224..245640d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,4 @@
include_HEADERS = \
Exceptions.h Handle.h String.h Output.h Socket.h HttpServ.h Variables.h Menu.h \
Action.h Message.h Form.h Confirm.h Table.h IRC.h Task.h Buffer.h General.h \
-Misc.h
-
+CopyJob.h ReadJob.h
diff --git a/include/ReadJob.h b/include/ReadJob.h
new file mode 100644
index 0000000..19009a6
--- /dev/null
+++ b/include/ReadJob.h
@@ -0,0 +1,20 @@
+#ifndef __READJOB_H__
+#define __READJOB_H__
+#ifdef __cplusplus
+
+#include <Task.h>
+#include <Handle.h>
+
+class ReadJob : public Task {
+ public:
+ ReadJob(Handle &, Handle &);
+ virtual ~ReadJob();
+ virtual int Do();
+ private:
+ Handle s, d;
+};
+
+#else
+#error This only works with a C++ compiler
+#endif
+#endif