|
a/src/query/docseqhist.h |
|
b/src/query/docseqhist.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _DOCSEQHIST_H_INCLUDED_
|
17 |
#ifndef _DOCSEQHIST_H_INCLUDED_
|
18 |
#define _DOCSEQHIST_H_INCLUDED_
|
18 |
#define _DOCSEQHIST_H_INCLUDED_
|
19 |
/* @(#$Id: docseqhist.h,v 1.1 2007-01-19 10:32:39 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: docseqhist.h,v 1.2 2007-01-19 15:22:50 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
#include <string>
|
|
|
21 |
#include <list>
|
|
|
22 |
#ifndef NO_NAMESPACES
|
|
|
23 |
using std::string;
|
|
|
24 |
using std::list;
|
|
|
25 |
#endif
|
|
|
26 |
|
20 |
|
27 |
#include "docseq.h"
|
21 |
#include "docseq.h"
|
28 |
#include "history.h"
|
22 |
#include "history.h"
|
|
|
23 |
|
29 |
namespace Rcl {
|
24 |
namespace Rcl {
|
30 |
class Db;
|
25 |
class Db;
|
31 |
}
|
26 |
}
|
32 |
class RclHistory;
|
|
|
33 |
|
27 |
|
34 |
/** A DocSequence coming from the history file.
|
28 |
/** A DocSequence coming from the history file.
|
35 |
* History is kept as a list of urls. This queries the db to fetch
|
29 |
* History is kept as a list of urls. This queries the db to fetch
|
36 |
* metadata for an url key */
|
30 |
* metadata for an url key */
|
37 |
class DocSequenceHistory : public DocSequence {
|
31 |
class DocSequenceHistory : public DocSequence {
|
|
... |
|
... |
40 |
: DocSequence(t), m_db(d), m_hist(h), m_prevnum(-1), m_prevtime(-1) {}
|
34 |
: DocSequence(t), m_db(d), m_hist(h), m_prevnum(-1), m_prevtime(-1) {}
|
41 |
virtual ~DocSequenceHistory() {}
|
35 |
virtual ~DocSequenceHistory() {}
|
42 |
|
36 |
|
43 |
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
37 |
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
44 |
virtual int getResCnt();
|
38 |
virtual int getResCnt();
|
|
|
39 |
virtual string getDescription() {return m_description;}
|
|
|
40 |
void setDescription(const string& desc) {m_description = desc;}
|
45 |
private:
|
41 |
private:
|
46 |
Rcl::Db *m_db;
|
42 |
Rcl::Db *m_db;
|
47 |
RclHistory *m_hist;
|
43 |
RclHistory *m_hist;
|
48 |
int m_prevnum;
|
44 |
int m_prevnum;
|
49 |
long m_prevtime;
|
45 |
long m_prevtime;
|
50 |
|
46 |
string m_description; // This is just an nls translated 'doc history'
|
51 |
list<RclDHistoryEntry> m_hlist;
|
47 |
list<RclDHistoryEntry> m_hlist;
|
52 |
list<RclDHistoryEntry>::const_iterator m_it;
|
48 |
list<RclDHistoryEntry>::const_iterator m_it;
|
53 |
};
|
49 |
};
|
54 |
|
50 |
|
55 |
#endif /* _DOCSEQ_H_INCLUDED_ */
|
51 |
#endif /* _DOCSEQ_H_INCLUDED_ */
|