Mercurial > hg > xmms-sid
comparison src/xs_length.h @ 14:f5d82424b0ed
Made song-length database support FINALLY work!
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Jun 2003 18:00:03 +0000 |
parents | 4bb09e405eab |
children | ac2972a7ccd5 |
comparison
equal
deleted
inserted
replaced
13:7e664541ea36 | 14:f5d82424b0ed |
---|---|
3 | 3 |
4 #ifdef __cplusplus | 4 #ifdef __cplusplus |
5 extern "C" { | 5 extern "C" { |
6 #endif | 6 #endif |
7 | 7 |
8 #include <glib.h> | |
9 #include "xs_md5.h" | |
8 | 10 |
9 /* | 11 /* |
10 * Defines and typedefs | 12 * Defines and typedefs |
11 */ | 13 */ |
12 #define XS_HASH_LENGTH (16) | 14 #define XS_STIL_MAXENTRY (32) |
13 #define XS_HASH_LENGTH_CH (XS_HASH_LENGTH * 2) | 15 typedef struct dbnode { |
16 t_xs_md5hash md5Hash; /* 128-bit MD5 hash-digest */ | |
17 gint nLengths; /* Number of lengths */ | |
18 gint32 sLengths[XS_STIL_MAXENTRY]; | |
19 /* Lengths in seconds */ | |
14 | 20 |
15 typedef guint8 t_xs_hash[XS_HASH_LENGTH]; | 21 struct dbnode *pNext; |
16 | |
17 typedef struct { | |
18 t_xs_hash hashcode; /* 128-bit MD5 hash-digest */ | |
19 gint nlengths; /* Number of lengths */ | |
20 long int lengths[XMMS_SID_STIL_MAXENTRY]; | |
21 /* Lengths in seconds */ | |
22 } t_xs_dbentry; | 22 } t_xs_dbentry; |
23 | 23 |
24 | 24 |
25 /* | 25 /* |
26 * Functions | 26 * Functions |
27 */ | 27 */ |
28 gint32 xs_get_length(gchar *, gint); | 28 gint xs_songlen_init(void); /* Initialize songlength subsystem */ |
29 gint xs_songlen_close(void); /* Close/shutdown */ | |
30 | |
31 gint32 xs_songlen_get(gchar *, gint); /* Get length in seconds */ | |
29 | 32 |
30 | 33 |
31 #ifdef __cplusplus | 34 #ifdef __cplusplus |
32 } | 35 } |
33 #endif | 36 #endif |