31 lines
625 B
C
31 lines
625 B
C
#ifndef DB_AUTH_H
|
|
#define DB_AUTH_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
int open_user_db();
|
|
|
|
void close_user_db();
|
|
|
|
int check_user_exists(const char* user_id, int* result);
|
|
|
|
int set_user_password(const char* user_id, const char* password);
|
|
|
|
int login(const char* user_id, const char* password, int* result);
|
|
|
|
int registe(const char* user_id, const char* password);
|
|
|
|
int delete_user(const char* user_id);
|
|
|
|
int get_user_permission(const char* user_id, int* result);
|
|
|
|
int set_user_permission(const char* user_id, int permission);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // DB_AUTH_H
|