about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2020-01-30 23:44:43 +0100
committerPaul Fariello <paul@fariello.eu>2020-01-31 10:07:08 +0100
commita52e3ea1d860b155c73869c3d6cc4fa81015b9cf (patch)
treef64dca66cc3d387d9f50325cf25d06cdbed3bd65 /src/xmpp
parent8fba8a8958146a0fa42d649339b66604defd6297 (diff)
downloadprofani-tty-a52e3ea1d860b155c73869c3d6cc4fa81015b9cf.tar.gz
Add context to autocomplete_with_func and use it for omemo trust command
Fix #1068
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/blocking.c2
-rw-r--r--src/xmpp/bookmark.c2
-rw-r--r--src/xmpp/muc.c4
-rw-r--r--src/xmpp/muc.h4
-rw-r--r--src/xmpp/presence.c2
-rw-r--r--src/xmpp/roster_list.c8
-rw-r--r--src/xmpp/roster_list.h8
-rw-r--r--src/xmpp/xmpp.h6
8 files changed, 18 insertions, 18 deletions
diff --git a/src/xmpp/blocking.c b/src/xmpp/blocking.c
index 4ab9b344..c8fda47d 100644
--- a/src/xmpp/blocking.c
+++ b/src/xmpp/blocking.c
@@ -93,7 +93,7 @@ blocked_list(void)
 }
 
 char*
-blocked_ac_find(const char *const search_str, gboolean previous)
+blocked_ac_find(const char *const search_str, gboolean previous, void *context)
 {
     return autocomplete_complete(blocked_ac, search_str, TRUE, previous);
 }
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index 3fc3a2d4..b9bbfc32 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -222,7 +222,7 @@ bookmark_get_list(void)
 }
 
 char*
-bookmark_find(const char *const search_str, gboolean previous)
+bookmark_find(const char *const search_str, gboolean previous, void *context)
 {
     return autocomplete_complete(bookmark_ac, search_str, TRUE, previous);
 }
diff --git a/src/xmpp/muc.c b/src/xmpp/muc.c
index 98c1e479..d0dd6fac 100644
--- a/src/xmpp/muc.c
+++ b/src/xmpp/muc.c
@@ -181,13 +181,13 @@ muc_confserver_reset_ac(void)
 }
 
 char*
-muc_invites_find(const char *const search_str, gboolean previous)
+muc_invites_find(const char *const search_str, gboolean previous, void *context)
 {
     return autocomplete_complete(invite_ac, search_str, TRUE, previous);
 }
 
 char*
-muc_confserver_find(const char *const search_str, gboolean previous)
+muc_confserver_find(const char *const search_str, gboolean previous, void *context)
 {
     return autocomplete_complete(confservers_ac, search_str, TRUE, previous);
 }
diff --git a/src/xmpp/muc.h b/src/xmpp/muc.h
index 1f9e088b..1c5506ab 100644
--- a/src/xmpp/muc.h
+++ b/src/xmpp/muc.h
@@ -126,7 +126,7 @@ char* muc_roster_nick_change_complete(const char *const room, const char *const
 
 void muc_confserver_add(const char *const server);
 void muc_confserver_reset_ac(void);
-char* muc_confserver_find(const char *const search_str, gboolean previous);
+char* muc_confserver_find(const char *const search_str, gboolean previous, void *context);
 void muc_confserver_clear(void);
 
 void muc_invites_add(const char *const room, const char *const password);
@@ -135,7 +135,7 @@ gint muc_invites_count(void);
 GList* muc_invites(void);
 gboolean muc_invites_contain(const char *const room);
 void muc_invites_reset_ac(void);
-char* muc_invites_find(const char *const search_str, gboolean previous);
+char* muc_invites_find(const char *const search_str, gboolean previous, void *context);
 void muc_invites_clear(void);
 char* muc_invite_password(const char *const room);
 
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index 3eab43a8..5056c3f2 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -161,7 +161,7 @@ presence_clear_sub_requests(void)
 }
 
 char*
-presence_sub_request_find(const char *const search_str, gboolean previous)
+presence_sub_request_find(const char *const search_str, gboolean previous, void *context)
 {
     return autocomplete_complete(sub_requests_ac, search_str, TRUE, previous);
 }
diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c
index 5c66f8b3..3dadb884 100644
--- a/src/xmpp/roster_list.c
+++ b/src/xmpp/roster_list.c
@@ -487,7 +487,7 @@ roster_has_pending_subscriptions(void)
 }
 
 char*
-roster_contact_autocomplete(const char *const search_str, gboolean previous)
+roster_contact_autocomplete(const char *const search_str, gboolean previous, void *context)
 {
     assert(roster != NULL);
 
@@ -495,7 +495,7 @@ roster_contact_autocomplete(const char *const search_str, gboolean previous)
 }
 
 char*
-roster_fulljid_autocomplete(const char *const search_str, gboolean previous)
+roster_fulljid_autocomplete(const char *const search_str, gboolean previous, void *context)
 {
     assert(roster != NULL);
 
@@ -550,7 +550,7 @@ roster_get_groups(void)
 }
 
 char*
-roster_group_autocomplete(const char *const search_str, gboolean previous)
+roster_group_autocomplete(const char *const search_str, gboolean previous, void *context)
 {
     assert(roster != NULL);
 
@@ -558,7 +558,7 @@ roster_group_autocomplete(const char *const search_str, gboolean previous)
 }
 
 char*
-roster_barejid_autocomplete(const char *const search_str, gboolean previous)
+roster_barejid_autocomplete(const char *const search_str, gboolean previous, void *context)
 {
     assert(roster != NULL);
 
diff --git a/src/xmpp/roster_list.h b/src/xmpp/roster_list.h
index 058a4fc5..d5d3c572 100644
--- a/src/xmpp/roster_list.h
+++ b/src/xmpp/roster_list.h
@@ -63,12 +63,12 @@ char* roster_barejid_from_name(const char *const name);
 GSList* roster_get_contacts(roster_ord_t order);
 GSList* roster_get_contacts_online(void);
 gboolean roster_has_pending_subscriptions(void);
-char* roster_contact_autocomplete(const char *const search_str, gboolean previous);
-char* roster_fulljid_autocomplete(const char *const search_str, gboolean previous);
+char* roster_contact_autocomplete(const char *const search_str, gboolean previous, void *context);
+char* roster_fulljid_autocomplete(const char *const search_str, gboolean previous, void *context);
 GSList* roster_get_group(const char *const group, roster_ord_t order);
 GList* roster_get_groups(void);
-char* roster_group_autocomplete(const char *const search_str, gboolean previous);
-char* roster_barejid_autocomplete(const char *const search_str, gboolean previous);
+char* roster_group_autocomplete(const char *const search_str, gboolean previous, void *context);
+char* roster_barejid_autocomplete(const char *const search_str, gboolean previous, void *context);
 GSList* roster_get_contacts_by_presence(const char *const presence);
 char* roster_get_msg_display_name(const char *const barejid, const char *const resource);
 gint roster_compare_name(PContact a, PContact b);
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 0667dead..f5b4ce70 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -188,7 +188,7 @@ void presence_subscription(const char *const jid, const jabber_subscr_t action);
 GList* presence_get_subscription_requests(void);
 gint presence_sub_request_count(void);
 void presence_reset_sub_request_search(void);
-char* presence_sub_request_find(const char *const search_str, gboolean previous);
+char* presence_sub_request_find(const char *const search_str, gboolean previous, void *context);
 void presence_join_room(const char *const room, const char *const nick, const char *const passwd);
 void presence_change_room_nick(const char *const room, const char *const nick);
 void presence_leave_chat_room(const char *const room_jid);
@@ -237,7 +237,7 @@ gboolean bookmark_update(const char *jid, const char *nick, const char *password
 gboolean bookmark_remove(const char *jid);
 gboolean bookmark_join(const char *jid);
 GList* bookmark_get_list(void);
-char* bookmark_find(const char *const search_str, gboolean previous);
+char* bookmark_find(const char *const search_str, gboolean previous, void *context);
 void bookmark_autocomplete_reset(void);
 gboolean bookmark_exists(const char *const room);
 
@@ -250,7 +250,7 @@ void roster_send_remove(const char *const barejid);
 GList* blocked_list(void);
 gboolean blocked_add(char *jid);
 gboolean blocked_remove(char *jid);
-char* blocked_ac_find(const char *const search_str, gboolean previous);
+char* blocked_ac_find(const char *const search_str, gboolean previous, void *context);
 void blocked_ac_reset(void);
 
 void form_destroy(DataForm *form);