ssb: Consolidate global settings helpers.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m28s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m28s
This commit is contained in:
28
src/ssb.db.h
28
src/ssb.db.h
@ -455,6 +455,34 @@ bool tf_ssb_db_verify(tf_ssb_t* ssb, const char* id);
|
||||
*/
|
||||
bool tf_ssb_db_user_has_permission(tf_ssb_t* ssb, sqlite3* db, const char* id, const char* permission);
|
||||
|
||||
/**
|
||||
** Get a boolean global setting value.
|
||||
** @param db The database.
|
||||
** @param name The setting name.
|
||||
** @param out_value Populated with the value.
|
||||
** @return true if the setting was found.
|
||||
*/
|
||||
bool tf_ssb_db_get_global_setting_bool(sqlite3* db, const char* name, bool* out_value);
|
||||
|
||||
/**
|
||||
** Get an int64_t global setting value.
|
||||
** @param db The database.
|
||||
** @param name The setting name.
|
||||
** @param out_value Populated with the value.
|
||||
** @return true if the setting was found.
|
||||
*/
|
||||
bool tf_ssb_db_get_global_setting_int64(sqlite3* db, const char* name, int64_t* out_value);
|
||||
|
||||
/**
|
||||
** Get a string global setting value.
|
||||
** @param db The database.
|
||||
** @param name The setting name.
|
||||
** @param out_value Populated with the value.
|
||||
** @param size The size of the out_value buffer.
|
||||
** @return true if the setting was found.
|
||||
*/
|
||||
bool tf_ssb_db_get_global_setting_string(sqlite3* db, const char* name, char* out_value, size_t size);
|
||||
|
||||
/**
|
||||
** An SQLite authorizer callback. See https://www.sqlite.org/c3ref/set_authorizer.html for use.
|
||||
** @param user_data User data registered with the authorizer.
|
||||
|
Reference in New Issue
Block a user