2003-05-26 16:45:00 +03:00
|
|
|
#ifndef __DB_H
|
|
|
|
#define __DB_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <list>
|
|
|
|
|
2003-07-07 12:25:26 +03:00
|
|
|
#include "util.hh"
|
|
|
|
|
2003-05-26 16:45:00 +03:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
void createDB(const string & filename, const string & dbname);
|
|
|
|
|
|
|
|
bool queryDB(const string & filename, const string & dbname,
|
|
|
|
const string & key, string & data);
|
|
|
|
|
2003-07-07 12:25:26 +03:00
|
|
|
bool queryListDB(const string & filename, const string & dbname,
|
|
|
|
const string & key, Strings & data);
|
|
|
|
|
2003-05-26 16:45:00 +03:00
|
|
|
void setDB(const string & filename, const string & dbname,
|
|
|
|
const string & key, const string & data);
|
|
|
|
|
2003-07-07 12:25:26 +03:00
|
|
|
void setListDB(const string & filename, const string & dbname,
|
|
|
|
const string & key, const Strings & data);
|
|
|
|
|
2003-05-26 16:45:00 +03:00
|
|
|
void delDB(const string & filename, const string & dbname,
|
|
|
|
const string & key);
|
|
|
|
|
|
|
|
void enumDB(const string & filename, const string & dbname,
|
2003-07-17 15:27:55 +03:00
|
|
|
Strings & keys);
|
2003-05-26 16:45:00 +03:00
|
|
|
|
|
|
|
#endif /* !__DB_H */
|