Mercurial > pidgin
comparison src/idle.h @ 12272:3ef381cdc47e
[gaim-migrate @ 14574]
This should fix idle time reporting for all accounts. Previously it would
only work for one account because I'm dumb.
We're also doing one idleness check every 5 seconds instead of checking
for each account every 20 seconds.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 30 Nov 2005 06:03:49 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
12271:3c6675e1400e | 12272:3ef381cdc47e |
---|---|
1 /** | |
2 * @file idle.h Idle API | |
3 * @ingroup core | |
4 * | |
5 * gaim | |
6 * | |
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. | |
10 * | |
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 */ | |
25 #ifndef _GAIM_IDLE_H_ | |
26 #define _GAIM_IDLE_H_ | |
27 | |
28 /** | |
29 * Idle UI operations. | |
30 */ | |
31 typedef struct | |
32 { | |
33 time_t (*get_time_idle)(void); | |
34 } GaimIdleUiOps; | |
35 | |
36 #ifdef __cplusplus | |
37 extern "C" { | |
38 #endif | |
39 | |
40 /**************************************************************************/ | |
41 /** @name Idle API */ | |
42 /**************************************************************************/ | |
43 /*@{*/ | |
44 | |
45 /** | |
46 * Touch our idle tracker. This signifies that the user is | |
47 * 'active'. The conversation code calls this when the | |
48 * user sends an IM, for example. | |
49 */ | |
50 void gaim_idle_touch(void); | |
51 | |
52 /** | |
53 * Fake our idle time by setting the time at which our | |
54 * accounts purportedly became idle. This is used by | |
55 * the I'dle Mak'er plugin. | |
56 */ | |
57 void gaim_idle_set(time_t time); | |
58 | |
59 /*@}*/ | |
60 | |
61 /**************************************************************************/ | |
62 /** @name Idle Subsystem */ | |
63 /**************************************************************************/ | |
64 /*@{*/ | |
65 | |
66 /** | |
67 * Sets the UI operations structure to be used for idle reporting. | |
68 * | |
69 * @param ops The UI operations structure. | |
70 */ | |
71 void gaim_idle_set_ui_ops(GaimIdleUiOps *ops); | |
72 | |
73 /** | |
74 * Returns the UI operations structure used for idle reporting. | |
75 * | |
76 * @return The UI operations structure in use. | |
77 */ | |
78 GaimIdleUiOps *gaim_idle_get_ui_ops(void); | |
79 | |
80 /** | |
81 * Initializes the idle system. | |
82 */ | |
83 void gaim_idle_init(void); | |
84 | |
85 /** | |
86 * Uninitializes the idle system. | |
87 */ | |
88 void gaim_idle_uninit(void); | |
89 | |
90 /*@}*/ | |
91 | |
92 #ifdef __cplusplus | |
93 } | |
94 #endif | |
95 | |
96 #endif /* _GAIM_IDLE_H_ */ |