author | Michael Krelin <hacker@klever.net> | 2008-04-05 11:17:33 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-04-05 11:17:33 (UTC) |
commit | 04fb190243442e83349f129b523ab747e58100bf (patch) (unidiff) | |
tree | ddc28357fbe78b07fd3a5e0aa8088130bf305829 /src/db.h | |
download | napkin-0.0.zip napkin-0.0.tar.gz napkin-0.0.tar.bz2 |
Initial commit into public repository0.0
Signed-off-by: Michael Krelin <hacker@klever.net>
-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 */ | ||