summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielle Madeley <danielle@madeley.id.au>2011-11-07 20:54:44 +1100
committerDanielle Madeley <danielle@madeley.id.au>2011-11-07 20:54:44 +1100
commit465b3aef2330ae73c2f643eeec4676da657c2222 (patch)
tree487fc1a2c84f2930657527597e3f91f0886ef470
parented09e896b3c249568192e92b5195462e626918fb (diff)
parenta04b9e505e6a5baec65fbb52522f1b52656ca72e (diff)
Merge branch 'wocky-muc-gdatetime'
m---------lib/ext/wocky0
-rw-r--r--src/muc-channel.c29
2 files changed, 16 insertions, 13 deletions
diff --git a/lib/ext/wocky b/lib/ext/wocky
-Subproject 3c43751dc90e4cdb08f57f48e2a8e6adf715ed8
+Subproject 1f2949120297e4ac2b3abbbe916a8f9b34f702c
diff --git a/src/muc-channel.c b/src/muc-channel.c
index 4687dc8b4..2e3225f0a 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -296,7 +296,7 @@ static void handle_message (GObject *source,
WockyStanza *stanza,
WockyMucMsgType type,
const gchar *xmpp_id,
- time_t stamp,
+ GDateTime *datetime,
WockyMucMember *who,
const gchar *text,
const gchar *subject,
@@ -307,7 +307,7 @@ static void handle_errmsg (GObject *source,
WockyStanza *stanza,
WockyMucMsgType type,
const gchar *xmpp_id,
- time_t stamp,
+ GDateTime *datetime,
WockyMucMember *who,
const gchar *text,
WockyXmppError error,
@@ -318,10 +318,11 @@ static void handle_errmsg (GObject *source,
static void _gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
TpHandleType handle_type,
- TpHandle sender, time_t timestamp, const gchar *subject, LmMessage *msg);
+ TpHandle sender, GDateTime *datetime, const gchar *subject,
+ LmMessage *msg);
static void _gabble_muc_channel_receive (GabbleMucChannel *chan,
TpChannelTextMessageType msg_type, TpHandleType handle_type,
- TpHandle sender, time_t timestamp, const gchar *id, const gchar *text,
+ TpHandle sender, GDateTime *datetime, const gchar *id, const gchar *text,
LmMessage *msg, TpChannelTextSendError send_error,
TpDeliveryStatus delivery_status);
@@ -2343,7 +2344,7 @@ handle_message (GObject *source,
WockyStanza *stanza,
WockyMucMsgType type,
const gchar *xmpp_id,
- time_t stamp,
+ GDateTime *datetime,
WockyMucMember *who,
const gchar *text,
const gchar *subject,
@@ -2395,7 +2396,7 @@ handle_message (GObject *source,
if (text != NULL)
_gabble_muc_channel_receive (gmuc,
- msg_type, handle_type, from, stamp, xmpp_id, text, stanza,
+ msg_type, handle_type, from, datetime, xmpp_id, text, stanza,
GABBLE_TEXT_CHANNEL_SEND_NO_ERROR, TP_DELIVERY_STATUS_DELIVERED);
if (from_member && state != WOCKY_MUC_MSG_STATE_NONE)
@@ -2425,7 +2426,7 @@ handle_message (GObject *source,
if (subject != NULL)
_gabble_muc_channel_handle_subject (gmuc, handle_type, from,
- stamp, subject, stanza);
+ datetime, subject, stanza);
tp_handle_unref (repo, from);
}
@@ -2435,7 +2436,7 @@ handle_errmsg (GObject *source,
WockyStanza *stanza,
WockyMucMsgType type,
const gchar *xmpp_id,
- time_t stamp,
+ GDateTime *datetime,
WockyMucMember *who,
const gchar *text,
WockyXmppError error,
@@ -2484,7 +2485,7 @@ handle_errmsg (GObject *source,
if (text != NULL)
_gabble_muc_channel_receive (gmuc, TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- handle_type, from, stamp, xmpp_id, text, stanza, tp_err, ds);
+ handle_type, from, datetime, xmpp_id, text, stanza, tp_err, ds);
/* FIXME: this is stupid. WockyMuc gives us the subject for non-errors, but
* doesn't bother for errors.
@@ -2500,7 +2501,7 @@ handle_errmsg (GObject *source,
(priv->set_subject_stanza_id != NULL &&
!tp_strdiff (xmpp_id, priv->set_subject_stanza_id)))
_gabble_muc_channel_handle_subject (gmuc,
- handle_type, from, stamp, subject, stanza);
+ handle_type, from, datetime, subject, stanza);
tp_handle_unref (repo, from);
}
@@ -2513,13 +2514,14 @@ void
_gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
TpHandleType handle_type,
TpHandle sender,
- time_t timestamp,
+ GDateTime *datetime,
const gchar *subject,
LmMessage *msg)
{
GabbleMucChannelPrivate *priv;
const gchar *actor;
GError *error = NULL;
+ gint64 timestamp = g_date_time_to_unix (datetime);
g_assert (GABBLE_IS_MUC_CHANNEL (chan));
@@ -2568,7 +2570,7 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
priv->subject_timestamp = timestamp;
DEBUG ("Subject changed to '%s' by '%s' at %" G_GINT64_FORMAT "",
- subject, actor, (gint64) timestamp);
+ subject, actor, timestamp);
/* Emit signals */
emit_subject_changed (chan);
@@ -2585,7 +2587,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan,
TpChannelTextMessageType msg_type,
TpHandleType sender_handle_type,
TpHandle sender,
- time_t timestamp,
+ GDateTime *datetime,
const gchar *id,
const gchar *text,
LmMessage *msg,
@@ -2599,6 +2601,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan,
gboolean is_echo;
gboolean is_error;
gchar *tmp;
+ gint64 timestamp = g_date_time_to_unix (datetime);
g_assert (GABBLE_IS_MUC_CHANNEL (chan));