libpurple/protocol.c

Sat, 07 Sep 2013 14:50:37 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 07 Sep 2013 14:50:37 +0530
branch
soc.2013.gobjectification.plugins
changeset 36694
7b1fefd1e2ee
parent 36687
7a83a1a657e3
child 36709
6e915db4db35
permissions
-rw-r--r--

Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
These functions can be used to return protocol-specific derived types.
'state' from PurpleWhiteboard has been removed since only yahoo uses it. Yahoo's whiteboard subclass can handle this.

36560
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
1 /*
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
2 * purple
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
3 *
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
4 * Purple is the legal property of its developers, whose names are too numerous
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
6 * source distribution.
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
7 *
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
11 * (at your option) any later version.
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
12 *
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
16 * GNU General Public License for more details.
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
17 *
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
21 *
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
22 */
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
23 #include "dbus-maybe.h"
36560
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
24 #include "protocol.h"
59acaa1605f4 Added protocol.c and protocols.h
Ankit Vani <a@nevitus.org>
parents:
diff changeset
25
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
26 static GObjectClass *parent_class;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
27
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
28 /**************************************************************************
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
29 * Protocol Class API
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
30 **************************************************************************/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
31
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
32 const char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
33 purple_protocol_get_id(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
34 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
35 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
36
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
37 return protocol->id;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
38 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
39
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
40 const char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
41 purple_protocol_get_name(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
42 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
43 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
44
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
45 return protocol->name;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
46 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
47
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
48 PurpleProtocolOptions
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
49 purple_protocol_get_options(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
50 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
51 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), 0);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
52
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
53 return protocol->options;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
54 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
55
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
56 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
57 purple_protocol_get_user_splits(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
58 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
59 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
60
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
61 return protocol->user_splits;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
62 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
63
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
64 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
65 purple_protocol_get_protocol_options(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
66 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
67 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
68
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
69 return protocol->protocol_options;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
70 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
71
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
72 PurpleBuddyIconSpec *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
73 purple_protocol_get_icon_spec(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
74 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
75 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
76
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
77 return protocol->icon_spec;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
78 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
79
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
80 PurpleWhiteboardOps *
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
81 purple_protocol_get_whiteboard_ops(const PurpleProtocol *protocol)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
82 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
83 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
84
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
85 return protocol->whiteboard_ops;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
86 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
87
36686
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
88 static void
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
89 user_splits_free(PurpleProtocol *protocol)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
90 {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
91 g_return_if_fail(protocol != NULL);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
92
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
93 while (protocol->user_splits) {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
94 PurpleAccountUserSplit *split = protocol->user_splits->data;
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
95 purple_account_user_split_destroy(split);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
96 protocol->user_splits = g_list_delete_link(protocol->user_splits,
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
97 protocol->user_splits);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
98 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
99 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
100
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
101 static void
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
102 protocol_options_free(PurpleProtocol *protocol)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
103 {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
104 g_return_if_fail(protocol != NULL);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
105
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
106 while (protocol->protocol_options) {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
107 PurpleAccountOption *option = protocol->protocol_options->data;
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
108 purple_account_option_destroy(option);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
109 protocol->protocol_options =
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
110 g_list_delete_link(protocol->protocol_options,
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
111 protocol->protocol_options);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
112 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
113 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
114
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
115 static void
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
116 icon_spec_free(PurpleProtocol *protocol)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
117 {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
118 g_return_if_fail(protocol != NULL);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
119
36687
7a83a1a657e3 Removed unused declaration of purple_buddy_icon_spec_free()
Ankit Vani <a@nevitus.org>
parents: 36686
diff changeset
120 g_free(protocol->icon_spec);
36686
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
121 protocol->icon_spec = NULL;
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
122 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
123
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
124 void
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
125 purple_protocol_override(PurpleProtocol *protocol,
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
126 PurpleProtocolOverrideFlags flags)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
127 {
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
128 g_return_if_fail(PURPLE_IS_PROTOCOL(protocol));
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
129
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
130 if (flags & PURPLE_PROTOCOL_OVERRIDE_USER_SPLITS)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
131 user_splits_free(protocol);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
132 if (flags & PURPLE_PROTOCOL_OVERRIDE_PROTOCOL_OPTIONS)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
133 protocol_options_free(protocol);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
134 if (flags & PURPLE_PROTOCOL_OVERRIDE_ICON_SPEC)
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
135 icon_spec_free(protocol);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
136 }
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
137
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
138 /**************************************************************************
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
139 * GObject stuff
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
140 **************************************************************************/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
141
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
142 static void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
143 purple_protocol_init(GTypeInstance *instance, gpointer klass)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
144 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
145 PURPLE_DBUS_REGISTER_POINTER(PURPLE_PROTOCOL(instance), PurpleProtocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
146 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
147
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
148 static void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
149 purple_protocol_dispose(GObject *object)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
150 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
151 PurpleProtocol *protocol = PURPLE_PROTOCOL(object);
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
152 GList *accounts, *l;
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
153
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
154 accounts = purple_accounts_get_all_active();
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
155 for (l = accounts; l != NULL; l = l->next) {
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
156 PurpleAccount *account = PURPLE_ACCOUNT(l->data);
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
157 if (purple_account_is_disconnected(account))
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
158 continue;
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
159
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
160 if (purple_strequal(protocol->id,
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
161 purple_account_get_protocol_id(account)))
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
162 purple_account_disconnect(account);
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
163 }
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
164
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
165 g_list_free(accounts);
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
166
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
167 purple_request_close_with_handle(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
168 purple_notify_close_with_handle(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
169
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
170 purple_signals_disconnect_by_handle(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
171 purple_signals_unregister_by_instance(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
172
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
173 purple_prefs_disconnect_by_handle(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
174
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
175 PURPLE_DBUS_UNREGISTER_POINTER(protocol);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
176
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
177 parent_class->dispose(object);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
178 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
179
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
180 static void
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
181 purple_protocol_finalize(GObject *object)
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
182 {
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
183 PurpleProtocol *protocol = PURPLE_PROTOCOL(object);
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
184
36686
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
185 user_splits_free(protocol);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
186 protocol_options_free(protocol);
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36681
diff changeset
187 icon_spec_free(protocol);
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
188
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
189 parent_class->finalize(object);
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
190 }
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
191
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
192 static void
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
193 purple_protocol_class_init(PurpleProtocolClass *klass)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
194 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
195 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
196
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
197 parent_class = g_type_class_peek_parent(klass);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
198
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
199 obj_class->dispose = purple_protocol_dispose;
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
200 obj_class->finalize = purple_protocol_finalize;
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
201 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
202
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
203 GType
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
204 purple_protocol_get_type(void)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
205 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
206 static GType type = 0;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
207
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
208 if (G_UNLIKELY(type == 0)) {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
209 static const GTypeInfo info = {
36681
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
210 .class_size = sizeof(PurpleProtocolClass),
9c38716c8eb7 Moved protocol class members to instance. Protocol definitions now require *_init, *_class_init instead of *_base_init.
Ankit Vani <a@nevitus.org>
parents: 36637
diff changeset
211 .class_init = (GClassInitFunc)purple_protocol_class_init,
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
212 .instance_size = sizeof(PurpleProtocol),
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
213 .instance_init = (GInstanceInitFunc)purple_protocol_init,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
214 };
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
215
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
216 type = g_type_register_static(G_TYPE_OBJECT, "PurpleProtocol",
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
217 &info, G_TYPE_FLAG_ABSTRACT);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
218 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
219
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
220 return type;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
221 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
222
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
223 GType
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
224 purple_protocol_iface_get_type(void)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
225 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
226 static GType type = 0;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
227
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
228 if (G_UNLIKELY(type == 0)) {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
229 static const GTypeInfo info = {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
230 .class_size = sizeof(PurpleProtocolInterface),
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
231 };
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
232
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
233 type = g_type_register_static(G_TYPE_INTERFACE,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
234 "PurpleProtocolInterface", &info, 0);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
235 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
236
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
237 return type;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
238 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
239
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
240 /**************************************************************************
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
241 * Protocol Interface API
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
242 **************************************************************************/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
243
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
244 #define DEFINE_PROTOCOL_FUNC(protocol,funcname,...) \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
245 PurpleProtocolInterface *iface = PURPLE_PROTOCOL_GET_INTERFACE(protocol); \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
246 g_return_if_fail(iface != NULL); \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
247 if (iface->funcname) \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
248 iface->funcname(__VA_ARGS__);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
249
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
250 #define DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol,defaultreturn,funcname,...) \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
251 PurpleProtocolInterface *iface = PURPLE_PROTOCOL_GET_INTERFACE(protocol); \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
252 g_return_val_if_fail(iface != NULL, defaultreturn); \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
253 if (iface->funcname) \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
254 return iface->funcname(__VA_ARGS__); \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
255 else \
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
256 return defaultreturn;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
257
36694
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
258 PurpleConnection *
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
259 purple_protocol_iface_connection_new(PurpleProtocol *protocol,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
260 PurpleAccount *account,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
261 const char *password)
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
262 {
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
263 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, connection_new, protocol,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
264 account, password);
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
265 }
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
266
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
267 PurpleRoomlist *
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
268 purple_protocol_iface_roomlist_new(PurpleProtocol *protocol,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
269 PurpleAccount *account)
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
270 {
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
271 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, roomlist_new, account);
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
272 }
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
273
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
274 PurpleWhiteboard *
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
275 purple_protocol_iface_whiteboard_new(PurpleProtocol *protocol,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
276 PurpleAccount *account, const char *who)
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
277 {
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
278 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, whiteboard_new, account,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
279 who);
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
280 }
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
281
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
282 PurpleXfer *
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
283 purple_protocol_iface_xfer_new(PurpleProtocol *protocol, PurpleAccount *account,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
284 PurpleXferType type, const char *who)
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
285 {
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
286 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, xfer_new, account, type,
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
287 who);
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
288 }
7b1fefd1e2ee Added protocol interface methods connection_new, roomlist_new, whiteboard_new, xfer_new.
Ankit Vani <a@nevitus.org>
parents: 36687
diff changeset
289
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
290 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
291 purple_protocol_iface_get_actions(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
292 PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
293 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
294 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_actions, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
295 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
296
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
297 const char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
298 purple_protocol_iface_list_icon(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
299 PurpleAccount *account, PurpleBuddy *buddy)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
300 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
301 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, list_icon, account, buddy);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
302 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
303
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
304 const char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
305 purple_protocol_iface_list_emblem(PurpleProtocol *protocol, PurpleBuddy *buddy)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
306 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
307 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, list_emblem, buddy);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
308 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
309
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
310 char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
311 purple_protocol_iface_status_text(PurpleProtocol *protocol, PurpleBuddy *buddy)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
312 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
313 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, status_text, buddy);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
314 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
315
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
316 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
317 purple_protocol_iface_tooltip_text(PurpleProtocol *protocol, PurpleBuddy *buddy,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
318 PurpleNotifyUserInfo *user_info,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
319 gboolean full)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
320 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
321 DEFINE_PROTOCOL_FUNC(protocol, tooltip_text, buddy, user_info, full);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
322 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
323
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
324 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
325 purple_protocol_iface_status_types(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
326 PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
327 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
328 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, status_types, account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
329 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
330
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
331 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
332 purple_protocol_iface_blist_node_menu(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
333 PurpleBlistNode *node)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
334 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
335 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, blist_node_menu, node);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
336 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
337
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
338 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
339 purple_protocol_iface_chat_info(PurpleProtocol *protocol, PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
340 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
341 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, chat_info, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
342 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
343
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
344 GHashTable *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
345 purple_protocol_iface_chat_info_defaults(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
346 PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
347 const char *chat_name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
348 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
349 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, chat_info_defaults, gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
350 chat_name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
351 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
352
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
353 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
354 purple_protocol_iface_login(PurpleProtocol *protocol, PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
355 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
356 DEFINE_PROTOCOL_FUNC(protocol, login, account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
357 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
358
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
359 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
360 purple_protocol_iface_close(PurpleProtocol *protocol, PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
361 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
362 DEFINE_PROTOCOL_FUNC(protocol, close, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
363 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
364
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
365 int
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
366 purple_protocol_iface_send_im(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
367 const char *who, const char *message,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
368 PurpleMessageFlags flags)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
369 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
370 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, send_im, gc, who, message,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
371 flags);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
372 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
373
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
374 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
375 purple_protocol_iface_set_info(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
376 const char *info)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
377 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
378 DEFINE_PROTOCOL_FUNC(protocol, set_info, gc, info);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
379 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
380
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
381 unsigned int
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
382 purple_protocol_iface_send_typing(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
383 PurpleConnection *gc, const char *name,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
384 PurpleIMTypingState state)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
385 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
386 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, send_typing, gc, name, state);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
387 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
388
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
389 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
390 purple_protocol_iface_get_info(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
391 const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
392 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
393 DEFINE_PROTOCOL_FUNC(protocol, get_info, gc, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
394 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
395
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
396 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
397 purple_protocol_iface_set_status(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
398 PurpleAccount *account, PurpleStatus *status)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
399 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
400 DEFINE_PROTOCOL_FUNC(protocol, set_status, account, status);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
401 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
402
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
403 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
404 purple_protocol_iface_set_idle(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
405 int idletime)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
406 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
407 DEFINE_PROTOCOL_FUNC(protocol, set_idle, gc, idletime);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
408 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
409
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
410 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
411 purple_protocol_iface_change_passwd(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
412 PurpleConnection *gc, const char *old_pass,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
413 const char *new_pass)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
414 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
415 DEFINE_PROTOCOL_FUNC(protocol, change_passwd, gc, old_pass, new_pass);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
416 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
417
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
418 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
419 purple_protocol_iface_add_buddy(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
420 PurpleBuddy *buddy, PurpleGroup *group,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
421 const char *message)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
422 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
423 DEFINE_PROTOCOL_FUNC(protocol, add_buddy, gc, buddy, group, message);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
424 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
425
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
426 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
427 purple_protocol_iface_add_buddies(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
428 PurpleConnection *gc, GList *buddies,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
429 GList *groups, const char *message)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
430 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
431 DEFINE_PROTOCOL_FUNC(protocol, add_buddies, gc, buddies, groups, message);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
432 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
433
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
434 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
435 purple_protocol_iface_remove_buddy(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
436 PurpleConnection *gc, PurpleBuddy *buddy,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
437 PurpleGroup *group)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
438 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
439 DEFINE_PROTOCOL_FUNC(protocol, remove_buddy, gc, buddy, group);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
440 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
441
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
442 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
443 purple_protocol_iface_remove_buddies(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
444 PurpleConnection *gc, GList *buddies,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
445 GList *groups)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
446 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
447 DEFINE_PROTOCOL_FUNC(protocol, remove_buddies, gc, buddies, groups);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
448 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
449
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
450 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
451 purple_protocol_iface_add_permit(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
452 const char *name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
453 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
454 DEFINE_PROTOCOL_FUNC(protocol, add_permit, gc, name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
455 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
456
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
457 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
458 purple_protocol_iface_add_deny(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
459 const char *name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
460 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
461 DEFINE_PROTOCOL_FUNC(protocol, add_deny, gc, name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
462 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
463
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
464 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
465 purple_protocol_iface_rem_permit(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
466 const char *name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
467 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
468 DEFINE_PROTOCOL_FUNC(protocol, rem_permit, gc, name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
469 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
470
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
471 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
472 purple_protocol_iface_rem_deny(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
473 const char *name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
474 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
475 DEFINE_PROTOCOL_FUNC(protocol, rem_deny, gc, name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
476 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
477
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
478 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
479 purple_protocol_iface_set_permit_deny(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
480 PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
481 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
482 DEFINE_PROTOCOL_FUNC(protocol, set_permit_deny, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
483 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
484
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
485 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
486 purple_protocol_iface_join_chat(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
487 GHashTable *components)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
488 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
489 DEFINE_PROTOCOL_FUNC(protocol, join_chat, gc, components);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
490 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
491
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
492 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
493 purple_protocol_iface_reject_chat(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
494 PurpleConnection *gc, GHashTable *components)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
495 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
496 DEFINE_PROTOCOL_FUNC(protocol, reject_chat, gc, components);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
497 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
498
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
499 char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
500 purple_protocol_iface_get_chat_name(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
501 GHashTable *components)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
502 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
503 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_chat_name, components);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
504 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
505
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
506 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
507 purple_protocol_iface_chat_invite(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
508 PurpleConnection *gc, int id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
509 const char *message, const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
510 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
511 DEFINE_PROTOCOL_FUNC(protocol, chat_invite, gc, id, message, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
512 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
513
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
514 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
515 purple_protocol_iface_chat_leave(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
516 int id)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
517 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
518 DEFINE_PROTOCOL_FUNC(protocol, chat_leave, gc, id);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
519 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
520
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
521 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
522 purple_protocol_iface_chat_whisper(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
523 PurpleConnection *gc, int id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
524 const char *who, const char *message)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
525 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
526 DEFINE_PROTOCOL_FUNC(protocol, chat_whisper, gc, id, who, message);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
527 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
528
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
529 int
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
530 purple_protocol_iface_chat_send(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
531 int id, const char *message,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
532 PurpleMessageFlags flags)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
533 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
534 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, chat_send, gc, id, message,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
535 flags);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
536 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
537
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
538 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
539 purple_protocol_iface_keepalive(PurpleProtocol *protocol, PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
540 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
541 DEFINE_PROTOCOL_FUNC(protocol, keepalive, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
542 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
543
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
544 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
545 purple_protocol_iface_register_user(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
546 PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
547 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
548 DEFINE_PROTOCOL_FUNC(protocol, register_user, account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
549 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
550
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
551 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
552 purple_protocol_iface_unregister_user(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
553 PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
554 PurpleAccountUnregistrationCb cb,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
555 void *user_data)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
556 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
557 DEFINE_PROTOCOL_FUNC(protocol, unregister_user, account, cb, user_data);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
558 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
559
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
560 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
561 purple_protocol_iface_alias_buddy(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
562 PurpleConnection *gc, const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
563 const char *alias)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
564 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
565 DEFINE_PROTOCOL_FUNC(protocol, alias_buddy, gc, who, alias);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
566 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
567
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
568 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
569 purple_protocol_iface_group_buddy(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
570 PurpleConnection *gc, const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
571 const char *old_group, const char *new_group)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
572 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
573 DEFINE_PROTOCOL_FUNC(protocol, group_buddy, gc, who, old_group, new_group);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
574 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
575
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
576 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
577 purple_protocol_iface_rename_group(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
578 PurpleConnection *gc, const char *old_name,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
579 PurpleGroup *group, GList *moved_buddies)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
580 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
581 DEFINE_PROTOCOL_FUNC(protocol, rename_group, gc, old_name, group,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
582 moved_buddies);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
583 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
584
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
585 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
586 purple_protocol_iface_buddy_free(PurpleProtocol *protocol, PurpleBuddy *buddy)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
587 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
588 DEFINE_PROTOCOL_FUNC(protocol, buddy_free, buddy);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
589 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
590
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
591 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
592 purple_protocol_iface_convo_closed(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
593 PurpleConnection *gc, const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
594 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
595 DEFINE_PROTOCOL_FUNC(protocol, convo_closed, gc, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
596 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
597
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
598 const char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
599 purple_protocol_iface_normalize(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
600 const PurpleAccount *account, const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
601 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
602 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, normalize, account, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
603 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
604
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
605 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
606 purple_protocol_iface_set_buddy_icon(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
607 PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
608 PurpleStoredImage *img)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
609 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
610 DEFINE_PROTOCOL_FUNC(protocol, set_buddy_icon, gc, img);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
611 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
612
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
613 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
614 purple_protocol_iface_remove_group(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
615 PurpleConnection *gc, PurpleGroup *group)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
616 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
617 DEFINE_PROTOCOL_FUNC(protocol, remove_group, gc, group);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
618 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
619
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
620 char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
621 purple_protocol_iface_get_cb_real_name(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
622 PurpleConnection *gc, int id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
623 const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
624 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
625 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_cb_real_name, gc, id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
626 who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
627 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
628
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
629 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
630 purple_protocol_iface_set_chat_topic(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
631 PurpleConnection *gc, int id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
632 const char *topic)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
633 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
634 DEFINE_PROTOCOL_FUNC(protocol, set_chat_topic, gc, id, topic);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
635 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
636
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
637 PurpleChat *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
638 purple_protocol_iface_find_blist_chat(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
639 PurpleAccount *account, const char *name)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
640 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
641 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, find_blist_chat, account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
642 name);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
643 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
644
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
645 PurpleRoomlist *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
646 purple_protocol_iface_roomlist_get_list(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
647 PurpleConnection *gc)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
648 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
649 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, roomlist_get_list, gc);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
650 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
651
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
652 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
653 purple_protocol_iface_roomlist_cancel(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
654 PurpleRoomlist *list)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
655 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
656 DEFINE_PROTOCOL_FUNC(protocol, roomlist_cancel, list);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
657 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
658
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
659 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
660 purple_protocol_iface_roomlist_expand_category(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
661 PurpleRoomlist *list,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
662 PurpleRoomlistRoom *category)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
663 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
664 DEFINE_PROTOCOL_FUNC(protocol, roomlist_expand_category, list, category);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
665 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
666
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
667 gboolean
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
668 purple_protocol_iface_can_receive_file(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
669 PurpleConnection *gc, const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
670 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
671 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, FALSE, can_receive_file, gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
672 who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
673 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
674
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
675 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
676 purple_protocol_iface_send_file(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
677 const char *who, const char *filename)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
678 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
679 DEFINE_PROTOCOL_FUNC(protocol, send_file, gc, who, filename);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
680 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
681
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
682 PurpleXfer *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
683 purple_protocol_iface_new_xfer(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
684 const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
685 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
686 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, new_xfer, gc, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
687 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
688
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
689 gboolean
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
690 purple_protocol_iface_offline_message(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
691 const PurpleBuddy *buddy)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
692 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
693 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, FALSE, offline_message, buddy);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
694 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
695
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
696 int
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
697 purple_protocol_iface_send_raw(PurpleProtocol *protocol, PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
698 const char *buf, int len)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
699 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
700 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, send_raw, gc, buf, len);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
701 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
702
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
703 char *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
704 purple_protocol_iface_roomlist_room_serialize(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
705 PurpleRoomlistRoom *room)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
706 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
707 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, roomlist_room_serialize,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
708 room);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
709 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
710
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
711 gboolean
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
712 purple_protocol_iface_send_attention(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
713 PurpleConnection *gc, const char *username,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
714 guint type)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
715 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
716 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, FALSE, send_attention, gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
717 username, type);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
718 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
719
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
720 GList *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
721 purple_protocol_iface_get_attention_types(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
722 PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
723 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
724 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_attention_types,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
725 account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
726 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
727
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
728 GHashTable *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
729 purple_protocol_iface_get_account_text_table(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
730 PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
731 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
732 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_account_text_table,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
733 account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
734 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
735
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
736 gboolean
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
737 purple_protocol_iface_initiate_media(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
738 PurpleAccount *account, const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
739 PurpleMediaSessionType type)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
740 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
741 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, FALSE, initiate_media, account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
742 who, type);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
743 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
744
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
745 PurpleMediaCaps
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
746 purple_protocol_iface_get_media_caps(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
747 PurpleAccount *account, const char *who)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
748 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
749 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, get_media_caps, account, who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
750 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
751
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
752 PurpleMood *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
753 purple_protocol_iface_get_moods(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
754 PurpleAccount *account)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
755 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
756 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, NULL, get_moods, account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
757 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
758
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
759 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
760 purple_protocol_iface_set_public_alias(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
761 PurpleConnection *gc, const char *alias,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
762 PurpleSetPublicAliasSuccessCallback success_cb,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
763 PurpleSetPublicAliasFailureCallback failure_cb)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
764 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
765 DEFINE_PROTOCOL_FUNC(protocol, set_public_alias, gc, alias, success_cb,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
766 failure_cb);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
767 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
768
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
769 void
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
770 purple_protocol_iface_get_public_alias(PurpleProtocol *protocol,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
771 PurpleConnection *gc,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
772 PurpleGetPublicAliasSuccessCallback success_cb,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
773 PurpleGetPublicAliasFailureCallback failure_cb)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
774 {
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
775 DEFINE_PROTOCOL_FUNC(protocol, get_public_alias, gc, success_cb,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
776 failure_cb);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
777 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
778
36621
3edd164b6a1a Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 36617
diff changeset
779 gssize
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
780 purple_protocol_iface_get_max_message_size(PurpleProtocol *protocol,
36621
3edd164b6a1a Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 36617
diff changeset
781 PurpleConversation *conv)
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
782 {
36621
3edd164b6a1a Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 36617
diff changeset
783 DEFINE_PROTOCOL_FUNC_WITH_RETURN(protocol, 0, get_max_message_size, conv);
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
784 }
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36560
diff changeset
785

mercurial