merge of 'd03c32ee4bd5625c28af8c8b33920944d499eef6'
[pidgin-git.git] / libpurple / idle.h
blobf01c75bc6090d6c15e25089898205ec802b36267
1 /**
2 * @file idle.h Idle API
3 * @ingroup core
4 */
6 /* purple
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
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.
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.
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
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _PURPLE_IDLE_H_
27 #define _PURPLE_IDLE_H_
29 #include <time.h>
31 /**
32 * Idle UI operations.
34 typedef struct
36 time_t (*get_time_idle)(void);
38 void (*_purple_reserved1)(void);
39 void (*_purple_reserved2)(void);
40 void (*_purple_reserved3)(void);
41 void (*_purple_reserved4)(void);
42 } PurpleIdleUiOps;
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 /**************************************************************************/
49 /** @name Idle API */
50 /**************************************************************************/
51 /*@{*/
53 /**
54 * Touch our idle tracker. This signifies that the user is
55 * 'active'. The conversation code calls this when the
56 * user sends an IM, for example.
58 void purple_idle_touch(void);
60 /**
61 * Fake our idle time by setting the time at which our
62 * accounts purportedly became idle. This is used by
63 * the I'dle Mak'er plugin.
65 void purple_idle_set(time_t time);
67 /*@}*/
69 /**************************************************************************/
70 /** @name Idle Subsystem */
71 /**************************************************************************/
72 /*@{*/
74 /**
75 * Sets the UI operations structure to be used for idle reporting.
77 * @param ops The UI operations structure.
79 void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
81 /**
82 * Returns the UI operations structure used for idle reporting.
84 * @return The UI operations structure in use.
86 PurpleIdleUiOps *purple_idle_get_ui_ops(void);
88 /**
89 * Initializes the idle system.
91 void purple_idle_init(void);
93 /**
94 * Uninitializes the idle system.
96 void purple_idle_uninit(void);
98 /*@}*/
100 #ifdef __cplusplus
102 #endif
104 #endif /* _PURPLE_IDLE_H_ */