|
a/src/common/webstore.h |
|
b/src/common/webstore.h |
|
... |
|
... |
12 |
* You should have received a copy of the GNU General Public License
|
12 |
* You should have received a copy of the GNU General Public License
|
13 |
* along with this program; if not, write to the
|
13 |
* along with this program; if not, write to the
|
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 _beaglequeuecache_h_included_
|
17 |
#ifndef _webstore_h_included_
|
18 |
#define _beaglequeuecache_h_included_
|
18 |
#define _webstore_h_included_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <string>
|
21 |
using std::string;
|
|
|
22 |
|
21 |
|
23 |
class RclConfig;
|
22 |
class RclConfig;
|
24 |
namespace Rcl {
|
23 |
namespace Rcl {
|
25 |
class Db;
|
24 |
class Db;
|
26 |
class Doc;
|
25 |
class Doc;
|
27 |
}
|
26 |
}
|
28 |
class CirCache;
|
27 |
class CirCache;
|
29 |
|
28 |
|
30 |
/**
|
29 |
/**
|
31 |
* Manage the CirCache for the Beagle Queue indexer. Separated from the main
|
30 |
* Manage the CirCache for the Web Queue indexer. Separated from the main
|
32 |
* indexer code because it's also used for querying (getting the data for a
|
31 |
* indexer code because it's also used for querying (getting the data for a
|
33 |
* preview
|
32 |
* preview
|
34 |
*/
|
33 |
*/
|
35 |
class BeagleQueueCache {
|
34 |
class WebStore {
|
36 |
public:
|
35 |
public:
|
37 |
BeagleQueueCache(RclConfig *config);
|
36 |
WebStore(RclConfig *config);
|
38 |
~BeagleQueueCache();
|
37 |
~WebStore();
|
39 |
|
38 |
|
40 |
bool getFromCache(const string& udi, Rcl::Doc &doc, string& data,
|
39 |
bool getFromCache(const std::string& udi, Rcl::Doc &doc, std::string& data,
|
41 |
string *hittype = 0);
|
40 |
std::string *hittype = 0);
|
42 |
// We could write proxies for all the circache ops, but why bother?
|
41 |
// We could write proxies for all the circache ops, but why bother?
|
43 |
CirCache *cc() {return m_cache;}
|
42 |
CirCache *cc() {return m_cache;}
|
44 |
|
43 |
|
45 |
private:
|
44 |
private:
|
46 |
CirCache *m_cache;
|
45 |
CirCache *m_cache;
|
47 |
};
|
46 |
};
|
48 |
extern const string cstr_bgc_mimetype;
|
|
|
49 |
|
47 |
|
50 |
#endif /* _beaglequeuecache_h_included_ */
|
48 |
extern const std::string cstr_bgc_mimetype;
|
|
|
49 |
|
|
|
50 |
#endif /* _webstore_h_included_ */
|