diff options
author | James Booth <boothj5@gmail.com> | 2017-01-19 22:33:29 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2017-01-19 22:33:29 +0000 |
commit | 1b25aa84cb17fd52d1983701553de27e38ebf3eb (patch) | |
tree | 7e578e98be237b37ac76f3186a0bdd11543d9452 /apidocs | |
parent | 68496db0b427a18c09c00fb47264c3aea352393e (diff) | |
download | profani-tty-1b25aa84cb17fd52d1983701553de27e38ebf3eb.tar.gz |
Add titlebar encryption text to plugins api
Diffstat (limited to 'apidocs')
-rw-r--r-- | apidocs/c/profapi.h | 16 | ||||
-rw-r--r-- | apidocs/python/src/prof.py | 32 |
2 files changed, 48 insertions, 0 deletions
diff --git a/apidocs/c/profapi.h b/apidocs/c/profapi.h index 7d5cad0e..9ef1a795 100644 --- a/apidocs/c/profapi.h +++ b/apidocs/c/profapi.h @@ -339,3 +339,19 @@ End any encrypted session with the specified user. @param barejid Jabber ID of the recipient */ void prof_encryption_reset(char *barejid); + +/** +Set the text to display in the titlebar encryption indicator. +@param barejid Jabber ID of the recipient +@param enctext The text to display +@return 1 on success, 0 on failure +*/ +int prof_chat_set_titlebar_enctext(char *barejid, char *enctext); + +/** +Let profanity decide what to show in the titlebar encryption indicator +@param barejid Jabber ID of the recipient +@return 1 on success, 0 on failure +*/ +int prof_chat_unset_titlebar_enctext(char *barejid); + diff --git a/apidocs/python/src/prof.py b/apidocs/python/src/prof.py index 22488f4b..64468eb0 100644 --- a/apidocs/python/src/prof.py +++ b/apidocs/python/src/prof.py @@ -630,3 +630,35 @@ def encryption_reset(barejid): :: prof.encryption_reset("alice@server.org") """ + + +def chat_set_titlebar_enctext(barejid, enctext): + """Set the text to display in the titlebar encryption indicator. + + :param barejid: Jabber ID of the recipient + :param enctext: The text to display + :type barejid: str or unicode + :type enctext: str or unicode + :return: ``True`` if the text was set successfully, ``False`` otherwise + :rtype: boolean + + + Example: + :: + prof.chat_set_titlebar_enctext("bob@chat.org", "safe") + """ + + +def chat_unset_titlebar_enctext(barejid): + """Let profanity decide what to show in the titlebar encryption indicator. + + :param barejid: Jabber ID of the recipient + :type barejid: str or unicode + :return: ``True`` if the text was unset successfully, ``False`` otherwise + :rtype: boolean + + Example: + :: + prof.chat_unset_titlebar_enctext("bob@chat.org") + """ + |