aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r--libempathy/empathy-message.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index 705bd224b..bab286585 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -42,6 +42,7 @@ typedef struct {
gboolean is_backlog;
guint id;
gboolean incoming;
+ TpChannelTextMessageFlags flags;
} EmpathyMessagePriv;
static void empathy_message_finalize (GObject *object);
@@ -65,6 +66,7 @@ enum {
PROP_TIMESTAMP,
PROP_IS_BACKLOG,
PROP_INCOMING,
+ PROP_FLAGS,
};
static void
@@ -133,6 +135,14 @@ empathy_message_class_init (EmpathyMessageClass *class)
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (object_class,
+ PROP_FLAGS,
+ g_param_spec_uint ("flags",
+ "Flags",
+ "The TpChannelTextMessageFlags of this message",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
g_type_class_add_private (object_class, sizeof (EmpathyMessagePriv));
}
@@ -581,3 +591,28 @@ empathy_message_equal (EmpathyMessage *message1, EmpathyMessage *message2)
return FALSE;
}
+
+TpChannelTextMessageFlags
+empathy_message_get_flags (EmpathyMessage *self)
+{
+ EmpathyMessagePriv *priv = GET_PRIV (self);
+
+ g_return_val_if_fail (EMPATHY_IS_MESSAGE (self), 0);
+
+ return priv->flags;
+}
+
+void
+empathy_message_set_flags (EmpathyMessage *self,
+ TpChannelTextMessageFlags flags)
+{
+ EmpathyMessagePriv *priv;
+
+ g_return_if_fail (EMPATHY_IS_MESSAGE (self));
+
+ priv = GET_PRIV (self);
+
+ priv->flags = flags;
+
+ g_object_notify (G_OBJECT (self), "flags");
+}