ssb: Move identity info gathering to db.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m52s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m52s
This commit is contained in:
25
src/ssb.db.h
25
src/ssb.db.h
@ -564,4 +564,29 @@ int tf_ssb_sqlite_authorizer(void* user_data, int action_code, const char* arg0,
|
||||
*/
|
||||
bool tf_ssb_db_has_invite(sqlite3* db, const char* id);
|
||||
|
||||
/**
|
||||
** Identity information
|
||||
*/
|
||||
typedef struct _tf_ssb_identity_info_t
|
||||
{
|
||||
/** An array of identities. */
|
||||
const char** identity;
|
||||
/** A array of identities, one for each identity. */
|
||||
const char** name;
|
||||
/** The number of elements in both the identity and name arrays. */
|
||||
int count;
|
||||
/** The active identity. */
|
||||
char active_identity[k_id_base64_len];
|
||||
} tf_ssb_identity_info_t;
|
||||
|
||||
/**
|
||||
** Get available identities, names, and the active identity for a user.
|
||||
** @param ssb The SSB instance.
|
||||
** @param user The user name.
|
||||
** @param package_owner The owner of the package for which identity info is being fetched.
|
||||
** @param package_name The name of the package for which identity info is being fetched.
|
||||
** @return A struct of identities, names, and the active identity. Free with tf_free().
|
||||
*/
|
||||
tf_ssb_identity_info_t* tf_ssb_db_get_identity_info(tf_ssb_t* ssb, const char* user, const char* package_owner, const char* package_name);
|
||||
|
||||
/** @} */
|
||||
|
Reference in New Issue
Block a user