diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-19 23:28:52 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-04-25 02:44:09 +0800 |
commit | cdd773bdb91f860c502864bf9d40df45f935aa7c (patch) | |
tree | 38291c1f334f77e11508a74f42421186da64233e /libempathy/empathy-dispatch-operation.c | |
parent | 221c1186f4b34b585767ae5b6f8e705410bf60dc (diff) | |
download | gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar.gz gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar.bz2 gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar.lz gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar.xz gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.tar.zst gsoc2013-empathy-cdd773bdb91f860c502864bf9d40df45f935aa7c.zip |
dispatch-operation: add user-action-time property
Diffstat (limited to 'libempathy/empathy-dispatch-operation.c')
-rw-r--r-- | libempathy/empathy-dispatch-operation.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c index 6120f8e05..6c5fa38d8 100644 --- a/libempathy/empathy-dispatch-operation.c +++ b/libempathy/empathy-dispatch-operation.c @@ -70,6 +70,7 @@ enum { PROP_CONTACT, PROP_INCOMING, PROP_STATUS, + PROP_USER_ACTION_TIME, }; /* private structure */ @@ -85,6 +86,7 @@ struct _EmpathyDispatchOperationPriv EmpathyContact *contact; EmpathyDispatchOperationState status; gboolean incoming; + gint64 user_action_time; gboolean approved; gulong invalidated_handler; gulong ready_handler; @@ -132,6 +134,10 @@ empathy_dispatch_operation_set_property (GObject *object, 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; } } @@ -162,6 +168,9 @@ empathy_dispatch_operation_get_property (GObject *object, 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; } } @@ -357,6 +366,13 @@ empathy_dispatch_operation_class_init ( 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 @@ -492,8 +508,11 @@ out: } 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); @@ -503,6 +522,7 @@ empathy_dispatch_operation_new (TpConnection *connection, TpChannel *channel, "channel", channel, "contact", contact, "incoming", incoming, + "user-action-time", user_action_time, NULL); } @@ -681,3 +701,15 @@ empathy_dispatch_operation_is_incoming (EmpathyDispatchOperation *operation) 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; +} |