ukui-search/libsearch/index/first-index.h

56 lines
1.3 KiB
C++

#ifndef FIRSTINDEX_H
#define FIRSTINDEX_H
#include <QThread>
#include <QtConcurrent/QtConcurrent>
#include <signal.h>
#include <QSemaphore>
#include<sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/prctl.h>
//#include <QtConcurrent>
#include "traverse_bfs.h"
#include "global-settings.h"
#include "index-generator.h"
#include "inotify-index.h"
#include "file-utils.h"
class FirstIndex : public QThread, public Traverse_BFS
{
public:
FirstIndex(const QString&);
~FirstIndex();
virtual void DoSomething(const QFileInfo &) final;
protected:
void run() override;
private:
FirstIndex(const FirstIndex&) = delete;
void operator=(const FirstIndex&) = delete;
bool bool_dataBaseStatusOK = false;
bool bool_dataBaseExist = false;
IndexGenerator* p_indexGenerator = nullptr;
//here should be refact
// MessageListManager* mlm;
//test
QQueue<QVector<QString>>* q_index;
QQueue<QString>* q_content_index;
const QVector<QString> targetFileTypeVec ={
// QString(".doc"),
QString(".docx"),
// QString(".ppt"),
// QString(".pptx"),
// QString(".xls"),
// QString(".xlsx"),
QString(".txt")};
};
#endif // FIRSTINDEX_H