aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-message.c35
-rw-r--r--libempathy/empathy-message.h4
2 files changed, 39 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");
+}
diff --git a/libempathy/empathy-message.h b/libempathy/empathy-message.h
index 09175e625..512869373 100644
--- a/libempathy/empathy-message.h
+++ b/libempathy/empathy-message.h
@@ -84,6 +84,10 @@ void empathy_message_set_id (EmpathyMessage *message, guint
gboolean empathy_message_equal (EmpathyMessage *message1, EmpathyMessage *message2);
+TpChannelTextMessageFlags empathy_message_get_flags (EmpathyMessage *message);
+void empathy_message_set_flags (EmpathyMessage *message,
+ TpChannelTextMessageFlags flags);
+
G_END_DECLS
#endif /* __EMPATHY_MESSAGE_H__ */