telepathygabble/inc/gabble-muc-channel.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2  * gabble-muc-channel.h - Header for GabbleMucChannel
       
     3  * Copyright (C) 2006 Collabora Ltd.
       
     4  * 
       
     5  *   @author Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk>
       
     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 __GABBLE_MUC_CHANNEL_H__
       
    23 #define __GABBLE_MUC_CHANNEL_H__
       
    24 
       
    25 #include <glib-object.h>
       
    26 
       
    27 #include "group-mixin.h"
       
    28 #include "properties-mixin.h"
       
    29 #include "text-mixin.h"
       
    30 #include "handles.h"
       
    31 
       
    32 G_BEGIN_DECLS
       
    33 
       
    34 typedef struct _GabbleMucChannel GabbleMucChannel;
       
    35 typedef struct _GabbleMucChannelClass GabbleMucChannelClass;
       
    36 
       
    37 struct _GabbleMucChannelClass {
       
    38     GObjectClass parent_class;
       
    39 
       
    40     GabbleGroupMixinClass group_class;
       
    41     GabblePropertiesMixinClass properties_class;
       
    42     GabbleTextMixinClass text_class;
       
    43 };
       
    44 
       
    45 struct _GabbleMucChannel {
       
    46     GObject parent;
       
    47 
       
    48     GabbleGroupMixin group;
       
    49     GabblePropertiesMixin properties;
       
    50     GabbleTextMixin text;
       
    51 
       
    52     gpointer priv;
       
    53 };
       
    54 
       
    55 IMPORT_C GType gabble_muc_channel_get_type(void);
       
    56 
       
    57 /* TYPE MACROS */
       
    58 #define GABBLE_TYPE_MUC_CHANNEL \
       
    59   (gabble_muc_channel_get_type())
       
    60 #define GABBLE_MUC_CHANNEL(obj) \
       
    61   (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_MUC_CHANNEL, GabbleMucChannel))
       
    62 #define GABBLE_MUC_CHANNEL_CLASS(klass) \
       
    63   (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_MUC_CHANNEL, GabbleMucChannelClass))
       
    64 #define GABBLE_IS_MUC_CHANNEL(obj) \
       
    65   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_MUC_CHANNEL))
       
    66 #define GABBLE_IS_MUC_CHANNEL_CLASS(klass) \
       
    67   (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_MUC_CHANNEL))
       
    68 #define GABBLE_MUC_CHANNEL_GET_CLASS(obj) \
       
    69   (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_MUC_CHANNEL, GabbleMucChannelClass))
       
    70 
       
    71 gboolean _gabble_muc_channel_is_ready (GabbleMucChannel *chan);
       
    72 void _gabble_muc_channel_presence_error (GabbleMucChannel *chan, const gchar *jid, LmMessageNode *pres_node);
       
    73 void _gabble_muc_channel_member_presence_updated (GabbleMucChannel *chan, GabbleHandle handle, LmMessage *message, LmMessageNode *x_node);
       
    74 gboolean _gabble_muc_channel_receive (GabbleMucChannel *chan, TpChannelTextMessageType msg_type, TpHandleType handle_type, GabbleHandle sender, time_t timestamp, const gchar *text, LmMessage *msg);
       
    75 
       
    76 void _gabble_muc_channel_handle_invited (GabbleMucChannel *chan, GabbleHandle inviter, const gchar *message);
       
    77 
       
    78 gboolean
       
    79 gabble_muc_channel_acknowledge_pending_messages (GabbleMucChannel *self,
       
    80                                                  const GArray *ids,
       
    81                                                  GError **error);
       
    82 
       
    83 gboolean
       
    84 gabble_muc_channel_add_members (GabbleMucChannel *self,
       
    85                                 const GArray *contacts,
       
    86                                 const gchar *message,
       
    87                                 GError **error);
       
    88 
       
    89 gboolean
       
    90 gabble_muc_channel_close (GabbleMucChannel *self,
       
    91                           GError **error);
       
    92 
       
    93 gboolean
       
    94 gabble_muc_channel_get_all_members (GabbleMucChannel *self,
       
    95                                     GArray **ret,
       
    96                                     GArray **ret1,
       
    97                                     GArray **ret2,
       
    98                                     GError **error);
       
    99 
       
   100 gboolean
       
   101 gabble_muc_channel_get_channel_type (GabbleMucChannel *self,
       
   102                                      gchar **ret,
       
   103                                      GError **error);
       
   104 
       
   105 gboolean
       
   106 gabble_muc_channel_get_group_flags (GabbleMucChannel *self,
       
   107                                     guint *ret,
       
   108                                     GError **error);
       
   109 
       
   110 gboolean
       
   111 gabble_muc_channel_get_handle (GabbleMucChannel *self,
       
   112                                guint *ret,
       
   113                                guint *ret1,
       
   114                                GError **error);
       
   115 
       
   116 gboolean
       
   117 gabble_muc_channel_get_handle_owners (GabbleMucChannel *self,
       
   118                                       const GArray *handles,
       
   119                                       GArray **ret,
       
   120                                       GError **error);
       
   121 
       
   122 gboolean
       
   123 gabble_muc_channel_get_interfaces (GabbleMucChannel *self,
       
   124                                    gchar ***ret,
       
   125                                    GError **error);
       
   126 
       
   127 gboolean
       
   128 gabble_muc_channel_get_local_pending_members (GabbleMucChannel *self,
       
   129                                               GArray **ret,
       
   130                                               GError **error);
       
   131 
       
   132 gboolean
       
   133 gabble_muc_channel_get_members (GabbleMucChannel *self,
       
   134                                 GArray **ret,
       
   135                                 GError **error);
       
   136 
       
   137 gboolean
       
   138 gabble_muc_channel_get_message_types (GabbleMucChannel *self,
       
   139                                       GArray **ret,
       
   140                                       GError **error);
       
   141 
       
   142 gboolean
       
   143 gabble_muc_channel_get_password_flags (GabbleMucChannel *self,
       
   144                                        guint *ret,
       
   145                                        GError **error);
       
   146 
       
   147 gboolean
       
   148 gabble_muc_channel_get_properties (GabbleMucChannel *self,
       
   149                                    const GArray *properties,
       
   150                                    GPtrArray **ret,
       
   151                                    GError **error);
       
   152 
       
   153 gboolean
       
   154 gabble_muc_channel_get_remote_pending_members (GabbleMucChannel *self,
       
   155                                                GArray **ret,
       
   156                                                GError **error);
       
   157 
       
   158 gboolean
       
   159 gabble_muc_channel_get_self_handle (GabbleMucChannel *self,
       
   160                                     guint *ret,
       
   161                                     GError **error);
       
   162 
       
   163 gboolean
       
   164 gabble_muc_channel_list_pending_messages (GabbleMucChannel *self,
       
   165                                           gboolean clear,
       
   166                                           GPtrArray **ret,
       
   167                                           GError **error);
       
   168 
       
   169 gboolean
       
   170 gabble_muc_channel_list_properties (GabbleMucChannel *self,
       
   171                                     GPtrArray **ret,
       
   172                                     GError **error);
       
   173 
       
   174 void
       
   175 gabble_muc_channel_provide_password (GabbleMucChannel *self,
       
   176                                      const gchar *password,
       
   177                                      DBusGMethodInvocation *context);
       
   178 
       
   179 gboolean
       
   180 gabble_muc_channel_remove_members (GabbleMucChannel *self,
       
   181                                    const GArray *contacts,
       
   182                                    const gchar *message,
       
   183                                    GError **error);
       
   184 
       
   185 gboolean
       
   186 gabble_muc_channel_send (GabbleMucChannel *self,
       
   187                          guint type,
       
   188                          const gchar *text,
       
   189                          GError **error);
       
   190 
       
   191 void
       
   192 gabble_muc_channel_set_properties (GabbleMucChannel *self,
       
   193                                    const GPtrArray *properties,
       
   194                                    DBusGMethodInvocation *context);
       
   195 
       
   196 
       
   197 G_END_DECLS
       
   198 
       
   199 #endif /* #ifndef __GABBLE_MUC_CHANNEL_H__*/