Mercurial > pidgin
annotate src/pounce.h @ 5194:83b518f3feda
[gaim-migrate @ 5560]
Newsssss
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 23 Apr 2003 05:04:28 +0000 |
parents | 4691c5936c01 |
children | 9eb5b13fd412 |
rev | line source |
---|---|
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
1 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
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 | 5 * gaim |
6 * | |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
7 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org> |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
8 * |
4687 | 9 * This program is free software; you can redistribute it and/or modify |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
23 #ifndef _GAIM_POUNCE_H_ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
24 #define _GAIM_POUNCE_H_ |
4687 | 25 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
26 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
27 * Events that trigger buddy pounces. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
28 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
29 typedef enum |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
30 { |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
31 GAIM_POUNCE_NONE = 0x00, /**< No events. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
32 GAIM_POUNCE_SIGNON = 0x01, /**< The buddy signed on. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
33 GAIM_POUNCE_SIGNOFF = 0x02, /**< The buddy signed off. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
34 GAIM_POUNCE_AWAY = 0x04, /**< The buddy went away. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
35 GAIM_POUNCE_AWAY_RETURN = 0x08, /**< The buddy returned from away. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
36 GAIM_POUNCE_IDLE = 0x10, /**< The buddy became idle. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
37 GAIM_POUNCE_IDLE_RETURN = 0x20, /**< The buddy is no longer idle. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
38 GAIM_POUNCE_TYPING = 0x40, /**< The buddy started typing. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
39 GAIM_POUNCE_TYPING_STOPPED = 0x80 /**< The buddy stopped typing. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
40 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
41 } GaimPounceEvent; |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
42 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
43 struct gaim_pounce; |
4687 | 44 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
45 /** A pounce callback. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
46 typedef void (*gaim_pounce_cb)(struct gaim_pounce *, GaimPounceEvent, void *); |
4687 | 47 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
48 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
49 * A buddy pounce structure. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
50 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
51 * Buddy pounces are actions triggered by a buddy-related event. For |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
52 * 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
|
53 * 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
|
54 * UI. The events themselves are done in the core. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
55 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
56 struct gaim_pounce |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
57 { |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
58 GaimPounceEvent events; /**< The event(s) to pounce on. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
59 struct gaim_account *pouncer; /**< The user who is pouncing. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
60 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
61 char *pouncee; /**< The buddy to pounce on. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
62 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
63 gaim_pounce_cb callback; /**< The callback function to call when the |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
64 event is triggered. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
65 void (*free)(void *data); /**< The data free function. */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
66 void *data; /**< Pounce-specific data. */ |
4687 | 67 }; |
68 | |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
69 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
70 * Creates a new buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
71 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
72 * @param pouncer The account that will pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
73 * @param pouncee The buddy to pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
74 * @param event The event(s) to pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
75 * @param cb The callback function to call when the pounce is triggered. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
76 * @param data Pounce-specific data. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
77 * @param free The function to free the pounce-specific data. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
78 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
79 * @return The new buddy pounce structure. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
80 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
81 struct gaim_pounce *gaim_pounce_new(struct gaim_account *pouncer, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
82 const char *pouncee, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
83 GaimPounceEvent event, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
84 gaim_pounce_cb cb, void *data, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
85 void (*free)(void *)); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
86 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
87 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
88 * Destroys a buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
89 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
90 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
91 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
92 void gaim_pounce_destroy(struct gaim_pounce *pounce); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
93 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
94 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
95 * Sets the events a pounce should watch for. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
96 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
97 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
98 * @param events The events to watch for. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
99 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
100 void gaim_pounce_set_events(struct gaim_pounce *pounce, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
101 GaimPounceEvent events); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
102 |
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 * Sets the account that will do the pouncing. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
105 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
106 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
107 * @param pouncer The account that will pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
108 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
109 void gaim_pounce_set_pouncer(struct gaim_pounce *pounce, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
110 struct gaim_account *pouncer); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
111 |
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 * Sets the buddy a pounce should pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
114 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
115 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
116 * @param pouncee The buddy to pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
117 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
118 void gaim_pounce_set_pouncee(struct gaim_pounce *pounce, const char *buddy); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
119 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
120 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
121 * Sets the callback function to call when the pounce event is triggered. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
122 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
123 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
124 * @param cb The callback function. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
125 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
126 void gaim_pounce_set_callback(struct gaim_pounce *pounce, gaim_pounce_cb cb); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
127 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
128 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
129 * Sets the pounce-specific data. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
130 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
131 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
132 * @param data Data specific to the pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
133 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
134 void gaim_pounce_set_data(struct gaim_pounce *pounce, void *data); |
4687 | 135 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
136 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
137 * Returns the events a pounce should watch for. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
138 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
139 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
140 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
141 * @return The events the pounce is watching for. |
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 GaimPounceEvent gaim_pounce_get_events(const struct gaim_pounce *pounce); |
4687 | 144 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
145 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
146 * Returns the account that will do the pouncing. |
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 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
149 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
150 * @return The account that will pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
151 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
152 struct gaim_account *gaim_pounce_get_pouncer(const struct gaim_pounce *pounce); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
153 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
154 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
155 * Returns the buddy a pounce should pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
156 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
157 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
158 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
159 * @return The buddy to pounce on. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
160 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
161 const char *gaim_pounce_get_pouncee(const struct gaim_pounce *pounce); |
4687 | 162 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
163 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
164 * Returns the pounce-specific data. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
165 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
166 * @param pounce The buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
167 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
168 * @return The data specific to a buddy pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
169 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
170 void *gaim_pounce_get_data(const struct gaim_pounce *pounce); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
171 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
172 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
173 * Executes a pounce with the specified pouncer, pouncee, and event type. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
174 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
175 * @param pouncer The account that will do the pouncing. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
176 * @param pouncee The buddy that is being pounced. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
177 * @param events The events that triggered the pounce. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
178 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
179 void gaim_pounce_execute(const struct gaim_account *pouncer, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
180 const char *pouncee, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
181 GaimPounceEvent events); |
4687 | 182 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
183 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
184 * Finds a pounce with the specified event(s) and buddy. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
185 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
186 * @param pouncer The account to match against. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
187 * @param buddy The buddy to match against. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
188 * @param events The event(s) to match against. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
189 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
190 * @return The pounce if found, or @c NULL otherwise. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
191 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
192 struct gaim_pounce *gaim_find_pounce(const struct gaim_account *pouncer, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
193 const char *pouncee, |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
194 GaimPounceEvent events); |
4687 | 195 |
5032
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
196 /** |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
197 * Returns a list of all registered buddy pounces. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
198 * |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
199 * @return The list of buddy pounces. |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
200 */ |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
201 GList *gaim_get_pounces(void); |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
202 |
cb700c07ee07
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
203 #endif /* _GAIM_POUNCE_H_ */ |