diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-01-31 17:18:13 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-01-31 17:18:13 +0000 |
commit | 281673e30aa5012ec3425a59fddcb24d8c2ac18b (patch) | |
tree | d18ebaa818240a219185202dae1e2432651a12bd /lib | |
parent | c2279a6b7dda2060e198d5407f22228d2c3be9ed (diff) | |
parent | 14732bf5081f20aa314c3530e4c6a38155f75a62 (diff) |
Merge branch 'quietmouth'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | lib/loudmouth/Makefile.am | 73 | ||||
-rw-r--r-- | lib/loudmouth/lm-connection.c | 209 | ||||
-rw-r--r-- | lib/loudmouth/lm-connection.h | 67 | ||||
-rw-r--r-- | lib/loudmouth/lm-message-handler.c | 56 | ||||
-rw-r--r-- | lib/loudmouth/lm-message-handler.h | 64 | ||||
-rw-r--r-- | lib/loudmouth/lm-message.c | 62 | ||||
-rw-r--r-- | lib/loudmouth/lm-message.h | 83 | ||||
-rw-r--r-- | lib/loudmouth/lm-types.h | 13 | ||||
-rw-r--r-- | lib/loudmouth/loudmouth.h | 28 |
10 files changed, 1 insertions, 656 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 620e572da..9755d06b8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1 +1 @@ -SUBDIRS=ext gibber loudmouth +SUBDIRS=ext gibber diff --git a/lib/loudmouth/Makefile.am b/lib/loudmouth/Makefile.am deleted file mode 100644 index 7d58434f8..000000000 --- a/lib/loudmouth/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -noinst_LTLIBRARIES = libloudmouth.la - -BUILT_SOURCES = \ - loudmouth-signals-marshal.list \ - loudmouth-signals-marshal.h \ - loudmouth-signals-marshal.c - -OUR_SOURCES = \ - loudmouth.h \ - lm-types.h \ - lm-message.c \ - lm-message.h \ - lm-message-handler.c \ - lm-message-handler.h \ - lm-connection.c \ - lm-connection.h - -libloudmouth_la_SOURCES = $(OUR_SOURCES) $(BUILT_SOURCES) -libloudmouth_la_LIBADD = @WOCKY_LIBS@ -# filter out any -flags as we only need to include .a and .la files here: -# this is necessary because: -# @@ substitutions are filtered out by automake when constructing *_DEPENDENCIES -# *_LIBADD contains the link flags, dynamic libs and static libs we want -# *_DEPENDENCIES _MUST NOT_ contain the link flags and dynamic libs -# *_DEPENDENCIES _SHOULD_ contain static libs so we rebuild when they change -libloudmouth_la_DEPENDENCIES = \ - $(filter-out -%, $(libloudmouth_la_LIBADD)) - -# Coding style checks -check_c_sources = \ - $(OUR_SOURCES) - -include $(top_srcdir)/tools/check-coding-style.mk -check-local: check-coding-style - -CLEANFILES=$(BUILT_SOURCES) -dist-hook: - $(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done) - -loudmouth-signals-marshal.list: $(OUR_SOURCES) Makefile.am - $(AM_V_GEN)( cd $(srcdir) && \ - sed -n -e 's/.*_loudmouth_signals_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \ - $(OUR_SOURCES) ) \ - | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp - @if cmp -s $@.tmp $@; then \ - rm $@.tmp; \ - touch $@; \ - else \ - mv $@.tmp $@; \ - fi - -%-signals-marshal.h: %-signals-marshal.list Makefile.am - $(AM_V_GEN)glib-genmarshal --header --prefix=_$(subst -,_,$*)_signals_marshal $< > $@ - -%-signals-marshal.c: %-signals-marshal.list Makefile.am - $(AM_V_GEN){ echo '#include "$*-signals-marshal.h"' && \ - glib-genmarshal --body --prefix=_$(subst -,_,$*)_signals_marshal $< ; \ - } > $@ - - -AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @WOCKY_CFLAGS@ - -AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @WOCKY_LIBS@ - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer -:PROJECT telepathy-gabble -:STATIC loudmouth -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libloudmouth_la_SOURCES) \ - -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CFLAGS) \ - -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) \ - -:LDFLAGS $(libloudmouth_la_LIBADD) \ - > $@ diff --git a/lib/loudmouth/lm-connection.c b/lib/loudmouth/lm-connection.c deleted file mode 100644 index 8bde9b281..000000000 --- a/lib/loudmouth/lm-connection.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * lm-connection.c - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "lm-connection.h" -#include "lm-message-handler.h" - -static gboolean -stanza_cb (WockyPorter *self, - WockyStanza *stanza, - gpointer user_data) -{ - LmMessageHandler *handler = (LmMessageHandler *) user_data; - LmHandlerResult result; - - result = handler->function (handler, handler->connection, stanza, - handler->user_data); - - if (result == LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS) - return FALSE; - else - return TRUE; -} - -typedef struct -{ - LmMessageHandler *handler; - LmMessageType type; - LmHandlerPriority priority; -} delayed_handler; - -void -lm_connection_register_message_handler (LmConnection *connection, - LmMessageHandler *handler, - LmMessageType type, - LmHandlerPriority priority) -{ - if (connection->porter == NULL) - { - /* Loudmouth lets you register handlers before the connection is - * connected. We can't do currently do that with Wocky so we store the - * handler and will register it once lm_connection_set_porter is called.*/ - delayed_handler *delayed; - - delayed = g_slice_new (delayed_handler); - delayed->handler = handler; - delayed->type = type; - delayed->priority = priority; - - connection->delayed_handlers = g_slist_prepend ( - connection->delayed_handlers, delayed); - return; - } - - /* Genuine Loudmouth lets you register the same handler once per message - * type, but this compatibility shim only lets you register each - * LmMessageHandler once. */ - g_assert (handler->handler_id == 0); - g_assert (handler->connection == NULL); - - handler->connection = connection; - - handler->handler_id = wocky_porter_register_handler_from_anyone ( - connection->porter, type, WOCKY_STANZA_SUB_TYPE_NONE, priority, stanza_cb, - handler, NULL); -} - -void -lm_connection_unregister_message_handler (LmConnection *connection, - LmMessageHandler *handler, - LmMessageType type) -{ - if (handler->handler_id == 0) - return; - - g_assert (handler->connection != NULL); - - wocky_porter_unregister_handler (handler->connection->porter, - handler->handler_id); - - handler->handler_id = 0; - handler->connection = NULL; -} - -void -lm_connection_unref (LmConnection *connection) -{ - GSList *l; - - for (l = connection->delayed_handlers; l != NULL; l = g_slist_next (l)) - { - delayed_handler *delayed = l->data; - - g_slice_free (delayed_handler, delayed); - } - - g_slist_free (connection->delayed_handlers); - connection->delayed_handlers = NULL; - - g_cancellable_cancel (connection->iq_reply_cancellable); - g_object_unref (connection->iq_reply_cancellable); - connection->iq_reply_cancellable = NULL; - - if (connection->porter != NULL) - { - g_object_unref (connection->porter); - connection->porter = NULL; - } - - g_free (connection); -} - -static void -iq_reply_cb (GObject *source, - GAsyncResult *res, - gpointer user_data) -{ - LmMessageHandler *handler = (LmMessageHandler *) user_data; - WockyStanza *reply; - GError *error = NULL; - - reply = wocky_porter_send_iq_finish (WOCKY_PORTER (source), res, &error); - if (reply == NULL) - { - g_debug ("send_iq_async failed: %s", error->message); - g_error_free (error); - goto out; - } - - handler->function (handler, handler->connection, reply, - handler->user_data); - - g_object_unref (reply); - -out: - lm_message_handler_unref (handler); -} - -gboolean -lm_connection_send_with_reply (LmConnection *connection, - LmMessage *message, - LmMessageHandler *handler, - GError **error) -{ - g_assert (connection != NULL); - g_assert (connection->porter != NULL); - - handler->connection = connection; - lm_message_handler_ref (handler); - - wocky_porter_send_iq_async (connection->porter, message, - connection->iq_reply_cancellable, iq_reply_cb, handler); - - return TRUE; -} - -LmConnection * -lm_connection_new (void) -{ - LmConnection *connection; - - connection = g_malloc (sizeof (LmConnection)); - connection->porter = NULL; - connection->delayed_handlers = NULL; - connection->iq_reply_cancellable = g_cancellable_new (); - - return connection; -} - -void -lm_connection_set_porter (LmConnection *connection, - WockyPorter *porter) -{ - GSList *l; - - g_assert (connection != NULL); - g_assert (connection->porter == NULL); - connection->porter = g_object_ref (porter); - - /* Now that we have a porter we can register the delayed handlers */ - for (l = connection->delayed_handlers; l != NULL; l = g_slist_next (l)) - { - delayed_handler *delayed = l->data; - - lm_connection_register_message_handler (connection, delayed->handler, - delayed->type, delayed->priority); - - g_slice_free (delayed_handler, delayed); - } - - g_slist_free (connection->delayed_handlers); - connection->delayed_handlers = NULL; -} diff --git a/lib/loudmouth/lm-connection.h b/lib/loudmouth/lm-connection.h deleted file mode 100644 index 83100b6a8..000000000 --- a/lib/loudmouth/lm-connection.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * lm-connection.h - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __LM_CONNECTION_H__ -#define __LM_CONNECTION_H__ - -#include <wocky/wocky-stanza.h> -#include <wocky/wocky-porter.h> - -#include "lm-types.h" -#include "lm-message.h" -#include "lm-message-handler.h" - -G_BEGIN_DECLS - -struct _LmConnection -{ - WockyPorter *porter; - GSList *delayed_handlers; - GCancellable *iq_reply_cancellable; -}; - -typedef guint LmHandlerPriority; - -LmConnection * lm_connection_new (void); - -void lm_connection_register_message_handler (LmConnection *connection, - LmMessageHandler *handler, - LmMessageType type, - LmHandlerPriority priority); - -void lm_connection_unregister_message_handler (LmConnection *connection, - LmMessageHandler *handler, - LmMessageType type); - -void lm_connection_unref (LmConnection *connection); - -gboolean lm_connection_send_with_reply (LmConnection *connection, - LmMessage *message, - LmMessageHandler *handler, - GError **error); - -/* Fake API. This is not part of loudmouth */ - -void lm_connection_set_porter (LmConnection *connection, - WockyPorter *porter); - -G_END_DECLS - -#endif /* #ifndef __LM_CONNECTION_H__ */ diff --git a/lib/loudmouth/lm-message-handler.c b/lib/loudmouth/lm-message-handler.c deleted file mode 100644 index f3c3988a7..000000000 --- a/lib/loudmouth/lm-message-handler.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * lm-message-handler.c - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "lm-message-handler.h" - -LmMessageHandler * -lm_message_handler_new (LmHandleMessageFunction function, - gpointer user_data, - GDestroyNotify notify) -{ - LmMessageHandler *handler = g_slice_new0 (LmMessageHandler); - handler->function = function; - handler->user_data = user_data; - handler->notify = notify; - handler->ref_count = 1; - - return handler; -} - -void -lm_message_handler_unref (LmMessageHandler *handler) -{ - handler->ref_count--; - - if (handler->ref_count == 0) - { - if (handler->notify != NULL) - handler->notify (handler->user_data); - g_slice_free (LmMessageHandler, handler); - } -} - -LmMessageHandler * -lm_message_handler_ref (LmMessageHandler *handler) -{ - handler->ref_count++; - - return handler; -} diff --git a/lib/loudmouth/lm-message-handler.h b/lib/loudmouth/lm-message-handler.h deleted file mode 100644 index 63feecc00..000000000 --- a/lib/loudmouth/lm-message-handler.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * lm-message-handler.h - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __LM_MESSAGE_HANDLER_H__ -#define __LM_MESSAGE_HANDLER_H__ - -#include "lm-types.h" -#include "lm-connection.h" -#include "lm-message.h" - -G_BEGIN_DECLS - -typedef enum { - LM_HANDLER_RESULT_REMOVE_MESSAGE, - LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS -} LmHandlerResult; - -typedef LmHandlerResult (*LmHandleMessageFunction) (LmMessageHandler *handler, - LmConnection *connection, - LmMessage *message, - gpointer user_data); - -struct _LmMessageHandler -{ - guint handler_id; - LmConnection *connection; - LmHandleMessageFunction function; - gpointer user_data; - GDestroyNotify notify; - guint ref_count; -}; - -#define LM_HANDLER_PRIORITY_LAST WOCKY_PORTER_HANDLER_PRIORITY_MIN -#define LM_HANDLER_PRIORITY_NORMAL WOCKY_PORTER_HANDLER_PRIORITY_NORMAL -#define LM_HANDLER_PRIORITY_FIRST WOCKY_PORTER_HANDLER_PRIORITY_MAX - -LmMessageHandler * lm_message_handler_new (LmHandleMessageFunction function, - gpointer user_data, - GDestroyNotify notify); - -void lm_message_handler_unref (LmMessageHandler *handler); - -LmMessageHandler * lm_message_handler_ref (LmMessageHandler *handler); - -G_END_DECLS - -#endif /* #ifndef __LM_MESSAGE_HANDLER_H__ */ diff --git a/lib/loudmouth/lm-message.c b/lib/loudmouth/lm-message.c deleted file mode 100644 index 7ebf76faa..000000000 --- a/lib/loudmouth/lm-message.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * lm-message.c - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "lm-message.h" - -LmMessage * -lm_message_new (const gchar *to, - LmMessageType type) -{ - return wocky_stanza_build (type, WOCKY_STANZA_SUB_TYPE_NONE, - NULL, to, NULL); -} - -LmMessage * -lm_message_new_with_sub_type (const gchar *to, - LmMessageType type, - LmMessageSubType sub_type) -{ - return wocky_stanza_build (type, sub_type, - NULL, to, NULL); -} - -LmMessageType -lm_message_get_type (LmMessage *message) -{ - WockyStanzaType type; - - wocky_stanza_get_type_info (message, &type, NULL); - return type; -} - -LmMessageSubType -lm_message_get_sub_type (LmMessage *message) -{ - WockyStanzaSubType sub_type; - - wocky_stanza_get_type_info (message, NULL, &sub_type); - return sub_type; -} - -WockyNode * -lm_message_get_node (LmMessage *message) -{ - return wocky_stanza_get_top_node (message); -} diff --git a/lib/loudmouth/lm-message.h b/lib/loudmouth/lm-message.h deleted file mode 100644 index db119c246..000000000 --- a/lib/loudmouth/lm-message.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * lm-message.h - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __LM_MESSAGE_H__ -#define __LM_MESSAGE_H__ - -#include <wocky/wocky-stanza.h> - -G_BEGIN_DECLS - -typedef WockyStanza LmMessage; - -typedef WockyStanzaType LmMessageType; - -#define LM_MESSAGE_TYPE_MESSAGE WOCKY_STANZA_TYPE_MESSAGE -#define LM_MESSAGE_TYPE_PRESENCE WOCKY_STANZA_TYPE_PRESENCE -#define LM_MESSAGE_TYPE_IQ WOCKY_STANZA_TYPE_IQ -#define LM_MESSAGE_TYPE_STREAM WOCKY_STANZA_TYPE_STREAM -#define LM_MESSAGE_TYPE_STREAM_ERROR WOCKY_STANZA_TYPE_STREAM_ERROR -#define LM_MESSAGE_TYPE_STREAM_FEATURES WOCKY_STANZA_TYPE_STREAM_FEATURES -#define LM_MESSAGE_TYPE_AUTH WOCKY_STANZA_TYPE_AUTH, -#define LM_MESSAGE_TYPE_CHALLENGE WOCKY_STANZA_TYPE_CHALLENGE -#define LM_MESSAGE_TYPE_RESPONSE WOCKY_STANZA_TYPE_RESPONSE -#define LM_MESSAGE_TYPE_SUCCESS WOCKY_STANZA_TYPE_SUCCESS -#define LM_MESSAGE_TYPE_FAILURE WOCKY_STANZA_TYPE_FAILURE -/* -#define LM_MESSAGE_TYPE_PROCEED -#define LM_MESSAGE_TYPE_STARTTLS -*/ -#define LM_MESSAGE_TYPE_UNKNOWN WOCKY_STANZA_TYPE_UNKNOWN - -typedef WockyStanzaSubType LmMessageSubType; - -#define LM_MESSAGE_SUB_TYPE_NOT_SET WOCKY_STANZA_SUB_TYPE_NONE -#define LM_MESSAGE_SUB_TYPE_AVAILABLE WOCKY_STANZA_SUB_TYPE_AVAILABLE -#define LM_MESSAGE_SUB_TYPE_NORMAL WOCKY_STANZA_SUB_TYPE_NORMAL -#define LM_MESSAGE_SUB_TYPE_CHAT WOCKY_STANZA_SUB_TYPE_CHAT -#define LM_MESSAGE_SUB_TYPE_GROUPCHAT WOCKY_STANZA_SUB_TYPE_GROUPCHAT -#define LM_MESSAGE_SUB_TYPE_HEADLINE WOCKY_STANZA_SUB_TYPE_HEADLINE -#define LM_MESSAGE_SUB_TYPE_UNAVAILABLE WOCKY_STANZA_SUB_TYPE_UNAVAILABLE -#define LM_MESSAGE_SUB_TYPE_PROBE WOCKY_STANZA_SUB_TYPE_PROBE -#define LM_MESSAGE_SUB_TYPE_SUBSCRIBE WOCKY_STANZA_SUB_TYPE_SUBSCRIBE -#define LM_MESSAGE_SUB_TYPE_UNSUBSCRIBE WOCKY_STANZA_SUB_TYPE_UNSUBSCRIBE -#define LM_MESSAGE_SUB_TYPE_SUBSCRIBED WOCKY_STANZA_SUB_TYPE_SUBSCRIBED -#define LM_MESSAGE_SUB_TYPE_UNSUBSCRIBED WOCKY_STANZA_SUB_TYPE_UNSUBSCRIBED -#define LM_MESSAGE_SUB_TYPE_GET WOCKY_STANZA_SUB_TYPE_GET -#define LM_MESSAGE_SUB_TYPE_SET WOCKY_STANZA_SUB_TYPE_SET -#define LM_MESSAGE_SUB_TYPE_RESULT WOCKY_STANZA_SUB_TYPE_RESULT -#define LM_MESSAGE_SUB_TYPE_ERROR WOCKY_STANZA_SUB_TYPE_ERROR - -LmMessage * lm_message_new (const gchar *to, - LmMessageType type); - -LmMessage * lm_message_new_with_sub_type (const gchar *to, - LmMessageType type, - LmMessageSubType sub_type); - - -LmMessageType lm_message_get_type (LmMessage *message); -LmMessageSubType lm_message_get_sub_type (LmMessage *message); - -WockyNode * lm_message_get_node (LmMessage *message); - -G_END_DECLS - -#endif /* #ifndef __LM_MESSAGE_H__ */ diff --git a/lib/loudmouth/lm-types.h b/lib/loudmouth/lm-types.h deleted file mode 100644 index 077ccbc33..000000000 --- a/lib/loudmouth/lm-types.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __LM_TYPES_H__ -#define __LM_TYPES_H__ - -#include <wocky/wocky-porter.h> - -G_BEGIN_DECLS - -typedef struct _LmMessageHandler LmMessageHandler; -typedef struct _LmConnection LmConnection; - -G_END_DECLS - -#endif /* #ifndef __LM_TYPES_H__ */ diff --git a/lib/loudmouth/loudmouth.h b/lib/loudmouth/loudmouth.h deleted file mode 100644 index 6fac606a0..000000000 --- a/lib/loudmouth/loudmouth.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * loudmouth.h - Loudmouth-Wocky compatibility layer - * Copyright (C) 2009 Collabora Ltd. - * @author Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __LOUDMOUTH_H__ -#define __LOUDMOUTH_H__ - -#include <loudmouth/lm-connection.h> -#include <loudmouth/lm-message.h> -#include <loudmouth/lm-message-handler.h> - -#endif /* #ifndef __LOUDMOUTH_H__ */ |