Wed, 19 Oct 2016 13:00:17 -0400
win32: Explicitly use ANSI versions of the WSALookup APIs
|
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 | /** | |
|
31655
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
126 | * Destroys all buddy pounces for a buddy |
|
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
127 | * |
|
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
128 | * @param buddy The buddy whose pounces are to be removed |
|
31656
0a950c84d9a6
Tweak kartikmohta's patch a bit to use accessors instead of directly accessing
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
31655
diff
changeset
|
129 | * |
|
0a950c84d9a6
Tweak kartikmohta's patch a bit to use accessors instead of directly accessing
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
31655
diff
changeset
|
130 | * @since 2.8.0 |
|
31655
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
131 | */ |
|
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
132 | void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy); |
|
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
133 | |
|
23ee3cdf91f2
Delete buddy pounces when removing a buddy. Fixes #1131.
Kartik Mohta <kartikmohta@gmail.com>
parents:
20971
diff
changeset
|
134 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
135 | * Sets the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
136 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
137 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
138 | * @param events The events to watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
139 | */ |
| 15884 | 140 | void purple_pounce_set_events(PurplePounce *pounce, PurplePounceEvent events); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
141 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
142 | /** |
| 12694 | 143 | * Sets the options for a pounce. |
| 144 | * | |
| 145 | * @param pounce The buddy pounce. | |
| 146 | * @param options The options for the pounce. | |
| 147 | */ | |
| 15884 | 148 | void purple_pounce_set_options(PurplePounce *pounce, PurplePounceOption options); |
| 12694 | 149 | |
| 150 | /** | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
151 | * Sets the account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
152 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
153 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
154 | * @param pouncer The account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
155 | */ |
| 15884 | 156 | void purple_pounce_set_pouncer(PurplePounce *pounce, PurpleAccount *pouncer); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
157 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
158 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
159 | * Sets the buddy a pounce should pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
160 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
161 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
162 | * @param pouncee The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
163 | */ |
| 15884 | 164 | void purple_pounce_set_pouncee(PurplePounce *pounce, const char *pouncee); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
165 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
166 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
167 | * Sets whether or not the pounce should be saved after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
168 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
169 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
170 | * @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
|
171 | */ |
| 15884 | 172 | void purple_pounce_set_save(PurplePounce *pounce, gboolean save); |
|
5864
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 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
175 | * Registers an action type for the pounce. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
176 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
177 | * @param pounce The buddy pounce. |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
178 | * @param name The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
179 | */ |
| 15884 | 180 | void purple_pounce_action_register(PurplePounce *pounce, const char *name); |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
181 | |
|
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 | * Enables or disables an action for a pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
184 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
185 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
186 | * @param action The name of the action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
187 | * @param enabled The enabled state. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
188 | */ |
| 15884 | 189 | 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
|
190 | gboolean enabled); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
191 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
192 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
193 | * Sets a value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
194 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
195 | * If @a value is @c NULL, the value will be unset. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
196 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
197 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
198 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
199 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
200 | * @param value The value. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
201 | */ |
| 15884 | 202 | 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
|
203 | const char *attr, const char *value); |
|
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 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
206 | * Sets the pounce-specific data. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
207 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
208 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
209 | * @param data Data specific to the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
210 | */ |
| 15884 | 211 | void purple_pounce_set_data(PurplePounce *pounce, void *data); |
| 4687 | 212 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
213 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
214 | * Returns the events a pounce should watch for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
215 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
216 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
217 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
218 | * @return The events the pounce is watching for. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
219 | */ |
| 15884 | 220 | PurplePounceEvent purple_pounce_get_events(const PurplePounce *pounce); |
| 4687 | 221 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
222 | /** |
| 12694 | 223 | * Returns the options for a pounce. |
| 224 | * | |
| 225 | * @param pounce The buddy pounce. | |
| 226 | * | |
| 227 | * @return The options for the pounce. | |
| 228 | */ | |
| 15884 | 229 | PurplePounceOption purple_pounce_get_options(const PurplePounce *pounce); |
| 12694 | 230 | |
| 231 | /** | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
232 | * Returns the account that will do the pouncing. |
|
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 account that will pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
237 | */ |
| 15884 | 238 | PurpleAccount *purple_pounce_get_pouncer(const PurplePounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
239 | |
|
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 | * Returns the buddy a pounce should pounce on. |
|
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 | * @param pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
244 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
245 | * @return The buddy to pounce on. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
246 | */ |
| 15884 | 247 | const char *purple_pounce_get_pouncee(const PurplePounce *pounce); |
| 4687 | 248 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
249 | /** |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
250 | * Returns whether or not the pounce should save after execution. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
251 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
252 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
253 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
254 | * @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
|
255 | * @c FALSE otherwise. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
256 | */ |
| 15884 | 257 | gboolean purple_pounce_get_save(const PurplePounce *pounce); |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
258 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
259 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
260 | * Returns whether or not an action is enabled. |
|
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 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
263 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
264 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
265 | * @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
|
266 | */ |
| 15884 | 267 | gboolean purple_pounce_action_is_enabled(const PurplePounce *pounce, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
268 | const char *action); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
269 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
270 | /** |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
271 | * Returns the value for an attribute in an action. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
272 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
273 | * @param pounce The buddy pounce. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
274 | * @param action The action name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
275 | * @param attr The attribute name. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
276 | * |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
277 | * @return The attribute value, if it exists, or @c NULL. |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
278 | */ |
| 15884 | 279 | const char *purple_pounce_action_get_attribute(const PurplePounce *pounce, |
|
5864
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
280 | const char *action, |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
281 | const char *attr); |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
282 | |
|
86822afeeab0
[gaim-migrate @ 6295]
Christian Hammond <chipx86@chipx86.com>
parents:
5857
diff
changeset
|
283 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
284 | * Returns the pounce-specific data. |
|
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 pounce The buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
287 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
288 | * @return The data specific to a buddy pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
289 | */ |
| 15884 | 290 | void *purple_pounce_get_data(const PurplePounce *pounce); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
291 | |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
292 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
293 | * Executes a pounce with the specified pouncer, pouncee, and event type. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
294 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
295 | * @param pouncer The account that will do the pouncing. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
296 | * @param pouncee The buddy that is being pounced. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
297 | * @param events The events that triggered the pounce. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
298 | */ |
| 15884 | 299 | void purple_pounce_execute(const PurpleAccount *pouncer, const char *pouncee, |
| 300 | PurplePounceEvent events); | |
| 4687 | 301 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
302 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
303 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
304 | /**************************************************************************/ |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
305 | /** @name Buddy Pounce Subsystem API */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
306 | /**************************************************************************/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
307 | /*@{*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
308 | |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
309 | /** |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
310 | * Finds a pounce with the specified event(s) and buddy. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
311 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
312 | * @param pouncer The account to match against. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
313 | * @param pouncee The buddy to match against. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
314 | * @param events The event(s) to match against. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
315 | * |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
316 | * @return The pounce if found, or @c NULL otherwise. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
317 | */ |
| 15884 | 318 | PurplePounce *purple_find_pounce(const PurpleAccount *pouncer, |
| 319 | const char *pouncee, PurplePounceEvent events); | |
| 4687 | 320 | |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
321 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
322 | /** |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
323 | * Loads the pounces. |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
324 | * |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
325 | * @return @c TRUE if the pounces could be loaded. |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
326 | */ |
| 15884 | 327 | gboolean purple_pounces_load(void); |
|
5866
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
328 | |
|
5caedbcd1bb7
[gaim-migrate @ 6297]
Christian Hammond <chipx86@chipx86.com>
parents:
5864
diff
changeset
|
329 | /** |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
330 | * Registers a pounce handler for a UI. |
|
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 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
333 | * @param cb The callback function. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
334 | * @param new_pounce The function called when a pounce is created. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
335 | * @param free_pounce The function called when a pounce is freed. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
336 | */ |
| 15884 | 337 | void purple_pounces_register_handler(const char *ui, PurplePounceCb cb, |
| 338 | void (*new_pounce)(PurplePounce *pounce), | |
| 339 | void (*free_pounce)(PurplePounce *pounce)); | |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
340 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
341 | /** |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
342 | * Unregisters a pounce handle for a UI. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
343 | * |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
344 | * @param ui The UI name. |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
345 | */ |
| 15884 | 346 | void purple_pounces_unregister_handler(const char *ui); |
|
5875
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
347 | |
|
493a921c0378
[gaim-migrate @ 6307]
Christian Hammond <chipx86@chipx86.com>
parents:
5866
diff
changeset
|
348 | /** |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
349 | * Returns a list of all registered buddy pounces. |
|
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
350 | * |
|
20971
b5e1eb080f33
Replace a bunch of @return markers with @constreturn markers. I believe these
Etan Reisner <deryni@pidgin.im>
parents:
20147
diff
changeset
|
351 | * @constreturn The list of buddy pounces. |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
352 | */ |
| 15884 | 353 | GList *purple_pounces_get_all(void); |
|
5032
2276c67b0243
[gaim-migrate @ 5375]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
354 | |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
355 | /** |
|
18209
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
356 | * 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
|
357 | * |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
358 | * @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
|
359 | * |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
360 | * @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
|
361 | * 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
|
362 | * @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
|
363 | */ |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
364 | 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
|
365 | |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
366 | /** |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
367 | * Returns the buddy pounce subsystem handle. |
|
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 | * @return The subsystem handle. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
370 | */ |
| 15884 | 371 | void *purple_pounces_get_handle(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
372 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
373 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
374 | * Initializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
375 | */ |
| 15884 | 376 | void purple_pounces_init(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
377 | |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
378 | /** |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
379 | * Uninitializes the pounces subsystem. |
|
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
380 | */ |
| 15884 | 381 | void purple_pounces_uninit(void); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
382 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
383 | /*@}*/ |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
384 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
385 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
386 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
387 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5875
diff
changeset
|
388 | |
| 15884 | 389 | #endif /* _PURPLE_POUNCE_H_ */ |