telepathygabble/inc/gabble-media-channel.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2  * gabble-media-channel.h - Header for GabbleMediaChannel
       
     3  * Copyright (C) 2006 Collabora Ltd.
       
     4  * Portions 
       
     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
       
     8  * License as published by the Free Software Foundation; either
       
     9  * version 2.1 of the License, or (at your option) any later version.
       
    10  *
       
    11  * This library is distributed in the hope that it will be useful,
       
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    14  * Lesser General Public License for more details.
       
    15  *
       
    16  * You should have received a copy of the GNU Lesser General Public
       
    17  * License along with this library; if not, write to the Free Software
       
    18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    19  */
       
    20 
       
    21 #ifndef __GABBLE_MEDIA_CHANNEL_H__
       
    22 #define __GABBLE_MEDIA_CHANNEL_H__
       
    23 
       
    24 #include <glib-object.h>
       
    25 
       
    26 #include "gabble-media-session.h"
       
    27 #include "group-mixin.h"
       
    28 #include "handles.h"
       
    29 #include "gabble-presence.h"
       
    30 
       
    31 G_BEGIN_DECLS
       
    32 
       
    33 typedef struct _GabbleMediaChannel GabbleMediaChannel;
       
    34 typedef struct _GabbleMediaChannelClass GabbleMediaChannelClass;
       
    35 
       
    36 struct _GabbleMediaChannelClass {
       
    37     GObjectClass parent_class;
       
    38 
       
    39     GabbleGroupMixinClass group_class;
       
    40 };
       
    41 
       
    42 struct _GabbleMediaChannel {
       
    43     GObject parent;
       
    44 
       
    45     GabbleGroupMixin group;
       
    46 
       
    47     gpointer priv;
       
    48 };
       
    49 
       
    50 IMPORT_C GType gabble_media_channel_get_type(void);
       
    51 
       
    52 /* TYPE MACROS */
       
    53 #define GABBLE_TYPE_MEDIA_CHANNEL \
       
    54   (gabble_media_channel_get_type())
       
    55 #define GABBLE_MEDIA_CHANNEL(obj) \
       
    56   (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_MEDIA_CHANNEL, GabbleMediaChannel))
       
    57 #define GABBLE_MEDIA_CHANNEL_CLASS(klass) \
       
    58   (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_MEDIA_CHANNEL, GabbleMediaChannelClass))
       
    59 #define GABBLE_IS_MEDIA_CHANNEL(obj) \
       
    60   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_MEDIA_CHANNEL))
       
    61 #define GABBLE_IS_MEDIA_CHANNEL_CLASS(klass) \
       
    62   (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_MEDIA_CHANNEL))
       
    63 #define GABBLE_MEDIA_CHANNEL_GET_CLASS(obj) \
       
    64   (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_MEDIA_CHANNEL, GabbleMediaChannelClass))
       
    65 
       
    66 gboolean
       
    67 _gabble_media_channel_add_member (GObject *obj,
       
    68                                   GabbleHandle handle,
       
    69                                   const gchar *message,
       
    70                                   GError **error);
       
    71 
       
    72 gboolean
       
    73 gabble_media_channel_add_members (GabbleMediaChannel *self,
       
    74                                   const GArray *contacts,
       
    75                                   const gchar *message,
       
    76                                   GError **error);
       
    77 
       
    78 gboolean
       
    79 gabble_media_channel_close (GabbleMediaChannel *self,
       
    80                             GError **error);
       
    81 
       
    82 gboolean
       
    83 gabble_media_channel_get_all_members (GabbleMediaChannel *self,
       
    84                                       GArray **ret,
       
    85                                       GArray **ret1,
       
    86                                       GArray **ret2,
       
    87                                       GError **error);
       
    88 
       
    89 gboolean
       
    90 gabble_media_channel_get_channel_type (GabbleMediaChannel *self,
       
    91                                        gchar **ret,
       
    92                                        GError **error);
       
    93 
       
    94 gboolean
       
    95 gabble_media_channel_get_group_flags (GabbleMediaChannel *self,
       
    96                                       guint *ret,
       
    97                                       GError **error);
       
    98 
       
    99 gboolean
       
   100 gabble_media_channel_get_handle (GabbleMediaChannel *self,
       
   101                                  guint *ret,
       
   102                                  guint *ret1,
       
   103                                  GError **error);
       
   104 
       
   105 gboolean
       
   106 gabble_media_channel_get_handle_owners (GabbleMediaChannel *self,
       
   107                                         const GArray *handles,
       
   108                                         GArray **ret,
       
   109                                         GError **error);
       
   110 
       
   111 gboolean
       
   112 gabble_media_channel_get_interfaces (GabbleMediaChannel *self,
       
   113                                      gchar ***ret,
       
   114                                      GError **error);
       
   115 
       
   116 gboolean
       
   117 gabble_media_channel_get_local_pending_members (GabbleMediaChannel *self,
       
   118                                                 GArray **ret,
       
   119                                                 GError **error);
       
   120 
       
   121 gboolean
       
   122 gabble_media_channel_get_members (GabbleMediaChannel *self,
       
   123                                   GArray **ret,
       
   124                                   GError **error);
       
   125 
       
   126 gboolean
       
   127 gabble_media_channel_get_remote_pending_members (GabbleMediaChannel *self,
       
   128                                                  GArray **ret,
       
   129                                                  GError **error);
       
   130 
       
   131 gboolean
       
   132 gabble_media_channel_get_self_handle (GabbleMediaChannel *self,
       
   133                                       guint *ret,
       
   134                                       GError **error);
       
   135 
       
   136 gboolean
       
   137 gabble_media_channel_get_session_handlers (GabbleMediaChannel *self,
       
   138                                            GPtrArray **ret,
       
   139                                            GError **error);
       
   140 
       
   141 gboolean
       
   142 gabble_media_channel_list_streams (GabbleMediaChannel *self,
       
   143                                    GPtrArray **ret,
       
   144                                    GError **error);
       
   145 
       
   146 gboolean
       
   147 gabble_media_channel_remove_members (GabbleMediaChannel *self,
       
   148                                      const GArray *contacts,
       
   149                                      const gchar *message,
       
   150                                      GError **error);
       
   151 
       
   152 gboolean
       
   153 gabble_media_channel_remove_streams (GabbleMediaChannel *self,
       
   154                                      const GArray *streams,
       
   155                                      GError **error);
       
   156 
       
   157 gboolean
       
   158 gabble_media_channel_request_stream_direction (GabbleMediaChannel *self,
       
   159                                                guint stream_id,
       
   160                                                guint stream_direction,
       
   161                                                GError **error);
       
   162 
       
   163 gboolean
       
   164 gabble_media_channel_request_streams (GabbleMediaChannel *self,
       
   165                                       guint contact_handle,
       
   166                                       const GArray *types,
       
   167                                       GPtrArray **ret,
       
   168                                       GError **error);
       
   169 
       
   170 gboolean
       
   171 _gabble_media_channel_dispatch_session_action (GabbleMediaChannel *chan,
       
   172                                                GabbleHandle peer,
       
   173                                                const gchar *peer_resource,
       
   174                                                const gchar *sid,
       
   175                                                LmMessage *message,
       
   176                                                LmMessageNode *session_node,
       
   177                                                const gchar *action,
       
   178                                                GError **error);
       
   179 
       
   180 void
       
   181 _gabble_media_channel_stream_state (GabbleMediaChannel *chan,
       
   182                                     guint state);
       
   183 
       
   184 guint
       
   185 _gabble_media_channel_get_stream_id (GabbleMediaChannel *chan);
       
   186 
       
   187 GabblePresenceCapabilities
       
   188 _gabble_media_channel_typeflags_to_caps (TpChannelMediaCapabilities flags);
       
   189 
       
   190 //moved definition to .c file
       
   191 GabblePresenceCapabilities
       
   192 _gabble_media_channel_typeflags_to_caps_tmp (guint flags);
       
   193 
       
   194 TpChannelMediaCapabilities
       
   195 _gabble_media_channel_caps_to_typeflags (GabblePresenceCapabilities caps);
       
   196 
       
   197 //moved definition to .c file
       
   198 guint
       
   199 _gabble_media_channel_caps_to_typeflags_tmp (GabblePresenceCapabilities caps);
       
   200 
       
   201 G_END_DECLS
       
   202 
       
   203 #endif /* #ifndef __GABBLE_MEDIA_CHANNEL_H__*/