libpurple/purpleconversation.h

changeset 42316
3985c3404f20
parent 42302
54e2bf5af34a
child 42318
3b05e7088b61
--- a/libpurple/purpleconversation.h	Tue Sep 05 00:22:03 2023 -0500
+++ b/libpurple/purpleconversation.h	Tue Sep 05 00:43:49 2023 -0500
@@ -86,6 +86,33 @@
 } PurpleConversationUpdateType;
 
 /**
+ * PurpleConversationType:
+ * @PurpleConversationTypeUnset: A value to specify that the property has not
+ *                               been set.
+ * @PurpleConversationTypeDM: A direct message between two contacts.
+ * @PurpleConversationTypeGroupDM: A direct message between a protocol
+ *                                 dependent number of contacts.
+ * @PurpleConversationTypeChannel: A multi-user chat that is available to all
+ *                                 users on the protocol and has features like
+ *                                 moderation.
+ * @PurpleConversationTypeThread: A thread is a subset of messages from a
+ *                                conversation that are related.
+ *
+ * The type of the conversation. This is mostly ignored, but could be useful in
+ * ways we can't imagine right now. If you come up with one in the future,
+ * please let us know!
+ *
+ * Since: 3.0.0
+ */
+typedef enum {
+	PurpleConversationTypeUnset,
+	PurpleConversationTypeDM,
+	PurpleConversationTypeGroupDM,
+	PurpleConversationTypeChannel,
+	PurpleConversationTypeThread,
+} PurpleConversationType;
+
+/**
  * PurpleConversation:
  *
  * A core representation of a conversation between two or more people.
@@ -163,6 +190,32 @@
 const char *purple_conversation_get_id(PurpleConversation *conversation);
 
 /**
+ * purple_conversation_get_conversation_type:
+ * @conversation: The instance.
+ *
+ * Gets the type of @conversation.
+ *
+ * Returns: The [enum@ConversationType] of @conversation.
+ *
+ * Since: 3.0.0.
+ */
+PurpleConversationType purple_conversation_get_conversation_type(PurpleConversation *conversation);
+
+/**
+ * purple_conversation_set_conversation_type:
+ * @conversation: The instance.
+ * @type: The new type.
+ *
+ * Sets the type of @conversation to @type.
+ *
+ * > Note this only for the internal representation in libpurple and the
+ * protocol will not be told to change the type.
+ *
+ * Since: 3.0.0
+ */
+void purple_conversation_set_conversation_type(PurpleConversation *conversation, PurpleConversationType type);
+
+/**
  * purple_conversation_set_account:
  * @conv: The conversation.
  * @account: The purple_account.

mercurial