libept  0.5.25
debtagsindexer.h
Go to the documentation of this file.
1 #ifndef EPT_DEBTAGS_DEBTAGSINDEXER_H
2 #define EPT_DEBTAGS_DEBTAGSINDEXER_H
3 
5 #include <string>
6 
7 namespace ept {
8 namespace debtags {
9 
10 class Vocabulary;
11 
13 {
15 
18  time_t ts_main_src;
19  time_t ts_user_src;
20  time_t ts_main_tag;
21  time_t ts_main_idx;
22  time_t ts_user_tag;
23  time_t ts_user_idx;
24 
25  time_t sourceTimestamp() const
26  {
27  time_t res = ts_main_src;
28  if (ts_user_src > res) res = ts_user_src;
29  return res;
30  }
31  bool needsRebuild() const;
32  bool rebuild(const std::string& tagfname, const std::string& idxfname);
33  bool rebuildIfNeeded();
34  bool getUpToDateTagdb(std::string& tagfname, std::string& idxfname);
35 
36  bool userIndexIsRedundant() const;
38 
39  void rescan();
40 
42 
43  static bool obtainWorkingDebtags(Vocabulary& voc, std::string& tagfname, std::string& idxfname);
44 };
45 
46 
47 }
48 }
49 
50 // vim:set ts=4 sw=4:
51 #endif