diff options
author | pixel <pixel> | 2003-01-22 17:39:45 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-01-22 17:39:45 +0000 |
commit | 4c8f2ee73fc063871bdac980a135417882e1eb73 (patch) | |
tree | b7bb4c166f2b3de323d251da216e0462c1e8061c /include | |
parent | 16dc2e2b04e703a4a41b4d85a019834b4a6fef6e (diff) |
homygod
Diffstat (limited to 'include')
-rw-r--r-- | include/Handle.h | 2 | ||||
-rw-r--r-- | include/Input.h | 42 |
2 files changed, 32 insertions, 12 deletions
diff --git a/include/Handle.h b/include/Handle.h index 998c126..25b22a7 100644 --- a/include/Handle.h +++ b/include/Handle.h @@ -29,7 +29,7 @@ class Handle : public Base { void close() throw (GeneralException); int GetHandle(); virtual bool CanWatch() const; - virtual void Dup(const Handle &); + virtual int Dup() const; virtual void SetZ(int = 9) throw (GeneralException); protected: Handle(int h); diff --git a/include/Input.h b/include/Input.h index 9395687..19d8f7d 100644 --- a/include/Input.h +++ b/include/Input.h @@ -6,6 +6,10 @@ #include <BString.h> #include <Handle.h> +enum ArchiveType { + ARCHIVE_BUILTIN = 0 +}; + class Input : public Handle { public: Input(const String & = "") throw (GeneralException); @@ -18,11 +22,23 @@ class Input : public Handle { virtual String GetName() const; virtual ssize_t GetSize() const; virtual time_t GetModif() const; + virtual void SetZ(int = 9) throw (GeneralException); + + struct openresults_t { + String name; + int type; + size_t size; + size_t ptr; + }; protected: String n; off_t size; time_t date_modif; + openresults_t results; + + private: + static int wrapopen(const String &, openresults_t *); }; class Stdin_t : public Input { @@ -35,36 +51,40 @@ class Stdin_t : public Input { extern Stdin_t Stdin; -enum ArchiveType { - ARCHIVE_BUILTIN = 0 -} - class Archive : public Base { public: - Archive(const String &, ArchiveType = 0) throw (GeneralException); + Archive(const String &, int = 0) throw (GeneralException); virtual ~Archive(); + protected: static bool inarchive(const String &); - static Input & open(const String &) throw (GeneralException); + static int open(const String &, Input::openresults_t *) throw (GeneralException); private: bool inarchivein(const String &); - Input & openin(const String &) throw (GeneralException); + int openin(const String &, Input::openresults_t *) throw (GeneralException); class FileTree : public Base { public: - FileTree(const String & = "", size_t = 0, FileTree * = 0, int = 0); + FileTree(const String & = "", size_t = 0, int = 0, FileTree * = 0); virtual ~FileTree(); int compute_ptrs(size_t = 0); - String name; - int type; + FileTree * Father(); + FileTree * Child(); + FileTree * Next(); + FileTree * Prev(); + String name; + int type; size_t size; size_t ptr; private: - void touched(); + void touched(); FileTree * next, * prev, * father, * child; } filetree; String name; Input archive; + int type; Archive * next, * prev; static Archive * header; + + friend class Input; }; #endif |