M5: Windows client moderation UI; add C ABI getters for account list, user mute/deafen, channel topic
This commit is contained in:
@@ -233,6 +233,19 @@ typedef struct vc_permissions {
|
||||
int is_admin; /* bool */
|
||||
} vc_permissions;
|
||||
|
||||
/* M5: account entry (reply to vc_list_accounts / vc_get_account_list). */
|
||||
typedef struct vc_account {
|
||||
const char* username;
|
||||
int is_admin; /* bool */
|
||||
uint64_t created_at_unix_ms;
|
||||
uint64_t last_login_unix_ms;
|
||||
} vc_account;
|
||||
|
||||
typedef struct vc_account_list {
|
||||
vc_account* items;
|
||||
size_t count;
|
||||
} vc_account_list;
|
||||
|
||||
/* M5: channel creation/edition descriptor. */
|
||||
typedef struct vc_channel_info {
|
||||
uint32_t id; /* 0 = new channel for create */
|
||||
@@ -267,6 +280,7 @@ typedef struct vc_channel {
|
||||
uint32_t id;
|
||||
uint32_t parent_id; /* 0 = root */
|
||||
const char* name;
|
||||
const char* topic;
|
||||
int password_protected; /* bool */
|
||||
uint32_t max_users; /* 0 = unlimited */
|
||||
} vc_channel;
|
||||
@@ -281,6 +295,10 @@ typedef struct vc_user {
|
||||
const char* nickname;
|
||||
int is_guest; /* bool */
|
||||
uint32_t channel_id;
|
||||
int self_mic_muted; /* bool */
|
||||
int self_deafened; /* bool */
|
||||
int server_muted; /* bool */
|
||||
int server_deafened; /* bool */
|
||||
} vc_user;
|
||||
|
||||
typedef struct vc_user_list {
|
||||
@@ -424,6 +442,11 @@ VC_API vc_result vc_reset_password(vc_client* c, const char* username,
|
||||
VC_API vc_result vc_delete_account(vc_client* c, const char* username);
|
||||
VC_API vc_result vc_list_accounts(vc_client* c);
|
||||
|
||||
/* Pull the last received account list (populated when VC_EVENT_ACCOUNT_LIST fires).
|
||||
* Caller must free the list with vc_free_account_list. */
|
||||
VC_API vc_result vc_get_account_list(vc_client* c, vc_account_list* out);
|
||||
VC_API void vc_free_account_list(vc_account_list* list);
|
||||
|
||||
/* Pull the caller's own permissions (from the last AuthResult). */
|
||||
VC_API vc_result vc_get_permissions(vc_client* c, vc_permissions* out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user