C SIGFOX CALLBACK  0.0.1
A Sigfox Callback program writtent in C
Enumerations | Functions
db_plugin_sqlite.h File Reference

SQLite operations header file. More...

#include <mongoose.h>

Go to the source code of this file.

Enumerations

enum  API_Operation { API_OP_NULL, API_OP_GET, API_OP_SET, API_OP_DEL }
 Possible operation to do on the database. More...
 

Functions

sqlite3 * db_open (const char *db_path)
 Open the database and create its tables. More...
 
void db_close (void **db_handler)
 Close the database. More...
 
void db_op (struct mg_connection *nc, const struct http_message *hm, const struct mg_str *key, void *db, int op)
 Do an operation on the database. More...
 

Detailed Description

SQLite operations header file.

Author
hbuyse
Date
04/07/2016

Enumeration Type Documentation

Possible operation to do on the database.

Enumerator
API_OP_NULL 

Do nothing.

API_OP_GET 

Select * from raws.

API_OP_SET 

Add a raws structure.

API_OP_DEL 

Delete a raws structure (Not Implemented yet)

Function Documentation

void db_close ( void **  db_handler)

Close the database.

Parameters
db_handleThe database handler
void db_op ( struct mg_connection nc,
const struct http_message hm,
const struct mg_str key,
void *  db,
int  op 
)

Do an operation on the database.

Parameters
ncThe non-client
[in]hmThe HTTP message
[in]keyThe key
dbThe database
[in]opThe operation
sqlite3* db_open ( const char *  db_path)

Open the database and create its tables.

Parameters
[in]db_pathThe database path
Returns
Pointer to the database