home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / libpurple / idle.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-04  |  2.6 KB  |  102 lines

  1. /**
  2.  * @file idle.h Idle API
  3.  * @ingroup core
  4.  *
  5.  * purple
  6.  *
  7.  * Purple 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 _PURPLE_IDLE_H_
  26. #define _PURPLE_IDLE_H_
  27.  
  28. /**
  29.  * Idle UI operations.
  30.  */
  31. typedef struct
  32. {
  33.     time_t (*get_time_idle)(void);
  34.  
  35.     void (*_purple_reserved1)(void);
  36.     void (*_purple_reserved2)(void);
  37.     void (*_purple_reserved3)(void);
  38.     void (*_purple_reserved4)(void);
  39. } PurpleIdleUiOps;
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. /**************************************************************************/
  46. /** @name Idle API                                                        */
  47. /**************************************************************************/
  48. /*@{*/
  49.  
  50. /**
  51.  * Touch our idle tracker.  This signifies that the user is
  52.  * 'active'.  The conversation code calls this when the
  53.  * user sends an IM, for example.
  54.  */
  55. void purple_idle_touch(void);
  56.  
  57. /**
  58.  * Fake our idle time by setting the time at which our
  59.  * accounts purportedly became idle.  This is used by
  60.  * the I'dle Mak'er plugin.
  61.  */
  62. void purple_idle_set(time_t time);
  63.  
  64. /*@}*/
  65.  
  66. /**************************************************************************/
  67. /** @name Idle Subsystem                                                  */
  68. /**************************************************************************/
  69. /*@{*/
  70.  
  71. /**
  72.  * Sets the UI operations structure to be used for idle reporting.
  73.  *
  74.  * @param ops The UI operations structure.
  75.  */
  76. void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
  77.  
  78. /**
  79.  * Returns the UI operations structure used for idle reporting.
  80.  *
  81.  * @return The UI operations structure in use.
  82.  */
  83. PurpleIdleUiOps *purple_idle_get_ui_ops(void);
  84.  
  85. /**
  86.  * Initializes the idle system.
  87.  */
  88. void purple_idle_init(void);
  89.  
  90. /**
  91.  * Uninitializes the idle system.
  92.  */
  93. void purple_idle_uninit(void);
  94.  
  95. /*@}*/
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif /* _PURPLE_IDLE_H_ */
  102.