提交 2a1d1149 authored 作者: blu's avatar blu

init

上级 99065351
...@@ -5,7 +5,7 @@ CFLAGS = -g -Wall ...@@ -5,7 +5,7 @@ CFLAGS = -g -Wall
LIBOPENCV = `pkg-config opencv --cflags --libs` LIBOPENCV = `pkg-config opencv --cflags --libs`
LIBFFMPEG = `pkg-config libavformat libavutil libavcodec libswscale --cflags --libs` LIBFFMPEG = `pkg-config libavformat libavutil libavcodec libswscale --cflags --libs`
LIBS=-lpthread LIBS=-Ivendor/lib -lpthread -lleveldb
SQLITE=vendor/sqlite/sqlite3.c SQLITE=vendor/sqlite/sqlite3.c
HEADERS=-Iinc -Ivendor/include HEADERS=-Iinc -Ivendor/include
......
差异被折叠。
/*
module: database
description:
author: Bruce.Lu <lzbgt@icloud.com>
update: 2019/08/23
*/
#ifndef __DATABASE_SL__
#define __DATABASE_SL__
extern "C" {
#include "../vendor/sqlite/sqlite3.h"
}
#include <string>
#include "json.hpp"
#define EV_DB_FILENAME_GENERAL "general.db"
#define EV_DB_FILENAME_LOG "log.db"
#define EV_DB_FILENAME_CONFIG "config.json"
#define EV_DB_FILENAME_SLICES "slices.json"
using namespace std;
using json = nlohmann::json;
namespace DB {
typedef int (*callback)(void*,int,char**,char**);
int exec(void *pUserData, char* fileName, const char* stmt, callback cb);
int getInfo(void *info, int active, const char*fileName);
int clearTable(const char *tableName, const char* fileName);
int setInfo(void* info, const char*fileName);
int loadLocalConfigration(json &config, string fileName);
int saveLocalConfigration(json &config, string fileName);
}
#endif
\ No newline at end of file
/* #ifndef __DATABSE_LEVEL_DB_H__
module: database #define __DATABSE_LEVEL_DB_H__
description: #include "vendor/include/leveldb/db.h"
author: Bruce.Lu <lzbgt@icloud.com>
update: 2019/08/23
*/
#ifndef __DATABASE_SL__
#define __DATABASE_SL__
extern "C" {
#include "../vendor/sqlite/sqlite3.h"
}
#include <string>
#include "json.hpp" #include "json.hpp"
#define EV_DB_FILENAME_GENERAL "general.db" using namespace nlohmann;
#define EV_DB_FILENAME_LOG "log.db"
#define EV_DB_FILENAME_CONFIG "config.json"
#define EV_DB_FILENAME_SLICES "slices.json"
using namespace std;
using json = nlohmann::json;
namespace DB { namespace DB {
typedef int (*callback)(void*,int,char**,char**);
int exec(void *pUserData, char* fileName, const char* stmt, callback cb);
int getInfo(void *info, int active, const char*fileName);
int clearTable(const char *tableName, const char* fileName);
int setInfo(void* info, const char*fileName);
int loadLocalConfigration(json &config, string fileName);
int saveLocalConfigration(json &config, string fileName);
} }
#endif #endif
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论