about summary refs log tree commit diff stats
path: root/tests/unittests/xmpp
diff options
context:
space:
mode:
authorMarouane L <techmetx11@disroot.org>2022-09-06 17:29:07 +0100
committerMarouane L <techmetx11@disroot.org>2022-10-18 23:24:30 +0100
commitf934c5b59f2fe2c3c00a50135add4aec55ac4024 (patch)
tree730d135fb92cb15b68717da1f5248c8bc6525019 /tests/unittests/xmpp
parentfc8455ba34fdb467cc2702e4e071e850eaaf9be7 (diff)
downloadprofani-tty-f934c5b59f2fe2c3c00a50135add4aec55ac4024.tar.gz
Add vCard support
Only nicknames, photos, birthdays, addresses, telephone numbers, emails,
JIDs, titles, roles, notes, and URLs are supported

Due to the synopsis array not having enough space, `/vcard photo
open-self` and `/vcard photo save-self` are not documented properly in
the synopsis section of the `/vcard` command, but they are documented in
the arguments section

Fixed memory leak in vcard autocomplete (thanks to debXwoody)
Diffstat (limited to 'tests/unittests/xmpp')
-rw-r--r--tests/unittests/xmpp/stub_vcard.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/tests/unittests/xmpp/stub_vcard.c b/tests/unittests/xmpp/stub_vcard.c
new file mode 100644
index 00000000..cc48f92c
--- /dev/null
+++ b/tests/unittests/xmpp/stub_vcard.c
@@ -0,0 +1,79 @@
+#include "ui/ui.h"
+#include "xmpp/vcard.h"
+
+ProfWin*
+vcard_user_create_win()
+{
+    return NULL;
+}
+
+void
+vcard_user_add_element(vcard_element_t* element)
+{
+}
+
+void
+vcard_user_remove_element(unsigned int index)
+{
+}
+
+void
+vcard_print(xmpp_ctx_t* ctx, ProfWin* window, char* jid)
+{
+}
+
+void
+vcard_photo(xmpp_ctx_t* ctx, char* jid, char* filename, int index, gboolean open)
+{
+}
+
+void
+vcard_user_refresh(void)
+{
+}
+
+void
+vcard_user_save(void)
+{
+}
+
+void
+vcard_user_set_fullname(char* fullname)
+{
+}
+
+void
+vcard_user_set_name_family(char* family)
+{
+}
+
+void
+vcard_user_set_name_given(char* given)
+{
+}
+
+void
+vcard_user_set_name_middle(char* middle)
+{
+}
+
+void
+vcard_user_set_name_prefix(char* prefix)
+{
+}
+
+void
+vcard_user_set_name_suffix(char* suffix)
+{
+}
+
+vcard_element_t*
+vcard_user_get_element_index(unsigned int index)
+{
+    return NULL;
+}
+
+void
+vcard_user_free(void)
+{
+}
ef='#n221'>221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298