From a259ec553a1d685ebb976ec34eaaf700d24ee0c4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 29 Oct 2001 16:23:12 +0000 Subject: More tasking implementation --- include/CopyJob.h | 20 ++++++++++++++++++++ include/Exceptions.h | 1 + include/Handle.h | 6 +++--- include/Makefile.am | 3 +-- include/ReadJob.h | 20 ++++++++++++++++++++ 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 include/ReadJob.h (limited to 'include') 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 +#include + +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 #include #include +#include /* * 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 +#include + +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 -- cgit v1.2.3