ssb: Work in progress invite support. We can generate them. We can connect using an invite code. We can't yet invite.use().
This commit is contained in:
14
src/ssb.db.h
14
src/ssb.db.h
@ -502,6 +502,20 @@ const char* tf_ssb_db_get_profile(sqlite3* db, const char* id);
|
||||
*/
|
||||
const char* tf_ssb_db_get_profile_name(sqlite3* db, const char* id);
|
||||
|
||||
/**
|
||||
** Generate an invite code and store information for it to be usable.
|
||||
** @param db The database.
|
||||
** @param id The identity.
|
||||
** @param host Hostname to which recipient should connect.
|
||||
** @param port The port to which the recipient should connect.
|
||||
** @param use_count Number of times the invite code is allowed to be used, or -1 for indefinitely.
|
||||
** @param expires_seconds How long the invite lasts.
|
||||
** @param out_invite Populated with the invite code on success.
|
||||
** @param size The size of the out_invite buffer.
|
||||
** @return true If an invite was generated.
|
||||
*/
|
||||
bool tf_ssb_db_generate_invite(sqlite3* db, const char* id, const char* host, int port, int use_count, int expires_seconds, char* out_invite, 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