3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef _PURPLE_IDLE_H_
23 #define _PURPLE_IDLE_H_
26 * @section_id: libpurple-idle
27 * @short_description: <filename>idle.h</filename>
32 #include <glib-object.h>
34 #define PURPLE_TYPE_IDLE_UI_OPS (purple_idle_ui_ops_get_type())
36 typedef struct _PurpleIdleUiOps PurpleIdleUiOps
;
43 struct _PurpleIdleUiOps
45 time_t (*get_time_idle
)(void);
48 void (*_purple_reserved1
)(void);
49 void (*_purple_reserved2
)(void);
50 void (*_purple_reserved3
)(void);
51 void (*_purple_reserved4
)(void);
56 /**************************************************************************/
58 /**************************************************************************/
63 * Touch our idle tracker. This signifies that the user is
64 * 'active'. The conversation code calls this when the
65 * user sends an IM, for example.
67 void purple_idle_touch(void);
72 * Fake our idle time by setting the time at which our
73 * accounts purportedly became idle. This is used by
74 * the I'dle Mak'er plugin.
76 void purple_idle_set(time_t time
);
78 /**************************************************************************/
80 /**************************************************************************/
83 * purple_idle_ui_ops_get_type:
85 * Returns: The #GType for the #PurpleIdleUiOps boxed structure.
87 GType
purple_idle_ui_ops_get_type(void);
90 * purple_idle_set_ui_ops:
91 * @ops: The UI operations structure.
93 * Sets the UI operations structure to be used for idle reporting.
95 void purple_idle_set_ui_ops(PurpleIdleUiOps
*ops
);
98 * purple_idle_get_ui_ops:
100 * Returns the UI operations structure used for idle reporting.
102 * Returns: The UI operations structure in use.
104 PurpleIdleUiOps
*purple_idle_get_ui_ops(void);
109 * Initializes the idle system.
111 void purple_idle_init(void);
114 * purple_idle_uninit:
116 * Uninitializes the idle system.
118 void purple_idle_uninit(void);
122 #endif /* _PURPLE_IDLE_H_ */