diff options
Diffstat (limited to 'generate/src/gabble-im-channel.c')
-rw-r--r-- | generate/src/gabble-im-channel.c | 326 |
1 files changed, 0 insertions, 326 deletions
diff --git a/generate/src/gabble-im-channel.c b/generate/src/gabble-im-channel.c deleted file mode 100644 index 3e066aa37..000000000 --- a/generate/src/gabble-im-channel.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * gabble-im-channel.c - Source for GabbleIMChannel - * Copyright (C) 2005 Collabora Ltd. - * Copyright (C) 2005 Nokia Corporation - * - * 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 <dbus/dbus-glib.h> -#include <stdio.h> -#include <stdlib.h> - -#include "gabble-im-channel.h" -#include "gabble-im-channel-signals-marshal.h" - -#include "gabble-im-channel-glue.h" - -G_DEFINE_TYPE(GabbleIMChannel, gabble_im_channel, G_TYPE_OBJECT) - -/* signal enum */ -enum -{ - CLOSED, - LOST_MESSAGE, - RECEIVED, - SEND_ERROR, - SENT, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = {0}; - -/* private structure */ -typedef struct _GabbleIMChannelPrivate GabbleIMChannelPrivate; - -struct _GabbleIMChannelPrivate -{ - gboolean dispose_has_run; -}; - -#define GABBLE_IM_CHANNEL_GET_PRIVATE(obj) \ - ((GabbleIMChannelPrivate *)obj->priv) - -static void -gabble_im_channel_init (GabbleIMChannel *self) -{ - GabbleIMChannelPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (self, - GABBLE_TYPE_IM_CHANNEL, GabbleIMChannelPrivate); - - self->priv = priv; - - /* allocate any data required by the object here */ -} - -static void gabble_im_channel_dispose (GObject *object); -static void gabble_im_channel_finalize (GObject *object); - -static void -gabble_im_channel_class_init (GabbleIMChannelClass *gabble_im_channel_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (gabble_im_channel_class); - - g_type_class_add_private (gabble_im_channel_class, sizeof (GabbleIMChannelPrivate)); - - object_class->dispose = gabble_im_channel_dispose; - object_class->finalize = gabble_im_channel_finalize; - - signals[CLOSED] = - g_signal_new ("closed", - G_OBJECT_CLASS_TYPE (gabble_im_channel_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - signals[LOST_MESSAGE] = - g_signal_new ("lost-message", - G_OBJECT_CLASS_TYPE (gabble_im_channel_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - signals[RECEIVED] = - g_signal_new ("received", - G_OBJECT_CLASS_TYPE (gabble_im_channel_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, - 0, - NULL, NULL, - gabble_im_channel_marshal_VOID__UINT_UINT_UINT_UINT_UINT_STRING, - G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING); - - signals[SEND_ERROR] = - g_signal_new ("send-error", - G_OBJECT_CLASS_TYPE (gabble_im_channel_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, - 0, - NULL, NULL, - gabble_im_channel_marshal_VOID__UINT_UINT_UINT_STRING, - G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING); - - signals[SENT] = - g_signal_new ("sent", - G_OBJECT_CLASS_TYPE (gabble_im_channel_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, - 0, - NULL, NULL, - gabble_im_channel_marshal_VOID__UINT_UINT_STRING, - G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING); - - dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (gabble_im_channel_class), &dbus_glib_gabble_im_channel_object_info); -} - -void -gabble_im_channel_dispose (GObject *object) -{ - GabbleIMChannel *self = GABBLE_IM_CHANNEL (object); - GabbleIMChannelPrivate *priv = GABBLE_IM_CHANNEL_GET_PRIVATE (self); - - if (priv->dispose_has_run) - return; - - priv->dispose_has_run = TRUE; - - /* release any references held by the object here */ - - if (G_OBJECT_CLASS (gabble_im_channel_parent_class)->dispose) - G_OBJECT_CLASS (gabble_im_channel_parent_class)->dispose (object); -} - -void -gabble_im_channel_finalize (GObject *object) -{ - GabbleIMChannel *self = GABBLE_IM_CHANNEL (object); - GabbleIMChannelPrivate *priv = GABBLE_IM_CHANNEL_GET_PRIVATE (self); - - /* free any data held directly by the object here */ - - G_OBJECT_CLASS (gabble_im_channel_parent_class)->finalize (object); -} - - - -/** - * gabble_im_channel_acknowledge_pending_messages - * - * Implements D-Bus method AcknowledgePendingMessages - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_acknowledge_pending_messages (GabbleIMChannel *self, - const GArray *ids, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_close - * - * Implements D-Bus method Close - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_close (GabbleIMChannel *self, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_get_channel_type - * - * Implements D-Bus method GetChannelType - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_get_channel_type (GabbleIMChannel *self, - gchar **ret, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_get_handle - * - * Implements D-Bus method GetHandle - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_get_handle (GabbleIMChannel *self, - guint *ret, - guint *ret1, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_get_interfaces - * - * Implements D-Bus method GetInterfaces - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_get_interfaces (GabbleIMChannel *self, - gchar ***ret, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_get_message_types - * - * Implements D-Bus method GetMessageTypes - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_get_message_types (GabbleIMChannel *self, - GArray **ret, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_list_pending_messages - * - * Implements D-Bus method ListPendingMessages - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_list_pending_messages (GabbleIMChannel *self, - gboolean clear, - GPtrArray **ret, - GError **error) -{ - return TRUE; -} - - -/** - * gabble_im_channel_send - * - * Implements D-Bus method Send - * on interface org.freedesktop.Telepathy.Channel.Type.Text - * - * @error: Used to return a pointer to a GError detailing any error - * that occurred, D-Bus will throw the error only if this - * function returns FALSE. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -gboolean -gabble_im_channel_send (GabbleIMChannel *self, - guint type, - const gchar *text, - GError **error) -{ - return TRUE; -} - |