aboutsummaryrefslogtreecommitdiffstats
path: root/apidocs
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-01-20 21:03:55 +0000
committerJames Booth <boothj5@gmail.com>2017-01-20 21:03:55 +0000
commitc8874cd2e0c7a62eff66cb19acd40e36750d1b50 (patch)
tree751cbd7e32d36f905196b9739658299891430992 /apidocs
parentab1441a25cbbbcced83f60587d43dc2432e8f09d (diff)
downloadprofani-tty-c8874cd2e0c7a62eff66cb19acd40e36750d1b50.tar.gz
Allow chat prefix char to be set by plugins
Diffstat (limited to 'apidocs')
-rw-r--r--apidocs/c/profapi.h31
-rw-r--r--apidocs/python/src/prof.py62
2 files changed, 92 insertions, 1 deletions
diff --git a/apidocs/c/profapi.h b/apidocs/c/profapi.h
index 9ef1a795..9751069f 100644
--- a/apidocs/c/profapi.h
+++ b/apidocs/c/profapi.h
@@ -349,9 +349,38 @@ Set the text to display in the titlebar encryption indicator.
int prof_chat_set_titlebar_enctext(char *barejid, char *enctext);
/**
-Let profanity decide what to show in the titlebar encryption indicator
+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);
+/**
+Set the incoming message prefix character for specified contact.
+@param barejid Jabber ID of the recipient
+@param ch The character to display
+@return 1 on success, 0 on failure
+*/
+int prof_chat_set_incoming_char(char *barejid, char *ch);
+
+/**
+Reset the incoming message prefix character for specified contact.
+@param barejid Jabber ID of the recipient
+@return 1 on success, 0 on failure
+*/
+int prof_chat_unset_incoming_char(char *barejid);
+
+/**
+Set the outgoing message prefix character for specified contact.
+@param barejid Jabber ID of the recipient
+@param ch The character to display
+@return 1 on success, 0 on failure
+*/
+int prof_chat_set_outgoing_char(char *barejid, char *ch);
+
+/**
+Reset the outgoing message prefix character for specified contact.
+@param barejid Jabber ID of the recipient
+@return 1 on success, 0 on failure
+*/
+int prof_chat_unset_outgoing_char(char *barejid);
diff --git a/apidocs/python/src/prof.py b/apidocs/python/src/prof.py
index 64468eb0..d65aa580 100644
--- a/apidocs/python/src/prof.py
+++ b/apidocs/python/src/prof.py
@@ -662,3 +662,65 @@ def chat_unset_titlebar_enctext(barejid):
prof.chat_unset_titlebar_enctext("bob@chat.org")
"""
+
+def chat_set_incoming_char(barejid, ch):
+ """Set the incoming message prefix character for specified contact.
+
+ :param barejid: Jabber ID of the recipient
+ :param enctext: The character to display
+ :type barejid: str or unicode
+ :type enctext: str or unicode
+ :return: ``True`` if the character was set successfully, ``False`` otherwise
+ :rtype: boolean
+
+
+ Example:
+ ::
+ prof.chat_set_incoming_char("kristine@chat.org", "*")
+ """
+
+
+def chat_unset_incoming_char(barejid):
+ """Reset the incoming message prefix character for specified contact.
+
+ :param barejid: Jabber ID of the recipient
+ :type barejid: str or unicode
+ :return: ``True`` if the char was unset successfully, ``False`` otherwise
+ :rtype: boolean
+
+ Example:
+ ::
+ prof.chat_unset_incoming_char("kristine@chat.org")
+ """
+
+
+def chat_set_outgoing_char(barejid, ch):
+ """Set the outgoing message prefix character for specified contact.
+
+ :param barejid: Jabber ID of the recipient
+ :param enctext: The character to display
+ :type barejid: str or unicode
+ :type enctext: str or unicode
+ :return: ``True`` if the character was set successfully, ``False`` otherwise
+ :rtype: boolean
+
+
+ Example:
+ ::
+ prof.chat_set_outgoing_char("david@chat.org", "+")
+ """
+
+
+def chat_unset_outgoing_char(barejid):
+ """Reset the outgoing message prefix character for specified contact.
+
+ :param barejid: Jabber ID of the recipient
+ :type barejid: str or unicode
+ :return: ``True`` if the char was unset successfully, ``False`` otherwise
+ :rtype: boolean
+
+ Example:
+ ::
+ prof.chat_unset_outgoing_char("david@chat.org")
+ """
+