Add titlebar encryption text to plugins api

This commit is contained in:
James Booth
2017-01-19 22:33:29 +00:00
parent 68496db0b4
commit 1b25aa84cb
14 changed files with 219 additions and 14 deletions

View File

@@ -523,3 +523,41 @@ api_encryption_reset(const char *const barejid)
}
#endif
}
int
api_chat_set_titlebar_enctext(const char *const barejid, const char *const enctext)
{
if (enctext == NULL) {
return 0;
}
if (barejid == NULL) {
return 0;
}
ProfChatWin *chatwin = wins_get_chat(barejid);
if (chatwin == NULL) {
return 0;
}
chatwin_set_enctext(chatwin, enctext);
return 1;
}
int
api_chat_unset_titlebar_enctext(const char *const barejid)
{
if (barejid == NULL) {
return 0;
}
ProfChatWin *chatwin = wins_get_chat(barejid);
if (chatwin == NULL) {
return 0;
}
chatwin_unset_enctext(chatwin);
return 1;
}