2021-12-28 15:56:41 +08:00
|
|
|
#ifndef SEARCHTASKPLUGINIFACE_H
|
|
|
|
#define SEARCHTASKPLUGINIFACE_H
|
2021-12-31 17:38:02 +08:00
|
|
|
#define SearchTaskPluginIface_iid "org.ukui.ukui-search.plugin-iface.SearchTaskPluginIface"
|
2021-12-28 15:56:41 +08:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin-iface.h"
|
|
|
|
#include "common-defines.h"
|
2021-12-31 17:38:02 +08:00
|
|
|
#include "search-controller.h"
|
|
|
|
|
2021-12-28 15:56:41 +08:00
|
|
|
|
|
|
|
namespace UkuiSearch {
|
2021-12-31 17:38:02 +08:00
|
|
|
class SearchTaskPluginIface : public QObject, public PluginInterface
|
2021-12-28 15:56:41 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-12-31 17:38:02 +08:00
|
|
|
virtual QString getCustomSearchType() = 0;
|
|
|
|
virtual SearchType getSearchType() = 0;
|
2021-12-28 15:56:41 +08:00
|
|
|
//Asynchronous,multithread.
|
2022-01-24 09:44:42 +08:00
|
|
|
virtual void startSearch(std::shared_ptr<SearchController> searchController) = 0;
|
2021-12-28 15:56:41 +08:00
|
|
|
virtual void stop() = 0;
|
|
|
|
Q_SIGNALS:
|
|
|
|
void searchFinished(size_t searchId);
|
|
|
|
};
|
|
|
|
}
|
2021-12-31 17:38:02 +08:00
|
|
|
Q_DECLARE_INTERFACE(UkuiSearch::SearchTaskPluginIface, SearchTaskPluginIface_iid)
|
2021-12-28 15:56:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SEARCHTASKPLUGINIFACE_H
|