telepathygabble/inc/tp-channel-factory-iface.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2  * tp-channel-factory-iface.h - Headers for Telepathy Channel Factory interface
       
     3  *
       
     4  * Copyright (C) 2006 Collabora Ltd.
       
     5  * 
       
     6  *
       
     7  * This library is free software; you can redistribute it and/or
       
     8  * modify it under the terms of the GNU Lesser General Public
       
     9  * License as published by the Free Software Foundation; either
       
    10  * version 2.1 of the License, or (at your option) any later version.
       
    11  *
       
    12  * This library is distributed in the hope that it will be useful,
       
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    15  * Lesser General Public License for more details.
       
    16  *
       
    17  * You should have received a copy of the GNU Lesser General Public
       
    18  * License along with this library; if not, write to the Free Software
       
    19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    20  */
       
    21 
       
    22 #ifndef __TP_CHANNEL_FACTORY_IFACE_H__
       
    23 #define __TP_CHANNEL_FACTORY_IFACE_H__
       
    24 
       
    25 #include <glib-object.h>
       
    26 
       
    27 #include "telepathy-constants.h"
       
    28 #include "tp-channel-iface.h"
       
    29 
       
    30 G_BEGIN_DECLS
       
    31 
       
    32 #define TP_TYPE_CHANNEL_FACTORY_IFACE tp_channel_factory_iface_get_type()
       
    33 
       
    34 #define TP_CHANNEL_FACTORY_IFACE(obj) \
       
    35   (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
       
    36   TP_TYPE_CHANNEL_FACTORY_IFACE, TpChannelFactoryIface))
       
    37 
       
    38 #define TP_CHANNEL_FACTORY_IFACE_CLASS(klass) \
       
    39   (G_TYPE_CHECK_CLASS_CAST ((klass), \
       
    40   TP_TYPE_CHANNEL_FACTORY_IFACE, TpChannelFactoryIfaceClass))
       
    41 
       
    42 #define TP_IS_CHANNEL_FACTORY_IFACE(obj) \
       
    43   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
       
    44   TP_TYPE_CHANNEL_FACTORY_IFACE))
       
    45 
       
    46 #define TP_IS_CHANNEL_FACTORY_IFACE_CLASS(klass) \
       
    47   (G_TYPE_CHECK_CLASS_TYPE ((klass), \
       
    48   TP_TYPE_CHANNEL_FACTORY_IFACE))
       
    49 
       
    50 #define TP_CHANNEL_FACTORY_IFACE_GET_CLASS(obj) \
       
    51   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
       
    52   TP_TYPE_CHANNEL_FACTORY_IFACE, TpChannelFactoryIfaceClass))
       
    53 
       
    54 typedef struct _TpChannelFactoryIface TpChannelFactoryIface;
       
    55 typedef struct _TpChannelFactoryIfaceClass TpChannelFactoryIfaceClass;
       
    56 
       
    57 typedef enum {
       
    58   TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED = 0,
       
    59   TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_AVAILABLE,
       
    60   TP_CHANNEL_FACTORY_REQUEST_STATUS_INVALID_HANDLE,
       
    61   TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR,
       
    62   TP_CHANNEL_FACTORY_REQUEST_STATUS_DONE,
       
    63   TP_CHANNEL_FACTORY_REQUEST_STATUS_QUEUED
       
    64 } TpChannelFactoryRequestStatus;
       
    65 
       
    66 struct _TpChannelFactoryIfaceClass {
       
    67   GTypeInterface parent_class;
       
    68 
       
    69   void (*close_all) (TpChannelFactoryIface *);
       
    70   void (*connecting) (TpChannelFactoryIface *);
       
    71   void (*connected) (TpChannelFactoryIface *);
       
    72   void (*disconnected) (TpChannelFactoryIface *);
       
    73   void (*foreach) (TpChannelFactoryIface *, TpChannelFunc func, gpointer data);
       
    74   TpChannelFactoryRequestStatus (*request) (TpChannelFactoryIface *, const gchar *chan_type, TpHandleType handle_type, guint handle, TpChannelIface **ret, GError **error);
       
    75 };
       
    76 
       
    77 GType tp_channel_factory_iface_get_type (void);
       
    78 
       
    79 void tp_channel_factory_iface_close_all (TpChannelFactoryIface *);
       
    80 void tp_channel_factory_iface_connecting (TpChannelFactoryIface *);
       
    81 void tp_channel_factory_iface_connected (TpChannelFactoryIface *);
       
    82 void tp_channel_factory_iface_disconnected (TpChannelFactoryIface *);
       
    83 void tp_channel_factory_iface_foreach (TpChannelFactoryIface *, TpChannelFunc func, gpointer data);
       
    84 TpChannelFactoryRequestStatus tp_channel_factory_iface_request (TpChannelFactoryIface *, const gchar *chan_type, TpHandleType handle_type, guint handle, TpChannelIface **ret, GError **error);
       
    85 
       
    86 G_END_DECLS
       
    87 
       
    88 #endif /* __TP_CHANNEL_FACTORY_IFACE_H__ */