Statistics
| Branch: | Tag: | Revision:

mongoose / examples / api_server / db_plugin.h @ eaef5bd1

History | View | Annotate | Download (513 Bytes)

1
/*
2
 * Copyright (c) 2014 Cesanta Software Limited
3
 * All rights reserved
4
 */
5

    
6
#ifndef CS_MONGOOSE_EXAMPLES_API_SERVER_DB_PLUGIN_H_
7
#define CS_MONGOOSE_EXAMPLES_API_SERVER_DB_PLUGIN_H_
8

    
9
#include "../../mongoose.h"
10

    
11
void *db_open(const char *db_path);
12
void db_close(void **db_handle);
13

    
14
enum { API_OP_GET, API_OP_SET, API_OP_DEL };
15

    
16
void db_op(struct mg_connection *nc, const struct http_message *hm,
17
           const struct mg_str *key, void *db, int op);
18

    
19
#endif /* CS_MONGOOSE_EXAMPLES_API_SERVER_DB_PLUGIN_H_ */