[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/strigiapplet/src
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-04-01 20:56:29
Message-ID: 1175460989.802938.8987.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 648999 by alexmerry:

Updated to work with Strigi from SVN.  I say work.  It now compiles,
but I haven't tried running it.



 M  +5 -5      jstream/jstream.cpp  
 M  +2 -2      jstream/jstream.h  
 M  +7 -7      jstream/kio_jstream_test.cpp  
 M  +1 -1      kickerapplet/strigilineedit.cpp  
 M  +1 -1      kickerapplet/strigilineedit.h  
 M  +1 -1      streamindexer/kfile/kfilethroughanalyzer.cpp  
 M  +6 -6      streamindexer/libextractor/extractorendanalyzer.cpp  
 M  +7 -7      streamindexer/pdf/pdfendanalyzer.cpp  


--- trunk/playground/base/strigiapplet/src/jstream/jstream.cpp #648998:648999
@@ -34,7 +34,7 @@
 
 using namespace KIO;
 using namespace std;
-using namespace jstreams;
+using namespace Strigi;
 
 class QFileStreamOpener : public StreamOpener {
 public:
@@ -45,7 +45,7 @@
 StreamBase<char>*
 QFileStreamOpener::openStream(const string& url) {
     StreamBase<char>* stream = new FileInputStream(QString(url.c_str()));
-    if (stream->getStatus() != Ok) {
+    if (stream->status() != Ok) {
         delete stream;
         stream = 0;
     }
@@ -91,7 +91,7 @@
     string path = (const char*)url.path().utf8();
     if (path.size() && path[path.size()-1] == '/') path.resize(path.size()-1);
 
-    jstreams::StreamBase<char>* in = reader->openStream(path);
+    Strigi::StreamBase<char>* in = reader->openStream(path);
     if (in == 0) {
         error( KIO::ERR_CANNOT_OPEN_FOR_READING, path );
         return;
@@ -159,7 +159,7 @@
         if (path.size() && path[path.size() - 1] == '/') {
             path.resize(path.size() - 1);
         }
-        DirLister dl = reader->getDirEntries(path);
+        DirLister dl = reader->dirEntries(path);
         EntryInfo e;
         if (dl.nextEntry(e)) {
             entry = makeDirEntry(f.fileName(), f.size());
@@ -243,7 +243,7 @@
     if (path.size() && path[path.size() - 1] == '/') {
         path.resize(path.size() - 1);
     }
-    DirLister dl = reader->getDirEntries(path);
+    DirLister dl = reader->dirEntries(path);
     EntryInfo e;
     while (dl.nextEntry(e)) {
         entry = entryInfoToUDSEntry(e);
--- trunk/playground/base/strigiapplet/src/jstream/jstream.h #648998:648999
@@ -29,7 +29,7 @@
 #include <kio/slavebase.h>
 
 class QCString;
-namespace jstreams {
+namespace Strigi {
     class ArchiveReader;
 }
 class QFileStreamOpener;
@@ -37,7 +37,7 @@
 class kio_jstreamProtocol : public KIO::SlaveBase
 {
 private:
-    jstreams::ArchiveReader* reader;
+    Strigi::ArchiveReader* reader;
     QFileStreamOpener* opener;
 
     KIO::UDSEntry statQFileInfo(const QFileInfo& f) const;
--- trunk/playground/base/strigiapplet/src/jstream/kio_jstream_test.cpp #648998:648999
@@ -91,18 +91,18 @@
         error(KIO::ERR_SLAVE_DEFINED, i18n("The jstream URI is invalid: %1").arg(path));
         return;
     }
-    jstreams::FileInputStream file(subpath.local8Bit());
-    if (file.getStatus() != jstreams::Ok) {
+    Strigi::FileInputStream file(subpath.local8Bit());
+    if (file.getStatus() != Strigi::Ok) {
         error(KIO::ERR_SLAVE_DEFINED, i18n("Could not open file %1").arg(subpath));
         return;
     }
 
-    jstreams::StreamBase<char>* in = &file;
-    jstreams::SubStreamProviderProvider pp;
-    vector<jstreams::SubStreamProvider*> providers;
+    Strigi::StreamBase<char>* in = &file;
+    Strigi::SubStreamProviderProvider pp;
+    vector<Strigi::SubStreamProvider*> providers;
     while (subpath != path) {
         subpath += '/';
-        jstreams::SubStreamProvider* p = pp.getSubStreamProvider(in);
+        Strigi::SubStreamProvider* p = pp.getSubStreamProvider(in);
         if (p == 0) {
             in = 0;
             break;
@@ -111,7 +111,7 @@
         in = p->nextEntry();
         QString end = path.mid(subpath.length());
         while (in) {
-            if (p->getEntryInfo().type == jstreams::EntryInfo::Dir) {
+            if (p->getEntryInfo().type == Strigi::EntryInfo::Dir) {
                 in = p->nextEntry();
                 continue;
             }
--- trunk/playground/base/strigiapplet/src/kickerapplet/strigilineedit.cpp #648998:648999
@@ -141,7 +141,7 @@
     }
 }
 HitMenuItem*
-StrigiLineEdit::createHit(const jstreams::IndexedDocument& hit) const {
+StrigiLineEdit::createHit(const Strigi::IndexedDocument& hit) const {
     // get the appropriate icon
     QString iconname = KMimeType::mimeType(hit.mimetype.c_str())->icon(QString::null,0);
     QPixmap icon = strigiiconloader.loadIcon(iconname, KIcon::Panel);
--- trunk/playground/base/strigiapplet/src/kickerapplet/strigilineedit.h #648998:648999
@@ -38,7 +38,7 @@
     const KIconLoader strigiiconloader;
 
 private:
-    HitMenuItem* createHit(const jstreams::IndexedDocument& hit) const;
+    HitMenuItem* createHit(const Strigi::IndexedDocument& hit) const;
 private slots:
     void openQuery();
     void slotTextChanged();
--- trunk/playground/base/strigiapplet/src/streamindexer/kfile/kfilethroughanalyzer.cpp #648998:648999
@@ -29,7 +29,7 @@
 #include <streamthroughanalyzer.h>
 #include <indexable.h>
 
-using namespace jstreams;
+using namespace Strigi;
 using namespace std;
 
 class KFileAnalyzer : public StreamThroughAnalyzer {
--- trunk/playground/base/strigiapplet/src/streamindexer/libextractor/extractorendanalyzer.cpp #648998:648999
@@ -24,10 +24,10 @@
 #include <indexable.h>
 #include <extractor.h>
 
-using namespace jstreams;
+using namespace Strigi;
 using namespace std;
 
-class ExtractorEndAnalyzer : public jstreams::StreamEndAnalyzer {
+class ExtractorEndAnalyzer : public StreamEndAnalyzer {
 private:
     static int objectCount;
     static EXTRACTOR_ExtractorList *extractors;
@@ -35,9 +35,9 @@
     ExtractorEndAnalyzer();
     ~ExtractorEndAnalyzer();
     bool checkHeader(const char* header, int32_t headersize) const;
-    char analyze(jstreams::Indexable& idx, jstreams::InputStream* in);
-    static char staticAnalyze(std::string filename, jstreams::InputStream *in,
-        int depth, jstreams::StreamIndexer *indexer, jstreams::Indexable*);
+    char analyze(Indexable& idx, InputStream* in);
+    static char staticAnalyze(std::string filename, InputStream *in,
+        int depth, StreamIndexer *indexer, Indexable*);
     const char* getName() const { return "ExtractorEndAnalyzer"; }
 };
 
@@ -60,7 +60,7 @@
     return true;
 }
 char
-ExtractorEndAnalyzer::analyze(jstreams::Indexable& idx, InputStream *in) {
+ExtractorEndAnalyzer::analyze(Indexable& idx, InputStream *in) {
     int32_t size = 20000;
     const char* b;
     int32_t nread = in->read(b, size, size);
--- trunk/playground/base/strigiapplet/src/streamindexer/pdf/pdfendanalyzer.cpp #648998:648999
@@ -26,9 +26,9 @@
 #include <PDFDoc.h>
 #include <TextOutputDev.h>
 
-using namespace jstreams;
+using namespace Strigi;
 
-class PdfEndAnalyzer : public jstreams::StreamEndAnalyzer {
+class PdfEndAnalyzer : public StreamEndAnalyzer {
 private:
     static int objectCount;
     static void writeText(void *, char *text, int len);
@@ -36,10 +36,10 @@
     PdfEndAnalyzer();
     ~PdfEndAnalyzer();
     bool checkHeader(const char* header, int32_t headersize) const;
-    char analyze(std::string filename, jstreams::InputStream *in, int depth,
-        jstreams::StreamIndexer *indexer, jstreams::Indexable*);
-    static char staticAnalyze(std::string filename, jstreams::InputStream *in,
-        int depth, jstreams::StreamIndexer *indexer, jstreams::Indexable*);
+    char analyze(std::string filename, InputStream *in, int depth,
+        StreamIndexer *indexer, jstreams::Indexable*);
+    static char staticAnalyze(std::string filename, InputStream *in,
+        int depth, StreamIndexer *indexer, jstreams::Indexable*);
     const char* getName() const { return "PdfEndAnalyzer"; }
 };
 
@@ -118,7 +118,7 @@
 }
 char
 PdfEndAnalyzer::analyze(std::string filename, InputStream *in,
-        int depth, StreamIndexer *indexer, jstreams::Indexable* idx) {
+        int depth, StreamIndexer *indexer, Indexable* idx) {
     int32_t size = 20000;
     const char* b;
     int32_t nread = in->read(b, size, size);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic