2 * empathy-call-handler.c - Source for EmpathyCallHandler
3 * Copyright (C) 2008 Collabora Ltd.
4 * @author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #include "empathy-call-handler.h"
27 G_DEFINE_TYPE(EmpathyCallHandler, empathy_call_handler, G_TYPE_OBJECT)
36 static guint signals[LAST_SIGNAL] = {0};
39 /* private structure */
40 typedef struct _EmpathyCallHandlerPrivate EmpathyCallHandlerPrivate;
42 struct _EmpathyCallHandlerPrivate
44 gboolean dispose_has_run;
47 #define EMPATHY_CALL_HANDLER_GET_PRIVATE(o) \
48 (G_TYPE_INSTANCE_GET_PRIVATE ((o), EMPATHY_TYPE_CALL_HANDLER,\
49 EmpathyCallHandlerPrivate))
52 empathy_call_handler_init (EmpathyCallHandler *obj)
54 //EmpathyCallHandlerPrivate *priv = EMPATHY_CALL_HANDLER_GET_PRIVATE (obj);
56 /* allocate any data required by the object here */
59 static void empathy_call_handler_dispose (GObject *object);
60 static void empathy_call_handler_finalize (GObject *object);
63 empathy_call_handler_class_init (
64 EmpathyCallHandlerClass *empathy_call_handler_class)
66 GObjectClass *object_class = G_OBJECT_CLASS (empathy_call_handler_class);
68 g_type_class_add_private (empathy_call_handler_class,
69 sizeof (EmpathyCallHandlerPrivate));
71 object_class->dispose = empathy_call_handler_dispose;
72 object_class->finalize = empathy_call_handler_finalize;
77 empathy_call_handler_dispose (GObject *object)
79 EmpathyCallHandler *self = EMPATHY_CALL_HANDLER (object);
80 EmpathyCallHandlerPrivate *priv = EMPATHY_CALL_HANDLER_GET_PRIVATE (self);
82 if (priv->dispose_has_run)
85 priv->dispose_has_run = TRUE;
87 /* release any references held by the object here */
89 if (G_OBJECT_CLASS (empathy_call_handler_parent_class)->dispose)
90 G_OBJECT_CLASS (empathy_call_handler_parent_class)->dispose (object);
94 empathy_call_handler_finalize (GObject *object)
96 //EmpathyCallHandler *self = EMPATHY_CALL_HANDLER (object);
97 //EmpathyCallHandlerPrivate *priv = EMPATHY_CALL_HANDLER_GET_PRIVATE (self);
99 /* free any data held directly by the object here */
101 G_OBJECT_CLASS (empathy_call_handler_parent_class)->finalize (object);
106 empathy_call_handler_new_for_contact (EmpathyContact *contact)
108 return EMPATHY_CALL_HANDLER (g_object_new (EMPATHY_TYPE_CALL_HANDLER, NULL));
112 empathy_call_handler_new_for_channel (EmpathyTpCall *call)
114 return EMPATHY_CALL_HANDLER (g_object_new (EMPATHY_TYPE_CALL_HANDLER, NULL));