libpurple/protocols.h

Wed, 29 Jan 2014 10:49:02 +0530

author
Ankit Vani <a@nevitus.org>
date
Wed, 29 Jan 2014 10:49:02 +0530
branch
soc.2013.gobjectification.plugins
changeset 37023
d9bcdc9a91e6
parent 37021
04c99b24db84
child 37034
9d6765962b22
permissions
-rw-r--r--

Revert changes to doc comments

4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
1 /**
36563
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
2 * @file protocols.h Protocols API
5034
077678f7b048 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 4966
diff changeset
3 * @ingroup core
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19907
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19907
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19907
diff changeset
6 /* purple
981
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
7 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15588
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7999
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7999
diff changeset
10 * source distribution.
6451
2ff17ce330d8 [gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents: 6418
diff changeset
11 *
981
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
15 * (at your option) any later version.
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
16 *
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
20 * GNU General Public License for more details.
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
21 *
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19641
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
981
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
25 */
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
26
36563
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
27 #ifndef _PURPLE_PROTOCOLS_H_
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
28 #define _PURPLE_PROTOCOLS_H_
36551
8988e6e21acb Started GObjectification of protocols - added PurpleProtocol, PurpleProtocolClass, PurpleProtocolInterface.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
29
36627
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
30 #define PURPLE_PROTOCOLS_DOMAIN (g_quark_from_static_string("protocols"))
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
31
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
32 #define PURPLE_TYPE_PROTOCOL_ACTION (purple_protocol_action_get_type())
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
33
36551
8988e6e21acb Started GObjectification of protocols - added PurpleProtocol, PurpleProtocolClass, PurpleProtocolInterface.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
34 /** @copydoc _PurpleProtocolAction */
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
35 typedef struct _PurpleProtocolAction PurpleProtocolAction;
36408
15ee501576b9 Added PurplePluginProtocolInfo* to PurpleProtocolAction. Changed PurpleProtocolActionCallback argument to PurpleProtocolAction*.
Ankit Vani <a@nevitus.org>
parents: 36396
diff changeset
36 typedef void (*PurpleProtocolActionCallback)(PurpleProtocolAction *);
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
37
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
38 #define PURPLE_TYPE_ATTENTION_TYPE (purple_attention_type_get_type())
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
39
32554
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32338
diff changeset
40 /** Represents "nudges" and "buzzes" that you may send to a buddy to attract
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32338
diff changeset
41 * their attention (or vice-versa).
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32338
diff changeset
42 */
19604
ae3d7cc7063d Attention API for nudges/buzzes/zaps of various protocols.
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 19401
diff changeset
43 typedef struct _PurpleAttentionType PurpleAttentionType;
5205
242b8aa81328 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 5148
diff changeset
44
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
45 /**************************************************************************/
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
46 /** @name Basic Protocol Information */
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
47 /**************************************************************************/
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
48
36686
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36659
diff changeset
49 typedef enum /*< flags >*/
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36659
diff changeset
50 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15588
diff changeset
51 PURPLE_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15588
diff changeset
52 PURPLE_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15588
diff changeset
53 } PurpleIconScaleRules;
9318
9d1c6820a588 [gaim-migrate @ 10126]
Nathan Walp <nwalp@pidgin.im>
parents: 9316
diff changeset
54
30113
f60cbf3b3ca9 Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents: 29815
diff changeset
55 /**
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
56 * Represents an entry containing information that must be supplied by the
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
57 * user when joining a chat.
28684
b4c337df39a1 Documented chat API. References #10605
Felix Kerekes <sttwister@soc.pidgin.im>
parents: 27132
diff changeset
58 */
36563
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
59 typedef struct _PurpleProtocolChatEntry PurpleProtocolChatEntry;
9713
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 9584
diff changeset
60
6622
277eb0b14653 [gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents: 6451
diff changeset
61 /**
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
62 * Protocol options
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
63 *
36551
8988e6e21acb Started GObjectification of protocols - added PurpleProtocol, PurpleProtocolClass, PurpleProtocolInterface.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
64 * These should all be stuff that some protocols can do and others can't.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
65 */
36686
9807e4acf281 Added PurpleProtocolOverrideFlags and purple_protocol_override()
Ankit Vani <a@nevitus.org>
parents: 36659
diff changeset
66 typedef enum /*< flags >*/
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
67 {
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
68 /**
27132
545109e6826f Clarify (hopefully) the usage of OPT_PROTO_UNIQUE_CHATNAME; arose in a discussion in #pidgin.
Paul Aurich <darkrain42@pidgin.im>
parents: 26871
diff changeset
69 * User names are unique to a chat and are not shared between rooms.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
70 *
27132
545109e6826f Clarify (hopefully) the usage of OPT_PROTO_UNIQUE_CHATNAME; arose in a discussion in #pidgin.
Paul Aurich <darkrain42@pidgin.im>
parents: 26871
diff changeset
71 * XMPP lets you choose what name you want in chats, so it shouldn't
545109e6826f Clarify (hopefully) the usage of OPT_PROTO_UNIQUE_CHATNAME; arose in a discussion in #pidgin.
Paul Aurich <darkrain42@pidgin.im>
parents: 26871
diff changeset
72 * be pulling the aliases from the buddy list for the chat list;
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
73 * it gets annoying.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
74 */
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
75 OPT_PROTO_UNIQUE_CHATNAME = 0x00000004,
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
76
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
77 /**
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
78 * Chat rooms have topics.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
79 *
16961
b6955f946f8f s/Jabber/XMPP in user-visible places.
Richard Laager <rlaager@pidgin.im>
parents: 16799
diff changeset
80 * IRC and XMPP support this.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
81 */
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
82 OPT_PROTO_CHAT_TOPIC = 0x00000008,
1370
de786e8d0146 [gaim-migrate @ 1380]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents: 1355
diff changeset
83
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
84 /**
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
85 * Don't require passwords for sign-in.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
86 *
9999
86e89e1dee10 [gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents: 9971
diff changeset
87 * Zephyr doesn't require passwords, so there's no
86e89e1dee10 [gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents: 9971
diff changeset
88 * need for a password prompt.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
89 */
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
90 OPT_PROTO_NO_PASSWORD = 0x00000010,
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
91
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
92 /**
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
93 * Notify on new mail.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
94 *
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
95 * MSN and Yahoo notify you when you have new mail.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
96 */
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
97 OPT_PROTO_MAIL_CHECK = 0x00000020,
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
98
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
99 /**
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
100 * Images in IMs.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
101 *
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
102 * Oscar lets you send images in direct IMs.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
103 */
9999
86e89e1dee10 [gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents: 9971
diff changeset
104 OPT_PROTO_IM_IMAGE = 0x00000040,
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
105
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
106 /**
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
107 * Allow passwords to be optional.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
108 *
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
109 * Passwords in IRC are optional, and are needed for certain
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
110 * functionality.
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
111 */
9999
86e89e1dee10 [gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents: 9971
diff changeset
112 OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080,
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
113
5367
a2f9e6418413 [gaim-migrate @ 5743]
Ka-Hing Cheung <khc@pidgin.im>
parents: 5234
diff changeset
114 /**
a2f9e6418413 [gaim-migrate @ 5743]
Ka-Hing Cheung <khc@pidgin.im>
parents: 5234
diff changeset
115 * Allows font size to be specified in sane point size
a2f9e6418413 [gaim-migrate @ 5743]
Ka-Hing Cheung <khc@pidgin.im>
parents: 5234
diff changeset
116 *
16961
b6955f946f8f s/Jabber/XMPP in user-visible places.
Richard Laager <rlaager@pidgin.im>
parents: 16799
diff changeset
117 * Probably just XMPP and Y!M
5367
a2f9e6418413 [gaim-migrate @ 5743]
Ka-Hing Cheung <khc@pidgin.im>
parents: 5234
diff changeset
118 */
11358
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
119 OPT_PROTO_USE_POINTSIZE = 0x00000100,
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
120
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
121 /**
25889
26d9ca30335c Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents: 25888
diff changeset
122 * Set the Register button active even when the username has not
26d9ca30335c Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents: 25888
diff changeset
123 * been specified.
11358
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
124 *
25889
26d9ca30335c Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents: 25888
diff changeset
125 * Gadu-Gadu doesn't need a username to register new account (because
26d9ca30335c Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <markdoliner@pidgin.im>
parents: 25888
diff changeset
126 * usernames are assigned by the server).
11358
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
127 */
531a16c883c0 [gaim-migrate @ 13580]
Bartosz Oler <bartosz@pidgin.im>
parents: 11257
diff changeset
128 OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
5367
a2f9e6418413 [gaim-migrate @ 5743]
Ka-Hing Cheung <khc@pidgin.im>
parents: 5234
diff changeset
129
18092
1a2362194473 Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17392
diff changeset
130 /**
1a2362194473 Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17392
diff changeset
131 * Indicates that slash commands are native to this protocol.
1a2362194473 Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17392
diff changeset
132 * Used as a hint that unknown commands should not be sent as messages.
1a2362194473 Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17392
diff changeset
133 */
31597
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
134 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400,
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
135
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
136 /**
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
137 * Indicates that this protocol supports sending a user-supplied message
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
138 * along with an invitation.
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
139 */
33696
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
140 OPT_PROTO_INVITE_MESSAGE = 0x00000800,
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
141
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
142 /**
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
143 * Indicates that this protocol supports sending a user-supplied message
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
144 * along with an authorization acceptance.
31597
3604d574a028 Add a flag indicating that a prpl allows specifying an invite message.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31594
diff changeset
145 */
33696
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
146 OPT_PROTO_AUTHORIZATION_GRANTED_MESSAGE = 0x00001000,
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
147
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
148 /**
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
149 * Indicates that this protocol supports sending a user-supplied message
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
150 * along with an authorization denial.
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
151 */
b210b3afb63d Add some prpl flags to indicate support for auth response messages.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33568
diff changeset
152 OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE = 0x00002000
18092
1a2362194473 Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17392
diff changeset
153
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15588
diff changeset
154 } PurpleProtocolOptions;
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
155
36628
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36627
diff changeset
156 #include "media.h"
36581
09d5842255a2 Added missing includes and functions to headers
Ankit Vani <a@nevitus.org>
parents: 36571
diff changeset
157 #include "protocol.h"
36628
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36627
diff changeset
158 #include "status.h"
36581
09d5842255a2 Added missing includes and functions to headers
Ankit Vani <a@nevitus.org>
parents: 36571
diff changeset
159
36563
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
160 #define PURPLE_TYPE_PROTOCOL_CHAT_ENTRY (purple_protocol_chat_entry_get_type())
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
161
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
162 /** @copydoc PurpleProtocolChatEntry */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
163 struct _PurpleProtocolChatEntry {
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
164 const char *label; /**< User-friendly name of the entry */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
165 const char *identifier; /**< Used by the protocol to identify the option */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
166 gboolean required; /**< True if it's required */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
167 gboolean is_int; /**< True if the entry expects an integer */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
168 int min; /**< Minimum value in case of integer */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
169 int max; /**< Maximum value in case of integer */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
170 gboolean secret; /**< True if the entry is secret (password) */
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
171 };
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
172
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
173 /**
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
174 * Represents an action that the protocol can perform. This shows up in the
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
175 * Accounts menu, under a submenu with the name of the account.
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
176 */
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
177 struct _PurpleProtocolAction {
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
178 char *label;
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
179 PurpleProtocolActionCallback callback;
36451
15fb9e64d477 Replaced PurplePluginProtocolInfo* with PurpleConnection* in PurpleProtocolAction
Ankit Vani <a@nevitus.org>
parents: 36423
diff changeset
180 PurpleConnection *connection;
36496
e7fe371c60a6 Refactored jabber to use the new API
Ankit Vani <a@nevitus.org>
parents: 36493
diff changeset
181 gpointer user_data;
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
182 };
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
183
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
184 G_BEGIN_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5943
diff changeset
185
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
186 /**************************************************************************/
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
187 /** @name Attention Type API */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
188 /**************************************************************************/
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
189 /*@{*/
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
190
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
191 /**
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
192 * Returns the GType for the #PurpleAttentionType boxed structure.
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
193 */
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
194 GType purple_attention_type_get_type(void);
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
195
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
196 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
197 * Creates a new #PurpleAttentionType object and sets its mandatory parameters.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
198 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
199 * @param ulname A non-localized string that can be used by UIs in need of such
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
200 * non-localized strings. This should be the same as @a name,
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
201 * without localization.
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
202 * @param name A localized string that the UI may display for the event. This
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
203 * should be the same string as @a ulname, with localization.
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
204 * @param inc_desc A localized description shown when the event is received.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
205 * @param out_desc A localized description shown when the event is sent.
32302
8d7ae15354e1 Hide PurpleAttentionType struct and remove attention @since tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31597
diff changeset
206 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
207 * @return A pointer to the new object.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
208 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
209 PurpleAttentionType *purple_attention_type_new(const char *ulname, const char *name,
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
210 const char *inc_desc, const char *out_desc);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
211
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
212 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
213 * Sets the displayed name of the attention-demanding event.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
214 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
215 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
216 * @param name The localized name that will be displayed by UIs. This should be
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
217 * the same string given as the unlocalized name, but with
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
218 * localization.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
219 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
220 void purple_attention_type_set_name(PurpleAttentionType *type, const char *name);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
221
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
222 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
223 * Sets the description of the attention-demanding event shown in conversations
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
224 * when the event is received.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
225 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
226 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
227 * @param desc The localized description for incoming events.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
228 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
229 void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
230
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
231 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
232 * Sets the description of the attention-demanding event shown in conversations
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
233 * when the event is sent.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
234 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
235 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
236 * @param desc The localized description for outgoing events.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
237 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
238 void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
239
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
240 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
241 * Sets the name of the icon to display for the attention event; this is optional.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
242 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
243 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
244 * @param name The icon's name.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
245 * @note Icons are optional for attention events.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
246 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
247 void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
248
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
249 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
250 * Sets the unlocalized name of the attention event; some UIs may need this,
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
251 * thus it is required.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
252 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
253 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
254 * @param ulname The unlocalized name. This should be the same string given as
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
255 * the localized name, but without localization.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
256 */
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
257 void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname);
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
258
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
259 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
260 * Get the attention type's name as displayed by the UI.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
261 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
262 * @param type The attention type.
32302
8d7ae15354e1 Hide PurpleAttentionType struct and remove attention @since tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31597
diff changeset
263 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
264 * @return The name.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
265 */
22251
a7c65a128467 const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22225
diff changeset
266 const char *purple_attention_type_get_name(const PurpleAttentionType *type);
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
267
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
268 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
269 * Get the attention type's description shown when the event is received.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
270 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
271 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
272 * @return The description.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
273 */
22251
a7c65a128467 const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22225
diff changeset
274 const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type);
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
275
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
276 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
277 * Get the attention type's description shown when the event is sent.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
278 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
279 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
280 * @return The description.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
281 */
22251
a7c65a128467 const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22225
diff changeset
282 const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type);
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
283
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
284 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
285 * Get the attention type's icon name.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
286 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
287 * @param type The attention type.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
288 * @return The icon name or @c NULL if unset/empty.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
289 * @note Icons are optional for attention events.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
290 */
22251
a7c65a128467 const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22225
diff changeset
291 const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type);
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
292
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
293 /**
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
294 * Get the attention type's unlocalized name; this is useful for some UIs.
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
295 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
296 * @param type The attention type
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
297 * @return The unlocalized name.
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
298 */
22251
a7c65a128467 const-ify paramteters to some of the new API I added. I thought I did this already.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22225
diff changeset
299 const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type);
22225
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
300
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
301 /*@}*/
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
302
6cd802a8c5ad This adds accessor and mutator API for the PurpleAttentionType struct.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 21865
diff changeset
303 /**************************************************************************/
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
304 /** @name Protocol Action API */
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
305 /**************************************************************************/
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
306 /*@{*/
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
307
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
308 /**
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
309 * Returns the GType for the #PurpleProtocolAction boxed structure.
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
310 */
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
311 GType purple_protocol_action_get_type(void);
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
312
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
313 /**
36487
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
314 * Allocates and returns a new PurpleProtocolAction. Use this to add actions in
36493
755de1ce7f07 Update documentation
Ankit Vani <a@nevitus.org>
parents: 36490
diff changeset
315 * a list in the get_actions function of the protocol.
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
316 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
317 * @param label The description of the action to show to the user.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
318 * @param callback The callback to call when the user selects this action.
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
319 */
36487
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
320 PurpleProtocolAction *purple_protocol_action_new(const char* label,
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
321 PurpleProtocolActionCallback callback);
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
322
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
323 /**
36487
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
324 * Frees a PurpleProtocolAction
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
325 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
326 * @param action The PurpleProtocolAction to free.
36487
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
327 */
725e37471387 Make actions a callback again, so that a plugin/protocol can change them
Ankit Vani <a@nevitus.org>
parents: 36471
diff changeset
328 void purple_protocol_action_free(PurpleProtocolAction *action);
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
329
36556
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
330 /*@}*/
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
331
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
332 /**************************************************************************/
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
333 /** @name Protocol Chat Entry API */
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
334 /**************************************************************************/
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
335 /*@{*/
98b761371c33 Organize new functions
Ankit Vani <a@nevitus.org>
parents: 36555
diff changeset
336
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
337 /**
36554
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
338 * Returns the GType for the #PurpleProtocolChatEntry boxed structure.
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
339 */
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
340 GType purple_protocol_chat_entry_get_type(void);
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
341
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
342 /*@}*/
74191a8680af Added boilerplate macros, renamed proto_chat_entry to PurpleProtocolChatEntry, and updated documentation
Ankit Vani <a@nevitus.org>
parents: 36553
diff changeset
343
36388
207c2716f0a8 Added struct PurpleProtocolAction, and purple_protocol_actions_add().
Ankit Vani <a@nevitus.org>
parents: 36378
diff changeset
344 /**************************************************************************/
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
345 /** @name Protocol API */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
346 /**************************************************************************/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
347 /*@{*/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
348
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
349 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
350 * Notifies Purple that our account's idle state and time have changed.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
351 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
352 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
353 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
354 * @param account The account.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
355 * @param idle The user's idle state.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
356 * @param idle_time The user's idle time.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
357 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
358 void purple_protocol_got_account_idle(PurpleAccount *account, gboolean idle,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
359 time_t idle_time);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
360
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
361 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
362 * Notifies Purple of our account's log-in time.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
363 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
364 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
365 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
366 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
367 * @param login_time The user's log-in time.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
368 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
369 void purple_protocol_got_account_login_time(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
370 time_t login_time);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
371
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
372 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
373 * Notifies Purple that our account's status has changed.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
374 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
375 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
376 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
377 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
378 * @param status_id The status ID.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
379 * @param ... A NULL-terminated list of attribute IDs and values,
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
380 * beginning with the value for @a attr_id.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
381 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
382 void purple_protocol_got_account_status(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
383 const char *status_id, ...)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
384 G_GNUC_NULL_TERMINATED;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
385
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
386 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
387 * Notifies Purple that our account's actions have changed. This is only
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
388 * called after the initial connection. Emits the account-actions-changed
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
389 * signal.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
390 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
391 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
392 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
393 * @param account The account.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
394 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
395 * @see account-actions-changed
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
396 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
397 void purple_protocol_got_account_actions(PurpleAccount *account);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
398
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
399 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
400 * Notifies Purple that a buddy's idle state and time have changed.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
401 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
402 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
403 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
404 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
405 * @param name The name of the buddy.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
406 * @param idle The user's idle state.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
407 * @param idle_time The user's idle time. This is the time at
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
408 * which the user became idle, in seconds since
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
409 * the epoch. If the protocol does not know this value
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
410 * then it should pass 0.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
411 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
412 void purple_protocol_got_user_idle(PurpleAccount *account, const char *name,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
413 gboolean idle, time_t idle_time);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
414
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
415 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
416 * Notifies Purple of a buddy's log-in time.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
417 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
418 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
419 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
420 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
421 * @param name The name of the buddy.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
422 * @param login_time The user's log-in time.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
423 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
424 void purple_protocol_got_user_login_time(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
425 const char *name, time_t login_time);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
426
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
427 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
428 * Notifies Purple that a buddy's status has been activated.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
429 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
430 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
431 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
432 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
433 * @param name The name of the buddy.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
434 * @param status_id The status ID.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
435 * @param ... A NULL-terminated list of attribute IDs and values,
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
436 * beginning with the value for @a attr_id.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
437 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
438 void purple_protocol_got_user_status(PurpleAccount *account, const char *name,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
439 const char *status_id, ...)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
440 G_GNUC_NULL_TERMINATED;
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
441
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
442 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
443 * Notifies libpurple that a buddy's status has been deactivated
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
444 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
445 * This is meant to be called from protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
446 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
447 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
448 * @param name The name of the buddy.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
449 * @param status_id The status ID.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
450 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
451 void purple_protocol_got_user_status_deactive(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
452 const char *name,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
453 const char *status_id);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
454
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
455 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
456 * Informs the server that our account's status changed.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
457 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
458 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
459 * @param old_status The previous status.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
460 * @param new_status The status that was activated, or deactivated
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
461 * (in the case of independent statuses).
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
462 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
463 void purple_protocol_change_account_status(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
464 PurpleStatus *old_status,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
465 PurpleStatus *new_status);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
466
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
467 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
468 * Retrieves the list of stock status types from a protocol.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
469 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
470 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
471 * @param presence The presence for which we're going to get statuses
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
472 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
473 * @return List of statuses
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
474 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
475 GList *purple_protocol_get_statuses(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
476 PurplePresence *presence);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
477
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
478 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
479 * Send an attention request message.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
480 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
481 * @param gc The connection to send the message on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
482 * @param who Whose attention to request.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
483 * @param type_code An index into the protocol's attention_types list
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
484 * determining the type of the attention request command to
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
485 * send. 0 if protocol only defines one (for example, Yahoo and
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
486 * MSN), but some protocols define more (MySpaceIM).
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
487 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
488 * Note that you can't send arbitrary PurpleAttentionType's, because there is
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
489 * only a fixed set of attention commands.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
490 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
491 void purple_protocol_send_attention(PurpleConnection *gc, const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
492 guint type_code);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
493
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
494 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
495 * Process an incoming attention message.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
496 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
497 * @param gc The connection that received the attention message.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
498 * @param who Who requested your attention.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
499 * @param type_code An index into the protocol's attention_types list
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
500 * determining the type of the attention request command to
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
501 * send.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
502 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
503 void purple_protocol_got_attention(PurpleConnection *gc, const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
504 guint type_code);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
505
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
506 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
507 * Process an incoming attention message in a chat.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
508 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
509 * @param gc The connection that received the attention message.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
510 * @param id The chat id.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
511 * @param who Who requested your attention.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
512 * @param type_code An index into the protocol's attention_types list
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
513 * determining the type of the attention request command to
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
514 * send.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
515 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
516 void purple_protocol_got_attention_in_chat(PurpleConnection *gc, int id,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
517 const char *who, guint type_code);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
518
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
519 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
520 * Determines if the contact supports the given media session type.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
521 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
522 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
523 * @param who The name of the contact to check capabilities for.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
524 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
525 * @return The media caps the contact supports.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
526 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
527 PurpleMediaCaps purple_protocol_get_media_caps(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
528 const char *who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
529
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
530 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
531 * Initiates a media session with the given contact.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
532 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
533 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
534 * @param who The name of the contact to start a session with.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
535 * @param type The type of media session to start.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
536 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
537 * @return TRUE if the call succeeded else FALSE. (Doesn't imply the media
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
538 * session or stream will be successfully created)
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
539 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
540 gboolean purple_protocol_initiate_media(PurpleAccount *account,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
541 const char *who,
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
542 PurpleMediaSessionType type);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
543
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
544 /**
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
545 * Signals that the protocol received capabilities for the given contact.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
546 *
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
547 * This function is intended to be used only by protocols.
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
548 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
549 * @param account The account the user is on.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
550 * @param who The name of the contact for which capabilities have been received.
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
551 */
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
552 void purple_protocol_got_media_caps(PurpleAccount *account, const char *who);
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
553
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
554 /**
36701
5acd461707ae Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 34940 36688
diff changeset
555 * Gets the safe maximum message size in bytes for the protocol.
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
556 *
36701
5acd461707ae Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 34940 36688
diff changeset
557 * @see PurpleProtocol#get_max_message_size
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
558 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
559 * @param protocol The protocol to query.
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
560 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
561 * @return Maximum message size, 0 if unspecified, -1 for infinite.
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
562 */
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
563 gssize
36701
5acd461707ae Merged soc.2013.gobjectification branch
Ankit Vani <a@nevitus.org>
parents: 34940 36688
diff changeset
564 purple_protocol_get_max_message_size(PurpleProtocol *protocol);
34327
a899fa8f95d5 Implement purple_prpl_get_max_message_size
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34321
diff changeset
565
36617
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
566 /*@}*/
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
567
be16459a68e9 Finished implementation of protocol object and interface stuff in protocol.[ch].
Ankit Vani <a@nevitus.org>
parents: 36608
diff changeset
568 /**************************************************************************/
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
569 /** @name Protocols API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
570 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
571 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
572
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
573 /**
36551
8988e6e21acb Started GObjectification of protocols - added PurpleProtocol, PurpleProtocolClass, PurpleProtocolInterface.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
574 * Finds a protocol by ID.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
575 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
576 * @param id The protocol's ID.
4557
40c90b1671cf [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
577 */
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
578 PurpleProtocol *purple_protocols_find(const char *id);
981
00723c9a507c [gaim-migrate @ 991]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
579
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
580 /**
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
581 * Adds a protocol to the list of protocols.
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
582 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
583 * @param protocol_type The type of the protocol to add.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
584 * @param error Return location for a #GError or @c NULL. If provided, this
36627
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
585 * will be set to the reason if adding fails.
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
586 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
587 * @return The protocol instance if the protocol was added, else @c NULL.
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
588 */
36627
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
589 PurpleProtocol *purple_protocols_add(GType protocol_type, GError **error);
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
590
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
591 /**
36471
5272e3736c71 Mention that accounts will be disconnected on protocol's removal
Ankit Vani <a@nevitus.org>
parents: 36469
diff changeset
592 * Removes a protocol from the list of protocols. This will disconnect all
36493
755de1ce7f07 Update documentation
Ankit Vani <a@nevitus.org>
parents: 36490
diff changeset
593 * connected accounts using this protocol, and free the protocol's user splits
755de1ce7f07 Update documentation
Ankit Vani <a@nevitus.org>
parents: 36490
diff changeset
594 * and protocol options.
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
595 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
596 * @param protocol The protocol to remove.
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
597 * @param error Return location for a #GError or @c NULL. If provided, this
36627
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
598 * will be set to the reason if removing fails.
36628
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36627
diff changeset
599 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
600 * @return TRUE if the protocol was removed, else FALSE.
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
601 */
36627
a3b0d16f69ef Added error argument to protocol add/remove funcs, along with checks to ensure protocol being added/removed is valid
Ankit Vani <a@nevitus.org>
parents: 36624
diff changeset
602 gboolean purple_protocols_remove(PurpleProtocol *protocol, GError **error);
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
603
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
604 /**
36378
d51a8507f4e0 Added purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36375
diff changeset
605 * Returns a list of all loaded protocols.
d51a8507f4e0 Added purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36375
diff changeset
606 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
607 * @return A list of all loaded protocols. The list is owned by the caller, and
36659
fbaa6f248ebc Free the list returned by purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36628
diff changeset
608 * must be g_list_free()d to avoid leaking the nodes.
36378
d51a8507f4e0 Added purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36375
diff changeset
609 */
d51a8507f4e0 Added purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36375
diff changeset
610 GList *purple_protocols_get_all(void);
d51a8507f4e0 Added purple_protocols_get_all()
Ankit Vani <a@nevitus.org>
parents: 36375
diff changeset
611
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
612 /*@}*/
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
613
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
614 /**************************************************************************/
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
615 /** @name Protocols Subsytem API */
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
616 /**************************************************************************/
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
617 /*@{*/
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
618
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
619 /**
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
620 * Initializes the protocols subsystem.
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
621 */
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
622 void purple_protocols_init(void);
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
623
36624
38043ecaf4a6 Finished implementing functions for protocols.[ch].
Ankit Vani <a@nevitus.org>
parents: 36621
diff changeset
624 /**
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
625 * Returns the protocols subsystem handle.
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
626 *
37023
d9bcdc9a91e6 Revert changes to doc comments
Ankit Vani <a@nevitus.org>
parents: 37021
diff changeset
627 * @return The protocols subsystem handle.
36375
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
628 */
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
629 void *purple_protocols_get_handle(void);
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
630
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
631 /**
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
632 * Uninitializes the protocols subsystem.
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
633 */
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
634 void purple_protocols_uninit(void);
8ed701a7333e Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
635
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
636 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 9943
diff changeset
637
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
638 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5943
diff changeset
639
36563
5ecb9a6c4611 Added protocol.[ch] and moved PurpleProtocol and PurpleProtocolInterface to it
Ankit Vani <a@nevitus.org>
parents: 36562
diff changeset
640 #endif /* _PROTOCOLS_H_ */

mercurial