-rw-r--r-- | src/db.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/db.h b/src/db.h new file mode 100644 index 0000000..3794eae --- a/dev/null +++ b/src/db.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __N_DB_H | ||
2 | #define __N_DB_H | ||
3 | |||
4 | #include <string> | ||
5 | #include <list> | ||
6 | #include <napkin/types.h> | ||
7 | #include "sqlite.h" | ||
8 | |||
9 | namespace napkin { | ||
10 | using std::string; | ||
11 | using std::list; | ||
12 | |||
13 | class db_t : public sqlite::db_t { | ||
14 | public: | ||
15 | string datadir; | ||
16 | |||
17 | db_t(); | ||
18 | |||
19 | void store(const hypnodata_t& hd); | ||
20 | void remove(const hypnodata_t& hd); | ||
21 | |||
22 | void load(list<hypnodata_ptr_t>& rv, | ||
23 | const string& sql); | ||
24 | }; | ||
25 | |||
26 | } | ||
27 | |||
28 | #endif /* __N_DB_H */ | ||