1 /*
2  * text-factory.h - Text channel factory for SIP connection manager
3  * Copyright (C) 2007 Collabora Ltd.
4  * Copyright (C) 2007 Nokia Corporation
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * version 2.1 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef __SIP_TEXT_FACTORY_H__
22 #define __SIP_TEXT_FACTORY_H__
23 
24 #include <telepathy-glib/channel-factory-iface.h>
25 
26 #include "sip-connection-sofia.h"
27 #include "sip-text-channel.h"
28 
29 G_BEGIN_DECLS
30 
31 typedef struct _SIPTextFactory SIPTextFactory;
32 typedef struct _SIPTextFactoryClass SIPTextFactoryClass;
33 
34 struct _SIPTextFactoryClass {
35   GObjectClass parent_class;
36 };
37 
38 struct _SIPTextFactory {
39   GObject parent;
40 };
41 
42 GType sip_text_factory_get_type(void);
43 
44 /* TYPE MACROS */
45 #define SIP_TYPE_TEXT_FACTORY \
46   (sip_text_factory_get_type())
47 #define SIP_TEXT_FACTORY(obj) \
48   (G_TYPE_CHECK_INSTANCE_CAST((obj), SIP_TYPE_TEXT_FACTORY, SIPTextFactory))
49 #define SIP_TEXT_FACTORY_CLASS(klass) \
50   (G_TYPE_CHECK_CLASS_CAST((klass), SIP_TYPE_TEXT_FACTORY, SIPTextFactoryClass))
51 #define SIP_IS_TEXT_FACTORY(obj) \
52   (G_TYPE_CHECK_INSTANCE_TYPE((obj), SIP_TYPE_TEXT_FACTORY))
53 #define SIP_IS_TEXT_FACTORY_CLASS(klass) \
54   (G_TYPE_CHECK_CLASS_TYPE((klass), SIP_TYPE_TEXT_FACTORY))
55 #define SIP_TEXT_FACTORY_GET_CLASS(obj) \
56   (G_TYPE_INSTANCE_GET_CLASS ((obj), SIP_TYPE_TEXT_FACTORY, SIPTextFactoryClass))
57 
58 SIPTextChannel *sip_text_factory_lookup_channel (TpChannelFactoryIface *iface,
59     guint handle);
60 
61 SIPTextChannel *sip_text_factory_new_channel (TpChannelFactoryIface *iface,
62     TpHandle handle, gpointer request);
63 
64 G_END_DECLS
65 
66 #endif
67