Add prof.encryption_reset to Plugins API

issue #885
This commit is contained in:
James Booth
2017-01-18 22:46:29 +00:00
parent 70e831e08b
commit fccf56be10
8 changed files with 88 additions and 0 deletions

View File

@@ -144,6 +144,13 @@ Retrieve nicknames of all occupants in a chat room, when in a chat room window.
*/
char** prof_get_current_occupants(void);
/**
Retrieve current nickname used in chat room.
@param barejid The room's Jabber ID
@return Room nickname.
*/
char* prof_get_room_nick(const char *barejid);
/**
Write to the Profanity log at level DEBUG.
@param message The message to log
@@ -326,3 +333,9 @@ If a session is already connected, a presence update will be sent to allow any c
@param feature the service discovery feature to be added
*/
void prof_disco_add_feature(char *feature);
/**
End any encrypted session with the specified user.
@param barejid Jabber ID of the recipient
*/
void prof_encryption_reset(char *barejid);

View File

@@ -262,6 +262,14 @@ def get_current_occupants():
pass
def get_room_nick(barejid):
"""Retrieve current nickname used in chat room.
:return: Room nickname.
:rtype: str
"""
def current_win_is_console():
"""Determine whether or not the Console window is currently focussed.
@@ -597,6 +605,7 @@ def incoming_message(barejid, resource, message):
prof.incoming_message("bob@server.org", "laptop", "Hello there")
"""
def disco_add_feature(feature):
"""Add a service discovery feature the list supported by Profanity.\n
If a session is already connected, a presence update will be sent to allow any client/server caches to update their feature list for Profanity
@@ -609,3 +618,15 @@ def disco_add_feature(feature):
prof.disco_add_feature("urn:xmpp:omemo:0:devicelist+notify")
"""
pass
def encryption_reset(barejid):
"""End any encrypted session with the specified user
:param barejid: Jabber ID of the recipient
:type barejid: str or unicode
Example:
::
prof.encryption_reset("alice@server.org")
"""