summaryrefslogtreecommitdiffstats
path: root/reader/src/formats/dummy
diff options
context:
space:
mode:
Diffstat (limited to 'reader/src/formats/dummy')
-rw-r--r--reader/src/formats/dummy/DummyBookReader.cpp42
-rw-r--r--reader/src/formats/dummy/DummyBookReader.h44
-rw-r--r--reader/src/formats/dummy/DummyMetaInfoReader.cpp40
-rw-r--r--reader/src/formats/dummy/DummyMetaInfoReader.h46
-rw-r--r--reader/src/formats/dummy/DummyPlugin.cpp57
-rw-r--r--reader/src/formats/dummy/DummyPlugin.h38
-rwxr-xr-xreader/src/formats/dummy/createPlugin.sh12
7 files changed, 0 insertions, 279 deletions
diff --git a/reader/src/formats/dummy/DummyBookReader.cpp b/reader/src/formats/dummy/DummyBookReader.cpp
deleted file mode 100644
index 2684ebf..0000000
--- a/reader/src/formats/dummy/DummyBookReader.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <ZLInputStream.h>
-
-#include "DummyBookReader.h"
-#include "../../bookmodel/BookModel.h"
-
-DummyBookReader::DummyBookReader(BookModel &model) : myModelReader(model) {
-}
-
-/*
-void DummyBookReader::characterDataHandler(const char *text, std::size_t len) {
-}
-
-void DummyBookReader::startElementHandler(int tag, const char **xmlattributes) {
-}
-
-void DummyBookReader::endElementHandler(int tag) {
-}
-*/
-
-bool DummyBookReader::readBook(shared_ptr<ZLInputStream> stream) {
- //return readDocument(stream);
- return true;
-}
diff --git a/reader/src/formats/dummy/DummyBookReader.h b/reader/src/formats/dummy/DummyBookReader.h
deleted file mode 100644
index ba6bcf8..0000000
--- a/reader/src/formats/dummy/DummyBookReader.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#ifndef __DUMMYBOOKREADER_H__
-#define __DUMMYBOOKREADER_H__
-
-#include "../../bookmodel/BookReader.h"
-
-class DummyBookReader {
-
-public:
- DummyBookReader(BookModel &model);
- ~DummyBookReader();
- bool readBook(shared_ptr<ZLInputStream> stream);
-
- /*
- void startElementHandler(int tag, const char **attributes);
- void endElementHandler(int tag);
- void characterDataHandler(const char *text, std::size_t len);
- */
-
-private:
- BookReader myModelReader;
-};
-
-inline DummyBookReader::~DummyBookReader() {}
-
-#endif /* __DUMMYBOOKREADER_H__ */
diff --git a/reader/src/formats/dummy/DummyMetaInfoReader.cpp b/reader/src/formats/dummy/DummyMetaInfoReader.cpp
deleted file mode 100644
index 5dd13c5..0000000
--- a/reader/src/formats/dummy/DummyMetaInfoReader.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <ZLInputStream.h>
-
-#include "DummyMetaInfoReader.h"
-
-DummyMetaInfoReader::DummyMetaInfoReader(Book &book) : myBook(book) {
-}
-
-/*
-void DummyMetaInfoReader::characterDataHandler(const char *text, std::size_t len) {
-}
-
-void DummyMetaInfoReader::startElementHandler(int tag, const char **) {
-}
-
-void DummyMetaInfoReader::endElementHandler(int tag) {
-}
-*/
-
-bool DummyMetaInfoReader::readMetaInfo(shared_ptr<ZLInputStream> stream) {
- return false;
-}
diff --git a/reader/src/formats/dummy/DummyMetaInfoReader.h b/reader/src/formats/dummy/DummyMetaInfoReader.h
deleted file mode 100644
index 818d996..0000000
--- a/reader/src/formats/dummy/DummyMetaInfoReader.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#ifndef __DUMMYMETAINFOREADER_H__
-#define __DUMMYMETAINFOREADER_H__
-
-#include <string>
-
-class Book;
-
-class DummyMetaInfoReader {
-
-public:
- DummyMetaInfoReader(Book &book);
- ~DummyMetaInfoReader();
- bool readMetaInfo(shared_ptr<ZLInputStream> stream);
-
- /*
- void startElementHandler(int tag, const char **attributes);
- void endElementHandler(int tag);
- void characterDataHandler(const char *text, std::size_t len);
- */
-
-private:
- Book &myBook;
-};
-
-inline DummyMetaInfoReader::~DummyMetaInfoReader() {}
-
-#endif /* __DUMMYMETAINFOREADER_H__ */
diff --git a/reader/src/formats/dummy/DummyPlugin.cpp b/reader/src/formats/dummy/DummyPlugin.cpp
deleted file mode 100644
index bfe0662..0000000
--- a/reader/src/formats/dummy/DummyPlugin.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <ZLFile.h>
-#include <ZLInputStream.h>
-
-#include "DummyPlugin.h"
-#include "DummyMetaInfoReader.h"
-#include "DummyBookReader.h"
-#include "../../library/Book.h"
-
-DummyPlugin::DummyPlugin() {
-}
-
-DummyPlugin::~DummyPlugin() {
-}
-
-bool DummyPlugin::providesMetaInfo() const {
- return true;
-}
-
-bool DummyPlugin::acceptsFile(const ZLFile &file) const {
- return file.extension() == "dummy";
-}
-
-bool DummyPlugin::readMetaInfo(Book &book) const {
- return DummyMetaInfoReader(book).readMetaInfo(ZLFile(path).inputStream());
-}
-
-bool DummyPlugin::readLanguageAndEncoding(Book &book) const {
- (void)book;
- return true;
-}
-
-bool DummyPlugin::readModel(BookModel &model) const {
- return DummyBookReader(model).readBook(ZLFile(book.fileName()).inputStream());
-}
-
-shared_ptr<const ZLImage> DummyPlugin::coverImage(const ZLFile &file) const {
- return DummyCoverReader(file).readCover();
-}
diff --git a/reader/src/formats/dummy/DummyPlugin.h b/reader/src/formats/dummy/DummyPlugin.h
deleted file mode 100644
index 073449c..0000000
--- a/reader/src/formats/dummy/DummyPlugin.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#ifndef __DUMMYPLUGIN_H__
-#define __DUMMYPLUGIN_H__
-
-#include "../FormatPlugin.h"
-
-class DummyPlugin : public FormatPlugin {
-
-public:
- DummyPlugin();
- ~DummyPlugin();
- bool providesMetaInfo() const;
- bool acceptsFile(const ZLFile &file) const;
- bool readMetaInfo(Book &book) const;
- bool readLanguageAndEncoding(Book &book) const;
- bool readModel(BookModel &model) const;
- shared_ptr<const ZLImage> coverImage(const ZLFile &file) const;
-};
-
-#endif /* __DUMMYPLUGIN_H__ */
diff --git a/reader/src/formats/dummy/createPlugin.sh b/reader/src/formats/dummy/createPlugin.sh
deleted file mode 100755
index aacc3d4..0000000
--- a/reader/src/formats/dummy/createPlugin.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ $# != 3 ]; then
- echo "usage: $0 <short_format_name> <camel_cased_format_name> <upper_cased_format_name>";
- exit 0;
-fi;
-
-if mkdir ../$1; then
- for file in Dummy*.h Dummy*.cpp; do
- sed "s/Dummy/$2/g" $file | sed "s/DUMMY/$3/g" > ../$1/`echo $file | sed "s/Dummy/$2/"`;
- done
-fi;