Fri, 28 Sep 2007 16:22:27 +0000
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
through 133f2968e112c003cac1320d1ca0128d5da74066
|
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 |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* purple |
| 4687 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
11 | * |
| 4687 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18209
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 4687 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_POUNCE_H_ |
| 27 | #define _PURPLE_POUNCE_H_ | |
| 4687 | 28 | |
| 15884 | 29 | typedef struct _PurplePounce PurplePounce; |
|
5857
52cff8a95261
[gaim-migrate @ 6288]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
30 | |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
31 | #include <glib.h> |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
32 | #include "account.h" |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
33 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
34 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
35 | * Events that trigger buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
36 | */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
37 | typedef enum |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
38 | { |
| 15884 | 39 | PURPLE_POUNCE_NONE = 0x000, /**< No events. */ |
| 40 | PURPLE_POUNCE_SIGNON = 0x001, /**< The buddy signed on. */ | |
| 41 | PURPLE_POUNCE_SIGNOFF = 0x002, /**< The buddy signed off. */ | |
| 42 | PURPLE_POUNCE_AWAY = 0x004, /**< The buddy went away. */ | |
| 43 | PURPLE_POUNCE_AWAY_RETURN = 0x008, /**< The buddy returned from away. */ | |
| 44 | PURPLE_POUNCE_IDLE = 0x010, /**< The buddy became idle. */ | |
| 45 | PURPLE_POUNCE_IDLE_RETURN = 0x020, /**< The buddy is no longer idle. */ | |
| 46 | PURPLE_POUNCE_TYPING = 0x040, /**< The buddy started typing. */ | |
| 47 | PURPLE_POUNCE_TYPED = 0x080, /**< The buddy has entered text. */ | |
| 48 | PURPLE_POUNCE_TYPING_STOPPED = 0x100, /**< The buddy stopped typing. */ | |
| 49 | PURPLE_POUNCE_MESSAGE_RECEIVED = 0x200 /**< The buddy sent a message */ | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
50 | |
| 15884 | 51 | } PurplePounceEvent; |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
52 | |
| 12694 | 53 | typedef enum |
| 54 | { | |
| 15884 | 55 | PURPLE_POUNCE_OPTION_NONE = 0x00, /**< No Option */ |
| 56 | PURPLE_POUNCE_OPTION_AWAY = 0x01 /**< Pounce only when away */ | |
| 57 | } PurplePounceOption; | |
| 12694 | 58 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
59 | /** A pounce callback. */ |
| 15884 | 60 | typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *); |
| 4687 | 61 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
62 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
63 | * A buddy pounce structure. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
64 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
65 | * Buddy pounces are actions triggered by a buddy-related event. For |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
66 | * 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
|
67 | * 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
|
68 | * UI. The events themselves are done in the core. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
69 | */ |
| 15884 | 70 | struct _PurplePounce |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
71 | { |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
72 | char *ui_type; /**< The type of UI. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
73 | |
| 15884 | 74 | PurplePounceEvent events; /**< The event(s) to pounce on. */ |
| 75 | PurplePounceOption options; /**< The pounce options */ | |
| 76 | PurpleAccount *pouncer; /**< The user who is pouncing. */ | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
77 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
78 | char *pouncee; /**< The buddy to pounce on. */ |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
79 | |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
80 | GHashTable *actions; /**< The registered actions. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
81 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
82 | gboolean save; /**< Whether or not the pounce should |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
83 | be saved after activation. */ |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
84 | void *data; /**< Pounce-specific data. */ |
| 4687 | 85 | }; |
| 86 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
87 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
88 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
89 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
90 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
91 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
92 | /** @name Buddy Pounce API */ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
93 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
94 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
95 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
96 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
97 | * Creates a new buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
98 | * |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
99 | * @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
|
100 | * @param pouncer The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
101 | * @param pouncee The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
102 | * @param event The event(s) to pounce on. |
|
13785
4ee261bcc567
[gaim-migrate @ 16195]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12694
diff
changeset
|
103 | * @param option Pounce options. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
104 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
105 | * @return The new buddy pounce structure. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
106 | */ |
| 15884 | 107 | PurplePounce *purple_pounce_new(const char *ui_type, PurpleAccount *pouncer, |
| 108 | const char *pouncee, PurplePounceEvent event, | |
| 109 | PurplePounceOption option); | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
110 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
111 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
112 | * Destroys a buddy pounce. |
|
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 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
115 | */ |
| 15884 | 116 | void purple_pounce_destroy(PurplePounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
117 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
118 | /** |
| 8235 | 119 | * Destroys all buddy pounces for the account |
| 120 | * | |
| 121 | * @param account The account to remove all pounces from. | |
| 122 | */ | |
| 15884 | 123 | void purple_pounce_destroy_all_by_account(PurpleAccount *account); |
| 8235 | 124 | |
| 125 | /** | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
126 | * Sets the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
127 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
128 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
129 | * @param events The events to watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
130 | */ |
| 15884 | 131 | void purple_pounce_set_events(PurplePounce *pounce, PurplePounceEvent events); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
132 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
133 | /** |
| 12694 | 134 | * Sets the options for a pounce. |
| 135 | * | |
| 136 | * @param pounce The buddy pounce. | |
| 137 | * @param options The options for the pounce. | |
| 138 | */ | |
| 15884 | 139 | void purple_pounce_set_options(PurplePounce *pounce, PurplePounceOption options); |
| 12694 | 140 | |
| 141 | /** | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
142 | * Sets the account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
143 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
144 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
145 | * @param pouncer The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
146 | */ |
| 15884 | 147 | void purple_pounce_set_pouncer(PurplePounce *pounce, PurpleAccount *pouncer); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
148 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
149 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
150 | * Sets the buddy a pounce should pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
151 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
152 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
153 | * @param pouncee The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
154 | */ |
| 15884 | 155 | void purple_pounce_set_pouncee(PurplePounce *pounce, const char *pouncee); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
156 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
157 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
158 | * Sets whether or not the pounce should be saved after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
159 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
160 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
161 | * @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
|
162 | */ |
| 15884 | 163 | void purple_pounce_set_save(PurplePounce *pounce, gboolean save); |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
164 | |
|
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 | * Registers an action type for the pounce. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
167 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
168 | * @param pounce The buddy pounce. |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
169 | * @param name The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
170 | */ |
| 15884 | 171 | void purple_pounce_action_register(PurplePounce *pounce, const char *name); |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
172 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
173 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
174 | * Enables or disables an action for a pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
175 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
176 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
177 | * @param action The name of the action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
178 | * @param enabled The enabled state. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
179 | */ |
| 15884 | 180 | void purple_pounce_action_set_enabled(PurplePounce *pounce, const char *action, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
181 | gboolean enabled); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
182 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
183 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
184 | * Sets a value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
185 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
186 | * If @a value is @c NULL, the value will be unset. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
187 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
188 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
189 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
190 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
191 | * @param value The value. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
192 | */ |
| 15884 | 193 | void purple_pounce_action_set_attribute(PurplePounce *pounce, const char *action, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
194 | const char *attr, const char *value); |
|
5032
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 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
197 | * Sets the pounce-specific data. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
198 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
199 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
200 | * @param data Data specific to the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
201 | */ |
| 15884 | 202 | void purple_pounce_set_data(PurplePounce *pounce, void *data); |
| 4687 | 203 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
204 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
205 | * Returns the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
206 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
207 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
208 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
209 | * @return The events the pounce is watching for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
210 | */ |
| 15884 | 211 | PurplePounceEvent purple_pounce_get_events(const PurplePounce *pounce); |
| 4687 | 212 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
213 | /** |
| 12694 | 214 | * Returns the options for a pounce. |
| 215 | * | |
| 216 | * @param pounce The buddy pounce. | |
| 217 | * | |
| 218 | * @return The options for the pounce. | |
| 219 | */ | |
| 15884 | 220 | PurplePounceOption purple_pounce_get_options(const PurplePounce *pounce); |
| 12694 | 221 | |
| 222 | /** | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
223 | * Returns the account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
224 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
225 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
226 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
227 | * @return The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
228 | */ |
| 15884 | 229 | PurpleAccount *purple_pounce_get_pouncer(const PurplePounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
230 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
231 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
232 | * Returns the buddy a pounce should pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
233 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
234 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
235 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
236 | * @return The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
237 | */ |
| 15884 | 238 | const char *purple_pounce_get_pouncee(const PurplePounce *pounce); |
| 4687 | 239 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
240 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
241 | * Returns whether or not the pounce should save after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
242 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
243 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
244 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
245 | * @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
|
246 | * @c FALSE otherwise. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
247 | */ |
| 15884 | 248 | gboolean purple_pounce_get_save(const PurplePounce *pounce); |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
249 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
250 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
251 | * Returns whether or not an action is enabled. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
252 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
253 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
254 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
255 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
256 | * @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
|
257 | */ |
| 15884 | 258 | gboolean purple_pounce_action_is_enabled(const PurplePounce *pounce, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
259 | const char *action); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
260 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
261 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
262 | * Returns the value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
263 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
264 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
265 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
266 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
267 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
268 | * @return The attribute value, if it exists, or @c NULL. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
269 | */ |
| 15884 | 270 | const char *purple_pounce_action_get_attribute(const PurplePounce *pounce, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
271 | const char *action, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
272 | const char *attr); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
273 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
274 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
275 | * Returns the pounce-specific data. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
276 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
277 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
278 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
279 | * @return The data specific to a buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
280 | */ |
| 15884 | 281 | void *purple_pounce_get_data(const PurplePounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
282 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
283 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
284 | * Executes a pounce with the specified pouncer, pouncee, and event type. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
285 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
286 | * @param pouncer The account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
287 | * @param pouncee The buddy that is being pounced. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
288 | * @param events The events that triggered the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
289 | */ |
| 15884 | 290 | void purple_pounce_execute(const PurpleAccount *pouncer, const char *pouncee, |
| 291 | PurplePounceEvent events); | |
| 4687 | 292 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
293 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
294 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
295 | /**************************************************************************/ |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
296 | /** @name Buddy Pounce Subsystem API */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
297 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
298 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
299 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
300 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
301 | * Finds a pounce with the specified event(s) and buddy. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
302 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
303 | * @param pouncer The account to match against. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
304 | * @param pouncee The buddy to match against. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
305 | * @param events The event(s) to match against. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
306 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
307 | * @return The pounce if found, or @c NULL otherwise. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
308 | */ |
| 15884 | 309 | PurplePounce *purple_find_pounce(const PurpleAccount *pouncer, |
| 310 | const char *pouncee, PurplePounceEvent events); | |
| 4687 | 311 | |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
312 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
313 | /** |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
314 | * Loads the pounces. |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
315 | * |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
316 | * @return @c TRUE if the pounces could be loaded. |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
317 | */ |
| 15884 | 318 | gboolean purple_pounces_load(void); |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
319 | |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
320 | /** |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
321 | * Registers a pounce handler for a UI. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
322 | * |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
323 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
324 | * @param cb The callback function. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
325 | * @param new_pounce The function called when a pounce is created. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
326 | * @param free_pounce The function called when a pounce is freed. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
327 | */ |
| 15884 | 328 | void purple_pounces_register_handler(const char *ui, PurplePounceCb cb, |
| 329 | void (*new_pounce)(PurplePounce *pounce), | |
| 330 | void (*free_pounce)(PurplePounce *pounce)); | |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
331 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
332 | /** |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
333 | * Unregisters a pounce handle for a UI. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
334 | * |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
335 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
336 | */ |
| 15884 | 337 | void purple_pounces_unregister_handler(const char *ui); |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
338 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
339 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
340 | * Returns a list of all registered buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
341 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
342 | * @return The list of buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
343 | */ |
| 15884 | 344 | GList *purple_pounces_get_all(void); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
345 | |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
346 | /** |
|
18209
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
347 | * Returns a list of registered buddy pounces for the ui-type. |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
348 | * |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
349 | * @param ui The ID of the UI using the core. |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
350 | * |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
351 | * @return The list of buddy pounces. The list should be freed by |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
352 | * the caller when it's no longer used. |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
353 | * @since 2.1.0 |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
354 | */ |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
355 | GList *purple_pounces_get_all_for_ui(const char *ui); |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
356 | |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
357 | /** |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
358 | * Returns the buddy pounce subsystem handle. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
359 | * |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
360 | * @return The subsystem handle. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
361 | */ |
| 15884 | 362 | void *purple_pounces_get_handle(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
363 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
364 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
365 | * Initializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
366 | */ |
| 15884 | 367 | void purple_pounces_init(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
368 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
369 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
370 | * Uninitializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
371 | */ |
| 15884 | 372 | void purple_pounces_uninit(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
373 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
374 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
375 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
376 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
377 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
378 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
379 | |
| 15884 | 380 | #endif /* _PURPLE_POUNCE_H_ */ |