annotate src/pounce.h @ 13890:2bac009eaa0c

[gaim-migrate @ 16372] Some comments changes, and: 1. Don't buddy icons in Jabber 2. When clearing your buddy icon in oscar, do it the same way that WinAIM does it committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 29 Jun 2006 08:14:29 +0000
parents a9ff4499d9ce
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
1 /**
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
2 * @file pounce.h Buddy Pounce API
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
3 * @ingroup core
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
4 *
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 * gaim
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6837
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6837
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6837
diff changeset
9 * source distribution.
6837
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
10 *
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * (at your option) any later version.
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 *
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * GNU General Public License for more details.
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 *
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 */
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
25 #ifndef _GAIM_POUNCE_H_
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
26 #define _GAIM_POUNCE_H_
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
28 typedef struct _GaimPounce GaimPounce;
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
29
5866
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
30 #include <glib.h>
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
31 #include "account.h"
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
32
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
33 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
34 * Events that trigger buddy pounces.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
35 */
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
36 typedef enum
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
37 {
13842
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
38 GAIM_POUNCE_NONE = 0x000, /**< No events. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
39 GAIM_POUNCE_SIGNON = 0x001, /**< The buddy signed on. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
40 GAIM_POUNCE_SIGNOFF = 0x002, /**< The buddy signed off. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
41 GAIM_POUNCE_AWAY = 0x004, /**< The buddy went away. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
42 GAIM_POUNCE_AWAY_RETURN = 0x008, /**< The buddy returned from away. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
43 GAIM_POUNCE_IDLE = 0x010, /**< The buddy became idle. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
44 GAIM_POUNCE_IDLE_RETURN = 0x020, /**< The buddy is no longer idle. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
45 GAIM_POUNCE_TYPING = 0x040, /**< The buddy started typing. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
46 GAIM_POUNCE_TYPED = 0x080, /**< The buddy has entered text. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
47 GAIM_POUNCE_TYPING_STOPPED = 0x100, /**< The buddy stopped typing. */
a9ff4499d9ce [gaim-migrate @ 16295]
Mark Doliner <mark@kingant.net>
parents: 13783
diff changeset
48 GAIM_POUNCE_MESSAGE_RECEIVED = 0x200 /**< The buddy sent a message */
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
49
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
50 } GaimPounceEvent;
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
51
12694
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
52 typedef enum
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
53 {
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
54 GAIM_POUNCE_OPTION_NONE = 0x00, /**< No Option */
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
55 GAIM_POUNCE_OPTION_AWAY = 0x01 /**< Pounce only when away */
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
56 } GaimPounceOption;
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
57
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
58 /** A pounce callback. */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
59 typedef void (*GaimPounceCb)(GaimPounce *, GaimPounceEvent, void *);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
61 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
62 * A buddy pounce structure.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
63 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
64 * Buddy pounces are actions triggered by a buddy-related event. For
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
65 * example, a sound can be played or an IM window opened when a buddy
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
66 * signs on or returns from away. Such responses are handled in the
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
67 * UI. The events themselves are done in the core.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
68 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
69 struct _GaimPounce
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
70 {
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
71 char *ui_type; /**< The type of UI. */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
72
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
73 GaimPounceEvent events; /**< The event(s) to pounce on. */
12694
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
74 GaimPounceOption options; /**< The pounce options */
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
75 GaimAccount *pouncer; /**< The user who is pouncing. */
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
76
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
77 char *pouncee; /**< The buddy to pounce on. */
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
78
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
79 GHashTable *actions; /**< The registered actions. */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
80
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
81 gboolean save; /**< Whether or not the pounce should
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
82 be saved after activation. */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
83 void *data; /**< Pounce-specific data. */
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 };
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
86 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
87 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
88 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
89
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
90 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
91 /** @name Buddy Pounce API */
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
92 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
93 /*@{*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
94
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
95 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
96 * Creates a new buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
97 *
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
98 * @param ui_type The type of UI the pounce is for.
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
99 * @param pouncer The account that will pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
100 * @param pouncee The buddy to pounce on.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
101 * @param event The event(s) to pounce on.
13783
a539caf502b0 [gaim-migrate @ 16195]
Richard Laager <rlaager@wiktel.com>
parents: 12694
diff changeset
102 * @param option Pounce options.
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
103 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
104 * @return The new buddy pounce structure.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
105 */
5875
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
106 GaimPounce *gaim_pounce_new(const char *ui_type, GaimAccount *pouncer,
12694
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
107 const char *pouncee, GaimPounceEvent event,
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
108 GaimPounceOption option);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
109
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
110 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
111 * Destroys a buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
112 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
113 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
114 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
115 void gaim_pounce_destroy(GaimPounce *pounce);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
116
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
117 /**
8235
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
118 * Destroys all buddy pounces for the account
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
119 *
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
120 * @param account The account to remove all pounces from.
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
121 */
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
122 void gaim_pounce_destroy_all_by_account(GaimAccount *account);
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
123
63c7a16a2c09 [gaim-migrate @ 8958]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
124 /**
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
125 * Sets the events a pounce should watch for.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
126 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
127 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
128 * @param events The events to watch for.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
129 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
130 void gaim_pounce_set_events(GaimPounce *pounce, GaimPounceEvent events);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
131
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
132 /**
12694
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
133 * Sets the options for a pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
134 *
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
135 * @param pounce The buddy pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
136 * @param options The options for the pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
137 */
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
138 void gaim_pounce_set_options(GaimPounce *pounce, GaimPounceOption options);
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
139
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
140 /**
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
141 * Sets the account that will do the pouncing.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
142 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
143 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
144 * @param pouncer The account that will pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
145 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
146 void gaim_pounce_set_pouncer(GaimPounce *pounce, GaimAccount *pouncer);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
147
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
148 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
149 * Sets the buddy a pounce should pounce on.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
150 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
151 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
152 * @param pouncee The buddy to pounce on.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
153 */
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
154 void gaim_pounce_set_pouncee(GaimPounce *pounce, const char *pouncee);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
155
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
156 /**
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
157 * Sets whether or not the pounce should be saved after execution.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
158 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
159 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
160 * @param save @c TRUE if the pounce should be saved, or @c FALSE otherwise.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
161 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
162 void gaim_pounce_set_save(GaimPounce *pounce, gboolean save);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
163
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
164 /**
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
165 * Registers an action type for the pounce.
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
166 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
167 * @param pounce The buddy pounce.
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
168 * @param name The action name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
169 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
170 void gaim_pounce_action_register(GaimPounce *pounce, const char *name);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
171
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
172 /**
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
173 * Enables or disables an action for a pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
174 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
175 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
176 * @param action The name of the action.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
177 * @param enabled The enabled state.
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
178 */
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
179 void gaim_pounce_action_set_enabled(GaimPounce *pounce, const char *action,
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
180 gboolean enabled);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
181
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
182 /**
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
183 * Sets a value for an attribute in an action.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
184 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
185 * If @a value is @c NULL, the value will be unset.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
186 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
187 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
188 * @param action The action name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
189 * @param attr The attribute name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
190 * @param value The value.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
191 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
192 void gaim_pounce_action_set_attribute(GaimPounce *pounce, const char *action,
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
193 const char *attr, const char *value);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
194
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
195 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
196 * Sets the pounce-specific data.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
197 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
198 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
199 * @param data Data specific to the pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
200 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
201 void gaim_pounce_set_data(GaimPounce *pounce, void *data);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
203 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
204 * Returns the events a pounce should watch for.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
205 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
206 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
207 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
208 * @return The events the pounce is watching for.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
209 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
210 GaimPounceEvent gaim_pounce_get_events(const GaimPounce *pounce);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
211
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
212 /**
12694
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
213 * Returns the options for a pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
214 *
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
215 * @param pounce The buddy pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
216 *
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
217 * @return The options for the pounce.
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
218 */
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
219 GaimPounceOption gaim_pounce_get_options(const GaimPounce *pounce);
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
220
ebed1bbedb04 [gaim-migrate @ 15037]
Richard Laager <rlaager@wiktel.com>
parents: 10432
diff changeset
221 /**
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
222 * Returns the account that will do the pouncing.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
223 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
224 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
225 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
226 * @return The account that will pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
227 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
228 GaimAccount *gaim_pounce_get_pouncer(const GaimPounce *pounce);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
229
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
230 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
231 * Returns the buddy a pounce should pounce on.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
232 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
233 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
234 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
235 * @return The buddy to pounce on.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
236 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
237 const char *gaim_pounce_get_pouncee(const GaimPounce *pounce);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
238
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
239 /**
5864
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
240 * Returns whether or not the pounce should save after execution.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
241 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
242 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
243 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
244 * @return @c TRUE if the pounce should be saved after execution, or
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
245 * @c FALSE otherwise.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
246 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
247 gboolean gaim_pounce_get_save(const GaimPounce *pounce);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
248
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
249 /**
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
250 * Returns whether or not an action is enabled.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
251 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
252 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
253 * @param action The action name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
254 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
255 * @return @c TRUE if the action is enabled, or @c FALSE otherwise.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
256 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
257 gboolean gaim_pounce_action_is_enabled(const GaimPounce *pounce,
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
258 const char *action);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
259
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
260 /**
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
261 * Returns the value for an attribute in an action.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
262 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
263 * @param pounce The buddy pounce.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
264 * @param action The action name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
265 * @param attr The attribute name.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
266 *
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
267 * @return The attribute value, if it exists, or @c NULL.
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
268 */
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
269 const char *gaim_pounce_action_get_attribute(const GaimPounce *pounce,
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
270 const char *action,
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
271 const char *attr);
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
272
417b1001d2b1 [gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents: 5857
diff changeset
273 /**
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
274 * Returns the pounce-specific data.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
275 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
276 * @param pounce The buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
277 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
278 * @return The data specific to a buddy pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
279 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
280 void *gaim_pounce_get_data(const GaimPounce *pounce);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
281
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
282 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
283 * Executes a pounce with the specified pouncer, pouncee, and event type.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
284 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
285 * @param pouncer The account that will do the pouncing.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
286 * @param pouncee The buddy that is being pounced.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
287 * @param events The events that triggered the pounce.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
288 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
289 void gaim_pounce_execute(const GaimAccount *pouncer, const char *pouncee,
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
290 GaimPounceEvent events);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
291
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
292 /*@}*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
293
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
294 /**************************************************************************/
6837
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
295 /** @name Buddy Pounce Subsystem API */
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
296 /**************************************************************************/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
297 /*@{*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
298
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
299 /**
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
300 * Finds a pounce with the specified event(s) and buddy.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
301 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
302 * @param pouncer The account to match against.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
303 * @param pouncee The buddy to match against.
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
304 * @param events The event(s) to match against.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
305 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
306 * @return The pounce if found, or @c NULL otherwise.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
307 */
5857
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
308 GaimPounce *gaim_find_pounce(const GaimAccount *pouncer,
2fa4aa9c1885 [gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
309 const char *pouncee, GaimPounceEvent events);
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
310
5875
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
311
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
312 /**
5866
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
313 * Loads the pounces.
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
314 *
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
315 * @return @c TRUE if the pounces could be loaded.
5866
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
316 */
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
317 gboolean gaim_pounces_load(void);
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
318
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
319 /**
5875
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
320 * Registers a pounce handler for a UI.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
321 *
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
322 * @param ui The UI name.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
323 * @param cb The callback function.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
324 * @param new_pounce The function called when a pounce is created.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
325 * @param free_pounce The function called when a pounce is freed.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
326 */
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
327 void gaim_pounces_register_handler(const char *ui, GaimPounceCb cb,
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
328 void (*new_pounce)(GaimPounce *pounce),
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
329 void (*free_pounce)(GaimPounce *pounce));
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
330
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
331 /**
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
332 * Unregisters a pounce handle for a UI.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
333 *
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
334 * @param ui The UI name.
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
335 */
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
336 void gaim_pounces_unregister_handler(const char *ui);
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
337
448f2f4ca3ec [gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents: 5866
diff changeset
338 /**
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
339 * Returns a list of all registered buddy pounces.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
340 *
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
341 * @return The list of buddy pounces.
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
342 */
5866
d6b5cab288bb [gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents: 5864
diff changeset
343 GList *gaim_pounces_get_all(void);
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
344
6837
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
345 /**
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
346 * Returns the buddy pounce subsystem handle.
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
347 *
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
348 * @return The subsystem handle.
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
349 */
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
350 void *gaim_pounces_get_handle(void);
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
351
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
352 /**
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
353 * Initializes the pounces subsystem.
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
354 */
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
355 void gaim_pounces_init(void);
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
356
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
357 /**
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
358 * Uninitializes the pounces subsystem.
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
359 */
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
360 void gaim_pounces_uninit(void);
f098765ac919 [gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
361
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
362 /*@}*/
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
363
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
364 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
365 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
366 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5875
diff changeset
367
5032
cb700c07ee07 [gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents: 4687
diff changeset
368 #endif /* _GAIM_POUNCE_H_ */