aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-02 01:03:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-02 20:04:41 +0800
commit8d1543fd36e67823e390477548dfa43f86afa2e2 (patch)
tree6f5e2f638b1faf1ba064ec5f262c11ad630e49a5
parent623c7ba6130a483a2581dadce6f674755cdf44d3 (diff)
downloadgsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar.gz
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar.bz2
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar.lz
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar.xz
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.tar.zst
gsoc2013-empathy-8d1543fd36e67823e390477548dfa43f86afa2e2.zip
empathy-message: add message flags
-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__ */