summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ebookcodec.h
authorpohly <pohly>2005-05-05 14:39:33 (UTC)
committer pohly <pohly>2005-05-05 14:39:33 (UTC)
commit39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (unidiff)
tree96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/ebookcodec.h
parent279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff)
downloadopie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/ebookcodec.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ebookcodec.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/ebookcodec.h b/noncore/apps/opie-reader/ebookcodec.h
index f6e2daf..4229fb9 100644
--- a/noncore/apps/opie-reader/ebookcodec.h
+++ b/noncore/apps/opie-reader/ebookcodec.h
@@ -7,8 +7,6 @@
7#include <qpe/global.h> 7#include <qpe/global.h>
8#endif 8#endif
9 9
10#include "util.h"
11
12#ifndef __STATIC 10#ifndef __STATIC
13#include <dlfcn.h> 11#include <dlfcn.h>
14class ebookcodec : public CExpander_Interface 12class ebookcodec : public CExpander_Interface
@@ -17,13 +15,24 @@ class ebookcodec : public CExpander_Interface
17 void *handle; 15 void *handle;
18 int status; 16 int status;
19 public: 17 public:
18 QString getTableAsHtml(unsigned long loc) { return codec->getTableAsHtml(loc); }
20 QString about() 19 QString about()
21 { 20 {
22 return QString("Plug-in ebook codec interface (c) Tim Wentford\n")+codec->about(); 21 return QString("Plug-in ebook codec interface (c) Tim Wentford\n")+codec->about();
23 } 22 }
24 ebookcodec(const QString& _s) : codec(NULL), handle(NULL), status(0) 23 ebookcodec(const QString& _s) : codec(NULL), handle(NULL), status(0)
25 { 24 {
26 QString codecpath(QTReaderUtil::getPluginPath()); 25#ifdef USEQPE
26#ifdef OPIE
27 QString codecpath(getenv("OPIEDIR"));
28#else
29 QString codecpath(getenv("QTDIR"));
30#endif
31 codecpath += "/plugins/reader/codecs/";
32#else
33 QString codecpath(getenv("READERDIR"));
34 codecpath += "/codecs/";
35#endif
27 codecpath += _s; 36 codecpath += _s;
28 if (QFile::exists(codecpath)) 37 if (QFile::exists(codecpath))
29 { 38 {
@@ -113,6 +122,10 @@ class ebookcodec : public CExpander_Interface
113 } 122 }
114 int getwidth() { return codec->getwidth(); } 123 int getwidth() { return codec->getwidth(); }
115 QImage* getPicture(const QString& href) { return codec->getPicture(href); } 124 QImage* getPicture(const QString& href) { return codec->getPicture(href); }
116 bool getFile(const QString& href) { return codec->getFile(href); } 125 bool getFile(const QString& href, const QString& nm) { return codec->getFile(href, nm); }
126 bool findanchor(const QString& nm)
127 {
128 return codec->findanchor(nm);
129 }
117}; 130};
118#endif 131#endif