diff 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
line wrap: on
line diff
--- a/src/xs_length.h	Wed Jun 04 14:04:02 2003 +0000
+++ b/src/xs_length.h	Wed Jun 04 18:00:03 2003 +0000
@@ -5,27 +5,30 @@
 extern "C" {
 #endif
 
+#include <glib.h>
+#include "xs_md5.h"
 
 /*
  * Defines and typedefs
  */
-#define XS_HASH_LENGTH		(16)
-#define XS_HASH_LENGTH_CH	(XS_HASH_LENGTH * 2)
-
-typedef guint8 t_xs_hash[XS_HASH_LENGTH];
+#define XS_STIL_MAXENTRY	(32)
+typedef struct dbnode {
+	t_xs_md5hash	md5Hash;	/* 128-bit MD5 hash-digest */
+	gint		nLengths;	/* Number of lengths */
+	gint32		sLengths[XS_STIL_MAXENTRY];	
+					/* Lengths in seconds */
 
-typedef struct {
-	t_xs_hash	hashcode;	/* 128-bit MD5 hash-digest */
-	gint		nlengths;	/* Number of lengths */
-	long int	lengths[XMMS_SID_STIL_MAXENTRY];	
-					/* Lengths in seconds */
+	struct dbnode *pNext;
 } t_xs_dbentry;
 
 
 /*
  * Functions
  */
-gint32	xs_get_length(gchar *, gint);
+gint	xs_songlen_init(void);	/* Initialize songlength subsystem */
+gint	xs_songlen_close(void); /* Close/shutdown */
+
+gint32	xs_songlen_get(gchar *, gint); /* Get length in seconds */
 
 
 #ifdef __cplusplus