pidgin/pidgin

60a6bbf3bfe4
Parents 76417a1fa9b2
Children 979d202488d0
Create the PurplePresencePrimitive enumeration

Testing Done:
Compiled, viewed the docs, and verified that `purpleenums.[ch]` were generated properly.

Bugs closed: PIDGIN-17761

Reviewed at https://reviews.imfreedom.org/r/2244/
--- a/libpurple/meson.build Wed Feb 22 22:19:57 2023 -0600
+++ b/libpurple/meson.build Wed Feb 22 22:21:40 2023 -0600
@@ -266,6 +266,7 @@
'purplemessage.h',
'purplenotification.h',
'purpleplugininfo.h',
+ 'purplepresence.h',
'purpleprotocol.h',
'purpleproxyinfo.h',
'roomlist.h',
--- a/libpurple/purplepresence.h Wed Feb 22 22:19:57 2023 -0600
+++ b/libpurple/purplepresence.h Wed Feb 22 22:21:40 2023 -0600
@@ -50,6 +50,39 @@
#include "status.h"
+/**
+ * PurplePresencePrimitive:
+ * @PURPLE_PRESENCE_PRIMITIVE_OFFLINE: The presence is offline or otherwise
+ * unknown.
+ * @PURPLE_PRESENCE_PRIMITIVE_AVAILABLE: The presence is online or available.
+ * @PURPLE_PRESENCE_PRIMITIVE_IDLE: The presence is online but is idle. This
+ * state is typically set by the client
+ * directly and not the user.
+ * @PURPLE_PRESENCE_PRIMITIVE_INVISIBLE: The presence is online, but not
+ * visible to others.
+ * @PURPLE_PRESENCE_PRIMITIVE_AWAY: The presence is online, but the user is
+ * away from their device.
+ * @PURPLE_PRESENCE_PRIMITIVE_EXTENDED_AWAY: Similar to
+ * @PURPLE_PRESENCE_PRIMITIVE_AWAY,
+ * but typically means the user does
+ * not want to be disturbed.
+ * @PURPLE_PRESENCE_PRIMITIVE_STREAMING: The presence is online but is
+ * streaming.
+ *
+ * An enum that is used to determine the type of a [class@Purple.Presence].
+ *
+ * Since: 3.0.0
+ */
+typedef enum {
+ PURPLE_PRESENCE_PRIMITIVE_OFFLINE,
+ PURPLE_PRESENCE_PRIMITIVE_AVAILABLE,
+ PURPLE_PRESENCE_PRIMITIVE_IDLE,
+ PURPLE_PRESENCE_PRIMITIVE_INVISIBLE,
+ PURPLE_PRESENCE_PRIMITIVE_AWAY,
+ PURPLE_PRESENCE_PRIMITIVE_EXTENDED_AWAY,
+ PURPLE_PRESENCE_PRIMITIVE_STREAMING,
+} PurplePresencePrimitive;
+
G_BEGIN_DECLS
/**