File: includes.h

package info (click to toggle)
xmms-stats 0.2-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 116 kB
  • ctags: 74
  • sloc: ansic: 433; makefile: 70; php: 56
file content (58 lines) | stat: -rw-r--r-- 1,609 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 dated June, 1991.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */


#include <gtk/gtk.h>
#include <sqlite.h>

#define PLUGIN_NAME "XMMS-Stats"

/* the configuration file (xmms handles it very comfortably for us) */
#define CONFIGFILE "/.xmms/xmms-stats"
#define DATABASE_PATH "/.xmms/xmms_stats.db"

/* length for a song name*/
#define BUFSIZE 256

/* the structure for a record */
struct RecordStat{
	char title[BUFSIZE];
	int timelength;
	int timelistening;
};

extern int fd;
extern int hits;
extern int listen_time;
extern int rc;
extern sqlite *db;
extern int delete_timer;

/* the functions */
void *xmmsstats_thread(void *args);
void xmmsstats_init(void);
void xmmsstats_about(void);
void xmmsstats_config(void);
void xmmsstats_config_save(GtkWidget *wid, gpointer data);
void xmmsstats_cleanup(void);
void read_config (GtkWidget *wid, gpointer data);
void update_struct(struct RecordStat* rs, int pos);
void insert_data(struct RecordStat record);

/* sqlite_functions*/
void update_db();