Changeset View
Changeset View
Standalone View
Standalone View
src/file/fileindexscheduler.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 68 | void indexXAttrFile(const QString& file) { | |||
---|---|---|---|---|---|
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | void handleFileRemoved(const QString& file); | 75 | void handleFileRemoved(const QString& file); | ||
76 | 76 | | |||
77 | void scheduleIndexing(); | 77 | void scheduleIndexing(); | ||
78 | void halt(); | 78 | void halt(); | ||
79 | 79 | | |||
80 | /** Schedule new file indexing and missing file deindexing, ignoring unmounted media */ | ||||
81 | Q_SCRIPTABLE void updateIndex(); | ||||
82 | | ||||
83 | /** Schedule new file indexing only */ | ||||
84 | Q_SCRIPTABLE void checkUnindexedFiles(); | ||||
85 | | ||||
80 | Q_SCRIPTABLE void suspend() { suspendContentIndexer(true); } | 86 | Q_SCRIPTABLE void suspend() { suspendContentIndexer(true); } | ||
81 | Q_SCRIPTABLE void resume() { suspendContentIndexer(false); } | 87 | Q_SCRIPTABLE void resume() { suspendContentIndexer(false); } | ||
82 | Q_SCRIPTABLE uint getRemainingTime(); | 88 | Q_SCRIPTABLE uint getRemainingTime(); | ||
83 | Q_SCRIPTABLE void checkUnindexedFiles(); | | |||
84 | Q_SCRIPTABLE uint getBatchSize(); | 89 | Q_SCRIPTABLE uint getBatchSize(); | ||
michaelh: Nitpick: We're removing db entries not files. Also every file is deindexable. Maybe… | |||||
This is doing the opposite of indexing new files, which is removing unfound files from the index. I think deindex is an appropriate term for this. smithjd: This is doing the opposite of indexing new files, which is removing unfound files from the… | |||||
85 | 90 | | |||
86 | private Q_SLOTS: | 91 | private Q_SLOTS: | ||
87 | void suspendContentIndexer(bool suspend); | 92 | void suspendContentIndexer(bool suspend); | ||
88 | 93 | | |||
89 | private: | 94 | private: | ||
90 | Database* m_db; | 95 | Database* m_db; | ||
91 | FileIndexerConfig* m_config; | 96 | FileIndexerConfig* m_config; | ||
92 | 97 | | |||
93 | QList<Baloo::IndexerState> m_indexerStates; | 98 | QList<Baloo::IndexerState> m_indexerStates; | ||
94 | 99 | | |||
95 | QStringList m_newFiles; | 100 | QStringList m_newFiles; | ||
96 | QStringList m_modifiedFiles; | 101 | QStringList m_modifiedFiles; | ||
97 | QStringList m_xattrFiles; | 102 | QStringList m_xattrFiles; | ||
98 | 103 | | |||
99 | QThreadPool m_threadPool; | 104 | QThreadPool m_threadPool; | ||
100 | 105 | | |||
101 | FileContentIndexerProvider m_provider; | 106 | FileContentIndexerProvider m_provider; | ||
102 | FileContentIndexer* m_contentIndexer; | 107 | FileContentIndexer* m_contentIndexer; | ||
103 | 108 | | |||
104 | PowerStateMonitor m_powerMonitor; | 109 | PowerStateMonitor m_powerMonitor; | ||
105 | 110 | | |||
106 | TimeEstimator m_timeEstimator; | 111 | TimeEstimator m_timeEstimator; | ||
107 | 112 | | |||
108 | bool m_checkUnindexedFiles; | 113 | bool m_checkUnindexedFiles; | ||
114 | bool m_purgeDeindexableFiles; | ||||
michaelh: Same as above | |||||
109 | }; | 115 | }; | ||
110 | 116 | | |||
111 | } | 117 | } | ||
112 | 118 | | |||
113 | #endif // BALOO_FILEINDEXSCHEDULER_H | 119 | #endif // BALOO_FILEINDEXSCHEDULER_H |
Nitpick: We're removing db entries not files. Also every file is deindexable. Maybe 'purgeStaleEntries', 'removeLostEntries' or so would be a better name to describe what's going on.