Frameworks/libpurple.framework/Versions/0.6.2/Headers/idle.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 1739 Frameworks/libpurple.framework/Versions/0.6.0/Headers/idle.h@8b0daad9656c
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
Evan@653
     1
/**
Evan@653
     2
 * @file idle.h Idle API
Evan@653
     3
 * @ingroup core
Evan@653
     4
 */
Evan@653
     5
Evan@653
     6
/* purple
Evan@653
     7
 *
Evan@653
     8
 * Purple is the legal property of its developers, whose names are too numerous
Evan@653
     9
 * to list here.  Please refer to the COPYRIGHT file distributed with this
Evan@653
    10
 * source distribution.
Evan@653
    11
 *
Evan@653
    12
 * This program is free software; you can redistribute it and/or modify
Evan@653
    13
 * it under the terms of the GNU General Public License as published by
Evan@653
    14
 * the Free Software Foundation; either version 2 of the License, or
Evan@653
    15
 * (at your option) any later version.
Evan@653
    16
 *
Evan@653
    17
 * This program is distributed in the hope that it will be useful,
Evan@653
    18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Evan@653
    19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Evan@653
    20
 * GNU General Public License for more details.
Evan@653
    21
 *
Evan@653
    22
 * You should have received a copy of the GNU General Public License
Evan@653
    23
 * along with this program; if not, write to the Free Software
Evan@653
    24
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
Evan@653
    25
 */
Evan@653
    26
#ifndef _PURPLE_IDLE_H_
Evan@653
    27
#define _PURPLE_IDLE_H_
Evan@653
    28
zacw@2592
    29
#include <time.h>
zacw@2592
    30
Evan@653
    31
/**
Evan@653
    32
 * Idle UI operations.
Evan@653
    33
 */
Evan@653
    34
typedef struct
Evan@653
    35
{
Evan@653
    36
	time_t (*get_time_idle)(void);
Evan@653
    37
Evan@653
    38
	void (*_purple_reserved1)(void);
Evan@653
    39
	void (*_purple_reserved2)(void);
Evan@653
    40
	void (*_purple_reserved3)(void);
Evan@653
    41
	void (*_purple_reserved4)(void);
Evan@653
    42
} PurpleIdleUiOps;
Evan@653
    43
Evan@653
    44
#ifdef __cplusplus
Evan@653
    45
extern "C" {
Evan@653
    46
#endif
Evan@653
    47
Evan@653
    48
/**************************************************************************/
Evan@653
    49
/** @name Idle API                                                        */
Evan@653
    50
/**************************************************************************/
Evan@653
    51
/*@{*/
Evan@653
    52
Evan@653
    53
/**
Evan@653
    54
 * Touch our idle tracker.  This signifies that the user is
Evan@653
    55
 * 'active'.  The conversation code calls this when the
Evan@653
    56
 * user sends an IM, for example.
Evan@653
    57
 */
Evan@653
    58
void purple_idle_touch(void);
Evan@653
    59
Evan@653
    60
/**
Evan@653
    61
 * Fake our idle time by setting the time at which our
Evan@653
    62
 * accounts purportedly became idle.  This is used by
Evan@653
    63
 * the I'dle Mak'er plugin.
Evan@653
    64
 */
Evan@653
    65
void purple_idle_set(time_t time);
Evan@653
    66
Evan@653
    67
/*@}*/
Evan@653
    68
Evan@653
    69
/**************************************************************************/
Evan@653
    70
/** @name Idle Subsystem                                                  */
Evan@653
    71
/**************************************************************************/
Evan@653
    72
/*@{*/
Evan@653
    73
Evan@653
    74
/**
Evan@653
    75
 * Sets the UI operations structure to be used for idle reporting.
Evan@653
    76
 *
Evan@653
    77
 * @param ops The UI operations structure.
Evan@653
    78
 */
Evan@653
    79
void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
Evan@653
    80
Evan@653
    81
/**
Evan@653
    82
 * Returns the UI operations structure used for idle reporting.
Evan@653
    83
 *
Evan@653
    84
 * @return The UI operations structure in use.
Evan@653
    85
 */
Evan@653
    86
PurpleIdleUiOps *purple_idle_get_ui_ops(void);
Evan@653
    87
Evan@653
    88
/**
Evan@653
    89
 * Initializes the idle system.
Evan@653
    90
 */
Evan@653
    91
void purple_idle_init(void);
Evan@653
    92
Evan@653
    93
/**
Evan@653
    94
 * Uninitializes the idle system.
Evan@653
    95
 */
Evan@653
    96
void purple_idle_uninit(void);
Evan@653
    97
Evan@653
    98
/*@}*/
Evan@653
    99
Evan@653
   100
#ifdef __cplusplus
Evan@653
   101
}
Evan@653
   102
#endif
Evan@653
   103
Evan@653
   104
#endif /* _PURPLE_IDLE_H_ */