Temp save for Monty.
[awesomized/libmemcached] / example / storage.h
1 /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 #ifndef STORAGE_H
3 #define STORAGE_H
4
5 struct item {
6 uint64_t cas;
7 void* key;
8 size_t nkey;
9 void* data;
10 size_t size;
11 uint32_t flags;
12 time_t exp;
13 };
14
15 bool initialize_storage(void);
16 void shutdown_storage(void);
17
18 void update_cas(struct item* item);
19 void put_item(struct item* item);
20 struct item* get_item(const void* key, size_t nkey);
21 struct item* create_item(const void* key, size_t nkey, const void *data,
22 size_t size, uint32_t flags, time_t exp);
23 bool delete_item(const void* key, size_t nkey);
24 void flush(uint32_t when);
25 void release_item(struct item* item);
26
27 #endif