From 646486c9e5f3972d2d5ec332c601eab73502fd3a Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 9 Jan 2009 16:11:54 +0000 Subject: Add id field to save the message id as received the CM Signed-off-by: Sjoerd Simons svn path=/trunk/; revision=2127 --- libempathy/empathy-message.c | 16 ++++++++++++++++ libempathy/empathy-message.h | 3 +++ 2 files changed, 19 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index a4bfffb42..9835b59bc 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -37,6 +37,7 @@ typedef struct { EmpathyContact *receiver; gchar *body; time_t timestamp; + guint id; } EmpathyMessagePriv; static void empathy_message_finalize (GObject *object); @@ -479,3 +480,18 @@ empathy_message_type_to_str (TpChannelTextMessageType type) } } +guint +empathy_message_get_id (EmpathyMessage *message) +{ + EmpathyMessagePriv *priv = GET_PRIV (message); + + return priv->id; +} + +void +empathy_message_set_id (EmpathyMessage *message, guint id) +{ + EmpathyMessagePriv *priv = GET_PRIV (message); + + priv->id = id; +} diff --git a/libempathy/empathy-message.h b/libempathy/empathy-message.h index b944280b1..44e626a5a 100644 --- a/libempathy/empathy-message.h +++ b/libempathy/empathy-message.h @@ -72,6 +72,9 @@ gboolean empathy_message_should_highlight (EmpathyMessage TpChannelTextMessageType empathy_message_type_from_str (const gchar *type_str); const gchar * empathy_message_type_to_str (TpChannelTextMessageType type); +guint empathy_message_get_id (EmpathyMessage *message); +void empathy_message_set_id (EmpathyMessage *message, guint id); + G_END_DECLS #endif /* __EMPATHY_MESSAGE_H__ */ -- cgit v1.2.3