Sat, 31 Jan 2004 02:02:46 +0000
[gaim-migrate @ 8911]
Daniel Atallah noticed a problem with my changes to the disconnect
account dialog and submitted a patch. I did this instead because
I think it's cleaner, but it might be an iota or three slower. But
really, if you think about it, what's just one little iota when you
sleep for BILLIONS of iotas a DAY?
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
1 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
2 | * @file pounce.h Buddy Pounce API |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
3 | * @ingroup core |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
4 | * |
| 4687 | 5 | * gaim |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
10 | * |
| 4687 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
25 | #ifndef _GAIM_POUNCE_H_ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
26 | #define _GAIM_POUNCE_H_ |
| 4687 | 27 | |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
28 | typedef struct _GaimPounce GaimPounce; |
|
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
29 | |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
30 | #include <glib.h> |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
31 | #include "account.h" |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
32 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
33 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
34 | * Events that trigger buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
35 | */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
36 | typedef enum |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
37 | { |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
38 | GAIM_POUNCE_NONE = 0x00, /**< No events. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
39 | GAIM_POUNCE_SIGNON = 0x01, /**< The buddy signed on. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
40 | GAIM_POUNCE_SIGNOFF = 0x02, /**< The buddy signed off. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
41 | GAIM_POUNCE_AWAY = 0x04, /**< The buddy went away. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
42 | GAIM_POUNCE_AWAY_RETURN = 0x08, /**< The buddy returned from away. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
43 | GAIM_POUNCE_IDLE = 0x10, /**< The buddy became idle. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
44 | GAIM_POUNCE_IDLE_RETURN = 0x20, /**< The buddy is no longer idle. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
45 | GAIM_POUNCE_TYPING = 0x40, /**< The buddy started typing. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
46 | GAIM_POUNCE_TYPING_STOPPED = 0x80 /**< The buddy stopped typing. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
47 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
48 | } GaimPounceEvent; |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
49 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
50 | /** A pounce callback. */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
51 | typedef void (*GaimPounceCb)(GaimPounce *, GaimPounceEvent, void *); |
| 4687 | 52 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
53 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
54 | * A buddy pounce structure. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
55 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
56 | * Buddy pounces are actions triggered by a buddy-related event. For |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
57 | * example, a sound can be played or an IM window opened when a buddy |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
58 | * signs on or returns from away. Such responses are handled in the |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
59 | * UI. The events themselves are done in the core. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
60 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
61 | struct _GaimPounce |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
62 | { |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
63 | char *ui_type; /**< The type of UI. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
64 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
65 | GaimPounceEvent events; /**< The event(s) to pounce on. */ |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
66 | GaimAccount *pouncer; /**< The user who is pouncing. */ |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
67 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
68 | char *pouncee; /**< The buddy to pounce on. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
69 | |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
70 | GHashTable *actions; /**< The registered actions. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
71 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
72 | gboolean save; /**< Whether or not the pounce should |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
73 | be saved after activation. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
74 | void *data; /**< Pounce-specific data. */ |
| 4687 | 75 | }; |
| 76 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
77 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
78 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
79 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
80 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
81 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
82 | /** @name Buddy Pounce API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
83 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
84 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
85 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
86 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
87 | * Creates a new buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
88 | * |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
89 | * @param ui_type The type of UI the pounce is for. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
90 | * @param pouncer The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
91 | * @param pouncee The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
92 | * @param event The event(s) to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
93 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
94 | * @return The new buddy pounce structure. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
95 | */ |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
96 | GaimPounce *gaim_pounce_new(const char *ui_type, GaimAccount *pouncer, |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
97 | const char *pouncee, GaimPounceEvent event); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
98 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
99 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
100 | * Destroys a buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
101 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
102 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
103 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
104 | void gaim_pounce_destroy(GaimPounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
105 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
106 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
107 | * Sets the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
108 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
109 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
110 | * @param events The events to watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
111 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
112 | void gaim_pounce_set_events(GaimPounce *pounce, GaimPounceEvent events); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
113 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
114 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
115 | * Sets the account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
116 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
117 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
118 | * @param pouncer The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
119 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
120 | void gaim_pounce_set_pouncer(GaimPounce *pounce, GaimAccount *pouncer); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
121 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
122 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
123 | * Sets the buddy a pounce should pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
124 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
125 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
126 | * @param pouncee The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
127 | */ |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
128 | void gaim_pounce_set_pouncee(GaimPounce *pounce, const char *pouncee); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
129 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
130 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
131 | * Sets whether or not the pounce should be saved after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
132 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
133 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
134 | * @param save @c TRUE if the pounce should be saved, or @c FALSE otherwise. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
135 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
136 | void gaim_pounce_set_save(GaimPounce *pounce, gboolean save); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
137 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
138 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
139 | * Registers an action type for the pounce. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
140 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
141 | * @param pounce The buddy pounce. |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
142 | * @param name The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
143 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
144 | void gaim_pounce_action_register(GaimPounce *pounce, const char *name); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
145 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
146 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
147 | * Enables or disables an action for a pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
148 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
149 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
150 | * @param action The name of the action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
151 | * @param enabled The enabled state. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
152 | */ |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
153 | void gaim_pounce_action_set_enabled(GaimPounce *pounce, const char *action, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
154 | gboolean enabled); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
155 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
156 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
157 | * Sets a value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
158 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
159 | * If @a value is @c NULL, the value will be unset. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
160 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
161 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
162 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
163 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
164 | * @param value The value. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
165 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
166 | void gaim_pounce_action_set_attribute(GaimPounce *pounce, const char *action, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
167 | const char *attr, const char *value); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
168 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
169 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
170 | * Sets the pounce-specific data. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
171 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
172 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
173 | * @param data Data specific to the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
174 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
175 | void gaim_pounce_set_data(GaimPounce *pounce, void *data); |
| 4687 | 176 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
177 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
178 | * Returns the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
179 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
180 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
181 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
182 | * @return The events the pounce is watching for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
183 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
184 | GaimPounceEvent gaim_pounce_get_events(const GaimPounce *pounce); |
| 4687 | 185 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
186 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
187 | * Returns the account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
188 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
189 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
190 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
191 | * @return The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
192 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
193 | GaimAccount *gaim_pounce_get_pouncer(const GaimPounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
194 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
195 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
196 | * Returns the buddy a pounce should pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
197 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
198 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
199 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
200 | * @return The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
201 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
202 | const char *gaim_pounce_get_pouncee(const GaimPounce *pounce); |
| 4687 | 203 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
204 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
205 | * Returns whether or not the pounce should save after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
206 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
207 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
208 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
209 | * @return @c TRUE if the pounce should be saved after execution, or |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
210 | * @c FALSE otherwise. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
211 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
212 | gboolean gaim_pounce_get_save(const GaimPounce *pounce); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
213 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
214 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
215 | * Returns whether or not an action is enabled. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
216 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
217 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
218 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
219 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
220 | * @return @c TRUE if the action is enabled, or @c FALSE otherwise. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
221 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
222 | gboolean gaim_pounce_action_is_enabled(const GaimPounce *pounce, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
223 | const char *action); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
224 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
225 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
226 | * Returns the value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
227 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
228 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
229 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
230 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
231 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
232 | * @return The attribute value, if it exists, or @c NULL. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
233 | */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
234 | const char *gaim_pounce_action_get_attribute(const GaimPounce *pounce, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
235 | const char *action, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
236 | const char *attr); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
237 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
238 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
239 | * Returns the pounce-specific data. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
240 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
241 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
242 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
243 | * @return The data specific to a buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
244 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
245 | void *gaim_pounce_get_data(const GaimPounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
246 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
247 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
248 | * Executes a pounce with the specified pouncer, pouncee, and event type. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
249 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
250 | * @param pouncer The account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
251 | * @param pouncee The buddy that is being pounced. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
252 | * @param events The events that triggered the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
253 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
254 | void gaim_pounce_execute(const GaimAccount *pouncer, const char *pouncee, |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
255 | GaimPounceEvent events); |
| 4687 | 256 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
257 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
258 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
259 | /**************************************************************************/ |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
260 | /** @name Buddy Pounce Subsystem API */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
261 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
262 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
263 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
264 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
265 | * Finds a pounce with the specified event(s) and buddy. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
266 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
267 | * @param pouncer The account to match against. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
268 | * @param pouncee The buddy to match against. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
269 | * @param events The event(s) to match against. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
270 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
271 | * @return The pounce if found, or @c NULL otherwise. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
272 | */ |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
273 | GaimPounce *gaim_find_pounce(const GaimAccount *pouncer, |
|
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
274 | const char *pouncee, GaimPounceEvent events); |
| 4687 | 275 | |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
276 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
277 | /** |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
278 | * Loads the pounces. |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
279 | * |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
280 | * @return @c TRUE if the pounces could be loaded. |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
281 | */ |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
282 | gboolean gaim_pounces_load(void); |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
283 | |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
284 | /** |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
285 | * Force an immediate write of pounces. |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
286 | */ |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
287 | void gaim_pounces_sync(void); |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
288 | |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
289 | /** |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
290 | * Registers a pounce handler for a UI. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
291 | * |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
292 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
293 | * @param cb The callback function. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
294 | * @param new_pounce The function called when a pounce is created. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
295 | * @param free_pounce The function called when a pounce is freed. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
296 | */ |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
297 | void gaim_pounces_register_handler(const char *ui, GaimPounceCb cb, |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
298 | void (*new_pounce)(GaimPounce *pounce), |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
299 | void (*free_pounce)(GaimPounce *pounce)); |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
300 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
301 | /** |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
302 | * Unregisters a pounce handle for a UI. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
303 | * |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
304 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
305 | */ |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
306 | void gaim_pounces_unregister_handler(const char *ui); |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
307 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
308 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
309 | * Returns a list of all registered buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
310 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
311 | * @return The list of buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
312 | */ |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
313 | GList *gaim_pounces_get_all(void); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
314 | |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
315 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
316 | * Returns the buddy pounce subsystem handle. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
317 | * |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
318 | * @return The subsystem handle. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
319 | */ |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
320 | void *gaim_pounces_get_handle(void); |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
321 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
322 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
323 | * Initializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
324 | */ |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
325 | void gaim_pounces_init(void); |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
326 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
327 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
328 | * Uninitializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
329 | */ |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
330 | void gaim_pounces_uninit(void); |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
331 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
332 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
333 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
334 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
335 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
336 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
337 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
338 | #endif /* _GAIM_POUNCE_H_ */ |