libpurple/purplecontactmanager.h

changeset 43187
f1c824ae3ccd
parent 42689
d921cd91924f
child 43285
acde304cf24c
--- a/libpurple/purplecontactmanager.h	Fri Feb 21 00:03:24 2025 -0600
+++ b/libpurple/purplecontactmanager.h	Wed Feb 26 00:35:17 2025 -0600
@@ -156,6 +156,21 @@
 PurpleContact *purple_contact_manager_find_with_id(PurpleContactManager *manager, PurpleAccount *account, const gchar *id);
 
 /**
+ * purple_contact_manager_find_or_create:
+ * @account: the account whose contact to find
+ * @id: the id of the contact to find
+ * @found: (out) (optional): a return address for a boolean which will be set to true
+ *         if the contact was found
+ *
+ * Looks for a [class@Purple.Contact] that belongs to @account with an id of @id
+ * or creates a new one.
+ *
+ * Returns: (transfer full): The [class@Purple.Contact] that was either found or newly created.
+ */
+PURPLE_AVAILABLE_IN_3_0
+PurpleContact *purple_contact_manager_find_or_create(PurpleContactManager *manager, PurpleAccount *account, const char *id, gboolean *found);
+
+/**
  * purple_contact_manager_add_person:
  * @manager: The instance.
  * @person: The [class@Purple.Person to add].

mercurial