14266
|
1 /*
|
|
2 * Contact Availability Prediction plugin for Gaim
|
|
3 *
|
|
4 * Copyright (C) 2006 Geoffrey Foster.
|
|
5 *
|
|
6 * This program is free software; you can redistribute it and/or
|
|
7 * modify it under the terms of the GNU General Public License as
|
|
8 * published by the Free Software Foundation; either version 2 of the
|
|
9 * License, or (at your option) any later version.
|
|
10 *
|
|
11 * This program is distributed in the hope that it will be useful, but
|
|
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 * General Public License for more details.
|
|
15 *
|
|
16 * You should have received a copy of the GNU General Public License
|
|
17 * along with this program; if not, write to the Free Software
|
|
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
19 * 02111-1307, USA.
|
|
20 */
|
|
21
|
|
22 #ifndef _CAP_STATISTICS_H_
|
|
23 #define _CAP_STATISTICS_H_
|
|
24
|
|
25 #include "blist.h"
|
|
26 #include <gdk/gdk.h>
|
|
27 #include <glib.h>
|
|
28 #include <time.h>
|
|
29
|
|
30 /* Data Structures */
|
|
31 typedef struct _CapStatistics CapStatistics;
|
|
32 typedef struct _CapPrediction CapPrediction;
|
|
33
|
|
34 struct _CapStatistics {
|
|
35 gdouble minute_stats[1440];
|
|
36 CapPrediction *prediction;
|
|
37 time_t last_seen; /**< The time buddy was last seen online */
|
|
38 time_t last_message; /**< The time you last messaged them */
|
|
39 const char *last_message_status_id; /**< The status id of the buddy when you last messaged them */
|
|
40 const char *last_status_id; /**< The last seen status id of the buddy */
|
|
41 GaimBuddy *buddy; /**< The buddy that these statistics are associated with */
|
|
42 guint timeout_source_id;
|
|
43 };
|
|
44
|
|
45 struct _CapPrediction {
|
|
46 double probability;
|
|
47 time_t generated_at;
|
|
48 };
|
|
49
|
|
50 #endif
|