summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ebookcodec.h
Unidiff
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
@@ -8,6 +8,4 @@
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>
@@ -18,4 +16,5 @@ class ebookcodec : public CExpander_Interface
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 {
@@ -24,5 +23,15 @@ class ebookcodec : public CExpander_Interface
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))
@@ -114,5 +123,9 @@ class ebookcodec : public CExpander_Interface
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