aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:11:54 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:11:54 +0800
commit646486c9e5f3972d2d5ec332c601eab73502fd3a (patch)
tree7b0797aa97d3ec8818e41151ac24b8ef55bd3746
parent19dc1bdbd665f4ce79ec186294618218f65be49f (diff)
downloadgsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar.gz
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar.bz2
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar.lz
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar.xz
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.tar.zst
gsoc2013-empathy-646486c9e5f3972d2d5ec332c601eab73502fd3a.zip
Add id field to save the message id as received the CM
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2127
-rw-r--r--libempathy/empathy-message.c16
-rw-r--r--libempathy/empathy-message.h3
2 files changed, 19 insertions, 0 deletions
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__ */