[Telepathy-commits] [telepathy-glib/master] ExampleCSHRoomChannel: factor out close method
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Mar 24 13:47:00 PDT 2009
---
examples/cm/channelspecific/room.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index 2eaa846..c6005a2 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -411,6 +411,16 @@ set_property (GObject *object,
}
static void
+example_csh_room_channel_close (ExampleCSHRoomChannel *self)
+{
+ if (!self->priv->closed)
+ {
+ self->priv->closed = TRUE;
+ tp_svc_channel_emit_closed (self);
+ }
+}
+
+static void
dispose (GObject *object)
{
ExampleCSHRoomChannel *self = EXAMPLE_CSH_ROOM_CHANNEL (object);
@@ -420,11 +430,7 @@ dispose (GObject *object)
self->priv->disposed = TRUE;
- if (!self->priv->closed)
- {
- self->priv->closed = TRUE;
- tp_svc_channel_emit_closed (self);
- }
+ example_csh_room_channel_close (self);
((GObjectClass *) example_csh_room_channel_parent_class)->dispose (object);
}
@@ -568,11 +574,7 @@ channel_close (TpSvcChannel *iface,
{
ExampleCSHRoomChannel *self = EXAMPLE_CSH_ROOM_CHANNEL (iface);
- if (!self->priv->closed)
- {
- self->priv->closed = TRUE;
- tp_svc_channel_emit_closed (self);
- }
+ example_csh_room_channel_close (self);
tp_svc_channel_return_from_close (context);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list