source: tags/0.56/files_pool.h @ 9

Last change on this file since 9 was 9, checked in by willem, 11 years ago

willem

File size: 876 bytes
Line 
1#ifndef FILES_POOL_H
2#define FILES_POOL_H
3#include "stopos_pool.h"
4#include "stopos_key.h"
5#include "stopos.h"
6
7class files_pool: public stopos_pool
8{
9  private:
10
11    int get_record(std::string &r, const std::string &k);
12    int put_record(const std::string &r, const std::string &k);
13    int remove_record(const stopos_key &k);
14    int get_status(void);
15    int put_status(void);
16    int lockfile;
17    std::string lockfilename;
18
19    void create_fname(std::string &fname,const std::string &k);
20
21    const static int STATUSTOOLONG = 101;
22    const static int NOTDIR = 102;
23
24    std::string dir_suffix;
25
26    std::string get_slot(const std::string &k)
27    {
28      return k;
29    }
30
31  public:
32    files_pool();
33    void set_db_name(std::string name);
34    int create_db(void);
35    int purge_db(void);
36    int open_db(void);
37    int close_db(void);
38    void dump_db(void);
39};
40#endif
Note: See TracBrowser for help on using the repository browser.