1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*
* This file is part of telepathy-idle
*
* Copyright (C) 2006-2007 Collabora Limited
* Copyright (C) 2006-2007 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
* version 2.1 as published by the Free Software Foundation.
*
* 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 __IDLE_MUC_CHANNEL_H__
#define __IDLE_MUC_CHANNEL_H__
#include <glib-object.h>
#include <gio/gio.h>
#include <telepathy-glib/base-channel.h>
#include <telepathy-glib/enums.h>
#include <telepathy-glib/group-mixin.h>
#include <telepathy-glib/handle.h>
#include <telepathy-glib/message-mixin.h>
#include <telepathy-glib/dbus-properties-mixin.h>
#include "idle-connection.h"
G_BEGIN_DECLS
typedef struct _IdleMUCChannel IdleMUCChannel;
typedef struct _IdleMUCChannelClass IdleMUCChannelClass;
typedef struct _IdleMUCChannelPrivate IdleMUCChannelPrivate;
struct _IdleMUCChannelClass {
TpBaseChannelClass parent_class;
TpGroupMixinClass group_class;
};
struct _IdleMUCChannel {
TpBaseChannel parent;
TpGroupMixin group;
TpMessageMixin message_mixin;
IdleMUCChannelPrivate *priv;
};
typedef enum {
MUC_CHANNEL_JOIN_ERROR_NONE,
MUC_CHANNEL_JOIN_ERROR_BANNED,
MUC_CHANNEL_JOIN_ERROR_INVITE_ONLY,
MUC_CHANNEL_JOIN_ERROR_FULL
} IdleMUCChannelJoinError;
GType idle_muc_channel_get_type(void);
/* TYPE MACROS */
#define IDLE_TYPE_MUC_CHANNEL \
(idle_muc_channel_get_type())
#define IDLE_MUC_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), IDLE_TYPE_MUC_CHANNEL, IdleMUCChannel))
#define IDLE_MUC_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), IDLE_TYPE_MUC_CHANNEL, IdleMUCChannelClass))
#define IDLE_IS_MUC_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), IDLE_TYPE_MUC_CHANNEL))
#define IDLE_IS_MUC_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), IDLE_TYPE_MUC_CHANNEL))
#define IDLE_MUC_CHANNEL_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), IDLE_TYPE_MUC_CHANNEL, IdleMUCChannelClass))
IdleMUCChannel *idle_muc_channel_new(IdleConnection *conn, TpHandle handle, TpHandle initiator, gboolean requested);
void idle_muc_channel_badchannelkey(IdleMUCChannel *chan);
void idle_muc_channel_invited(IdleMUCChannel *chan, TpHandle inviter);
gboolean idle_muc_channel_is_modechar(char c);
gboolean idle_muc_channel_is_typechar(char c);
void idle_muc_channel_join(IdleMUCChannel *chan, TpHandle joiner);
void idle_muc_channel_join_attempt(IdleMUCChannel *chan);
void idle_muc_channel_join_error(IdleMUCChannel *chan, IdleMUCChannelJoinError err);
void idle_muc_channel_kick(IdleMUCChannel *chan, TpHandle kicked, TpHandle kicker, const gchar *message);
void idle_muc_channel_mode(IdleMUCChannel *chan, GValueArray *args);
void idle_muc_channel_namereply(IdleMUCChannel *chan, GValueArray *args);
void idle_muc_channel_namereply_end(IdleMUCChannel *chan);
void idle_muc_channel_part(IdleMUCChannel *chan, TpHandle leaver, const gchar *message);
void idle_muc_channel_quit(IdleMUCChannel *chan, TpHandle handle, const gchar *message);
gboolean idle_muc_channel_receive(IdleMUCChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *msg);
void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle new_handle);
void idle_muc_channel_topic(IdleMUCChannel *chan, const gchar *topic);
void idle_muc_channel_topic_full(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp, const gchar *topic);
void idle_muc_channel_topic_touch(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp);
void idle_muc_channel_topic_unset(IdleMUCChannel *chan);
gboolean idle_muc_channel_is_ready(IdleMUCChannel *chan);
G_END_DECLS
#endif /* #ifndef __IDLE_MUC_CHANNEL_H__*/
|