1 /* 2 * Copyright (C) 2009 Collabora Ltd. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 * 18 * Authors: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> 19 */ 20 21 #ifndef __TPL_TEXT_EVENT_INTERNAL_H__ 22 #define __TPL_TEXT_EVENT_INTERNAL_H__ 23 24 #include <telepathy-logger/text-event.h> 25 #include <telepathy-logger/event-internal.h> 26 #include <telepathy-logger/text-channel-internal.h> 27 28 #define TPL_TEXT_EVENT_MSG_ID_IS_VALID(msg) (msg >= 0) 29 30 #define TPL_TEXT_EVENT_MSG_ID_UNKNOWN -2 31 #define TPL_TEXT_EVENT_MSG_ID_ACKNOWLEDGED -1 32 33 G_BEGIN_DECLS 34 35 struct _TplTextEvent 36 { 37 TplEvent parent; 38 39 /* Private */ 40 TplTextEventPriv *priv; 41 }; 42 43 struct _TplTextEventClass 44 { 45 TplEventClass parent_class; 46 }; 47 48 TpChannelTextMessageType _tpl_text_event_message_type_from_str ( 49 const gchar *type_str); 50 51 const gchar * _tpl_text_event_message_type_to_str ( 52 TpChannelTextMessageType msg_type); 53 54 gint _tpl_text_event_get_pending_msg_id (TplTextEvent *self); 55 56 gboolean _tpl_text_event_is_pending (TplTextEvent *self); 57 58 void _tpl_text_event_add_supersedes (TplTextEvent *self, 59 TplTextEvent *old_event); 60 61 G_END_DECLS 62 #endif // __TPL_TEXT_EVENT_INTERNAL_H__ 63