libpurple/purpleprotocolim.h

Thu, 12 Aug 2021 20:34:54 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 12 Aug 2021 20:34:54 -0500
changeset 41024
a2ad2d034162
parent 41010
d0abbb616bea
child 41155
922c9e70900c
permissions
-rw-r--r--

Set the prereq type for all Protocol interfaces to PurpleProtocol

Testing Done:
Compiled and ran without an obvious issues.

Reviewed at https://reviews.imfreedom.org/r/888/

40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
2 * Purple - Internet Messaging Library
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40539
2941deda6d8d Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents: 40525
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_PROTOCOL_IM_H
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_PROTOCOL_IM_H
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40507
diff changeset
31 * SECTION:purpleprotocolim
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40507
diff changeset
32 * @section_id: libpurple-purpleprotocolim
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
33 * @title: ProtocolIM Interface
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @short_description: Protocol Instant Message Interface
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
35 *
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
36 * #PurpleProtocolIM describes the API that protocols need to implement for
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
37 * handling one on one conversations.
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include <glib.h>
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #include <glib-object.h>
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 #include <libpurple/connection.h>
41024
a2ad2d034162 Set the prereq type for all Protocol interfaces to PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
44 #include <libpurple/protocol.h>
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 /**
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 * PURPLE_TYPE_PROTOCOL_IM:
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 *
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
49 * The standard _TYPE_ macro for #PurpleProtocolIM.
40525
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40507
diff changeset
50 *
96fc115d6c36 Move PurpleProtocolMediaInterface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40507
diff changeset
51 * Since: 3.0.0
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 */
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
53 #define PURPLE_TYPE_PROTOCOL_IM (purple_protocol_im_get_type())
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
54
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
55 /**
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
56 * purple_protocol_im_get_type:
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
57 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
58 * Gets the #GType for #PurpleProtocolIM.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
59 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
60 * Returns: The #GType for #PurpleProtocolIM.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
61 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
62 * Since: 3.0.0
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
63 */
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
64
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
65 /**
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
66 * PurpleProtocolIM:
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
67 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
68 * An opaque data structure that represents and object that implements
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
69 * #PurpleProtocolIMInterface.
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
70 *
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
71 * Since: 3.0.0
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
72 */
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
73 G_DECLARE_INTERFACE(PurpleProtocolIM, purple_protocol_im, PURPLE, PROTOCOL_IM,
41024
a2ad2d034162 Set the prereq type for all Protocol interfaces to PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 41010
diff changeset
74 PurpleProtocol)
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 /**
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * PurpleProtocolIMInterface:
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * @send: This protocol function should return a positive value on
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * success. If the message is too big to be sent, return
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * <literal>-E2BIG</literal>. If the account is not connected,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * return <literal>-ENOTCONN</literal>. If the protocol is unable
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * to send the message for another reason, return some other
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * negative value. You can use one of the valid #errno values, or
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 * just big something. If the message should not be echoed to the
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * conversation window, return 0.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * @send_typing: If this protocol requires the #PURPLE_IM_TYPING message to be
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 * sent repeatedly to signify that the user is still typing, then
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * the protocol should return the number of seconds to wait before
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 * sending a subsequent notification. Otherwise the protocol
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 * should return 0.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 * The protocol IM interface that needs to be implemented to send one to one
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 * messages.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 struct _PurpleProtocolIMInterface {
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 /*< private >*/
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 GTypeInterface parent;
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 /*< public >*/
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 gint (*send)(PurpleProtocolIM *im, PurpleConnection *connection,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 PurpleMessage *msg);
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 guint (*send_typing)(PurpleProtocolIM *im, PurpleConnection *connection,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 const gchar *name, PurpleIMTypingState state);
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 /*< private >*/
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 gpointer reserved[4];
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 };
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 G_BEGIN_DECLS
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 /**
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * purple_protocol_im_send:
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 * @im: The #PurpleProtocolIM instance.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 * @connection: The #PurpleConnection to use.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 * @msg: The #PurpleMessage to send.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 * Sends @msg out over @connection.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 * Returns: >= 0 on success, or < 0 on error. If 0 is returned the message
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 * should not be output locally.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 gint purple_protocol_im_send(PurpleProtocolIM *im,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 PurpleConnection *connection,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 PurpleMessage *msg);
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 /**
41010
d0abbb616bea A bunch of random libpurple documentation fixes
Gary Kramlich <grim@reaperworld.com>
parents: 40838
diff changeset
128 * purple_protocol_im_send_typing:
40507
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * @im: The #PurpleProtocolIM instance.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 * @connection: The #PurpleConversation to use.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * @name: The name of the user to send a typing notification to.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 * @state: The #PurpleIMTypingState Value.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 * If this protocol requires the #PURPLE_IM_TYPING message to be sent
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 * repeatedly to signify that the user is still typing, then the protocol
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 * should return the number of seconds to wait before sending a subsequent
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 * notification. Otherwise the protocol should return 0.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 *
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 * Returns: A quiet-period, specified in seconds, where Purple will not send
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 * any additional typing notification messages. Most protocols should
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 * return 0, which means that no additional #PURPLE_IM_TYPING messages
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 * need to be sent. If this is 5, for example, then Purple will wait
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 * five seconds, and if the Purple user is still typing then Purple
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 * will send another #PURPLE_IM_TYPING message.
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 guint purple_protocol_im_send_typing(PurpleProtocolIM *im,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 PurpleConnection *connection,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 const gchar *name,
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 PurpleIMTypingState state);
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 G_END_DECLS
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 #endif /* PURPLE_PROTOCOL_IM_H */
77d7bc9e5151 Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154

mercurial