PROP_CONTACT,
PROP_INCOMING,
PROP_STATUS,
+ PROP_USER_ACTION_TIME,
};
/* private structure */
EmpathyContact *contact;
EmpathyDispatchOperationState status;
gboolean incoming;
+ gint64 user_action_time;
gboolean approved;
gulong invalidated_handler;
gulong ready_handler;
case PROP_INCOMING:
priv->incoming = g_value_get_boolean (value);
break;
+
+ case PROP_USER_ACTION_TIME:
+ priv->user_action_time = g_value_get_int64 (value);
+ break;
}
}
case PROP_STATUS:
g_value_set_enum (value, priv->status);
break;
+ case PROP_USER_ACTION_TIME:
+ g_value_set_int64 (value, priv->user_action_time);
+ break;
}
}
EMPATHY_TYPE_DISPATCH_OPERATION_STATE, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_STATUS, param_spec);
+
+ param_spec = g_param_spec_int64 ("user-action-time",
+ "user action time", "The user action time of the operation",
+ G_MININT64, G_MAXINT64, 0,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_USER_ACTION_TIME,
+ param_spec);
}
void
}
EmpathyDispatchOperation *
-empathy_dispatch_operation_new (TpConnection *connection, TpChannel *channel,
- EmpathyContact *contact, gboolean incoming)
+empathy_dispatch_operation_new (TpConnection *connection,
+ TpChannel *channel,
+ EmpathyContact *contact,
+ gboolean incoming,
+ gint64 user_action_time)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (channel != NULL, NULL);
"channel", channel,
"contact", contact,
"incoming", incoming,
+ "user-action-time", user_action_time,
NULL);
}
return priv->incoming;
}
+
+gint64
+empathy_dispatch_operation_get_user_action_time (EmpathyDispatchOperation *self)
+{
+ EmpathyDispatchOperationPriv *priv;
+
+ g_return_val_if_fail (EMPATHY_IS_DISPATCH_OPERATION (self), FALSE);
+
+ priv = GET_PRIV (self);
+
+ return priv->user_action_time;
+}
EmpathyDispatchOperation *empathy_dispatch_operation_new (
TpConnection *connection, TpChannel *channel, EmpathyContact *contact,
- gboolean incoming);
+ gboolean incoming,
+ gint64 user_action_time);
EmpathyDispatchOperation *empathy_dispatch_operation_new_with_wrapper (
TpConnection *connection, TpChannel *channel, EmpathyContact *contact,
- gboolean incoming, GObject *channel_wrapper);
+ gboolean incoming,
+ gint64 user_action_time,
+ GObject *channel_wrapper);
/* Start the dispatching process, goes to the APPROVING state for incoming
* channels and DISPATCHING for outgoing ones */
gboolean empathy_dispatch_operation_is_incoming (
EmpathyDispatchOperation *operation);
+gint64 empathy_dispatch_operation_get_user_action_time (
+ EmpathyDispatchOperation *self);
+
G_END_DECLS
#endif /* #ifndef __EMPATHY_DISPATCH_OPERATION_H__*/
guint handle,
GHashTable *properties,
gboolean incoming,
- const GPtrArray *requests_satisfied)
+ const GPtrArray *requests_satisfied,
+ gint64 timestamp)
{
EmpathyDispatcherPriv *priv = GET_PRIV (self);
TpChannel *channel;
priv->channels = g_list_prepend (priv->channels, channel);
operation = empathy_dispatch_operation_new (connection, channel, NULL,
- incoming);
+ incoming, timestamp);
g_object_unref (channel);
TpConnection *connection,
const gchar *object_path,
GHashTable *properties,
- const GPtrArray *requests_satisfied)
+ const GPtrArray *requests_satisfied,
+ gint64 timestamp)
{
const gchar *channel_type;
guint handle_type;
dispatcher_connection_new_channel (self, connection,
object_path, channel_type, handle_type, handle, properties, !requested,
- requests_satisfied);
+ requests_satisfied, timestamp);
}
static void
properties = g_value_get_boxed (g_value_array_get_nth (arr, 1));
dispatcher_connection_new_channel_with_properties (self,
- connection, object_path, properties, requests_satisfied);
+ connection, object_path, properties, requests_satisfied, timestamp);
}
return TRUE;