about summary refs log tree commit diff stats
path: root/apidocs
diff options
context:
space:
mode:
authorDustin Lagoy <dustin@lagoy.org>2021-04-29 13:50:57 -0400
committerDustin Lagoy <dustin@lagoy.org>2021-04-29 13:50:57 -0400
commit2350a94c4411635f15173ec9c7964ea89e3fb2b1 (patch)
treee36802b027519d2dcd95ca674b1e03ba0a1a1926 /apidocs
parent802442fffc86397870e1f37f901b63b9521b042d (diff)
downloadprofani-tty-2350a94c4411635f15173ec9c7964ea89e3fb2b1.tar.gz
Add plugin get_barejid_from_roster function
Diffstat (limited to 'apidocs')
-rw-r--r--apidocs/c/profapi.h6
-rw-r--r--apidocs/python/src/prof.py9
2 files changed, 15 insertions, 0 deletions
diff --git a/apidocs/c/profapi.h b/apidocs/c/profapi.h
index a8c8673c..04da8a4e 100644
--- a/apidocs/c/profapi.h
+++ b/apidocs/c/profapi.h
@@ -145,6 +145,12 @@ Retrieve the nickname for a given barejid if it is in the roster.
 char* prof_get_name_from_roster(const char *barejid);
 
 /**
+Retrieve the barejid for a given nickname if it is in the roster.
+@return the users barejid e.g. "eddie@server.tld", or NULLL if the nickname is not in the roster.
+*/
+char* prof_get_barejid_from_roster(const char *name);
+
+/**
 Retrieve nicknames of all occupants in a chat room, when in a chat room window.
 @return nicknames of all occupants in the current room or an empty list if not in a chat room window.
 */
diff --git a/apidocs/python/src/prof.py b/apidocs/python/src/prof.py
index 7ee282a9..eafaeeb7 100644
--- a/apidocs/python/src/prof.py
+++ b/apidocs/python/src/prof.py
@@ -262,6 +262,15 @@ def get_name_from_roster(barejid):
     pass
 
 
+def get_barejid_from_roster(name):
+    """Retrieve the barejid for a given nickname if it is in the roster.
+
+    :return: the users barejid e.g. "eddie@server.tld", or ``None`` if the nickname is not in the roster.
+    :rtype: str
+    """
+    pass
+
+
 def get_current_occupants(): 
     """Retrieve nicknames of all occupants in a chat room, when in a chat room window.