1 /* 2 * sip-text-channel.h - Header for SIPTextChannel 3 * Copyright (C) 2005 Collabora Ltd. 4 * Copyright (C) 2005 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 Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef __SIP_TEXT_CHANNEL_H__ 21 #define __SIP_TEXT_CHANNEL_H__ 22 23 #include <glib-object.h> 24 25 #include <telepathy-glib/handle.h> 26 27 #include "sip-sofia-decls.h" 28 29 typedef struct _SipHandleStorage SipHandleStorage; 30 31 G_BEGIN_DECLS 32 33 typedef struct _SIPTextChannel SIPTextChannel; 34 typedef struct _SIPTextChannelClass SIPTextChannelClass; 35 36 struct _SIPTextChannelClass { 37 GObjectClass parent_class; 38 }; 39 40 struct _SIPTextChannel { 41 GObject parent; 42 }; 43 44 GType sip_text_channel_get_type(void); 45 46 /* TYPE MACROS */ 47 #define SIP_TYPE_TEXT_CHANNEL \ 48 (sip_text_channel_get_type()) 49 #define SIP_TEXT_CHANNEL(obj) \ 50 (G_TYPE_CHECK_INSTANCE_CAST((obj), SIP_TYPE_TEXT_CHANNEL, SIPTextChannel)) 51 #define SIP_TEXT_CHANNEL_CLASS(klass) \ 52 (G_TYPE_CHECK_CLASS_CAST((klass), SIP_TYPE_TEXT_CHANNEL, SIPTextChannelClass)) 53 #define SIP_IS_TEXT_CHANNEL(obj) \ 54 (G_TYPE_CHECK_INSTANCE_TYPE((obj), SIP_TYPE_TEXT_CHANNEL)) 55 #define SIP_IS_TEXT_CHANNEL_CLASS(klass) \ 56 (G_TYPE_CHECK_CLASS_TYPE((klass), SIP_TYPE_TEXT_CHANNEL)) 57 #define SIP_TEXT_CHANNEL_GET_CLASS(obj) \ 58 (G_TYPE_INSTANCE_GET_CLASS ((obj), SIP_TYPE_TEXT_CHANNEL, SIPTextChannelClass)) 59 60 61 void sip_text_channel_close (SIPTextChannel *self); 62 63 void sip_text_channel_emit_message_status(SIPTextChannel *obj, 64 nua_handle_t *nh, 65 int status); 66 67 void sip_text_channel_receive (SIPTextChannel *obj, 68 TpHandle sender, 69 const char *message); 70 71 72 G_END_DECLS 73 74 #endif /* #ifndef __SIP_TEXT_CHANNEL_H__*/ 75