summaryrefslogtreecommitdiffstats
path: root/src/itdb_sha1.h
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2007-09-24 14:59:33 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2007-09-24 14:59:33 +0000
commitd06a947f4e79cb6888937c4ddac48815f2f3e0ae (patch)
tree4f335a85ef383828ec9d6979fa78fc40a23af043 /src/itdb_sha1.h
parenta6e868360f213f1684632632192a5e03179dd767 (diff)
downloadlibgpod-d06a947f4e79cb6888937c4ddac48815f2f3e0ae.tar.gz
libgpod-d06a947f4e79cb6888937c4ddac48815f2f3e0ae.tar.xz
libgpod-d06a947f4e79cb6888937c4ddac48815f2f3e0ae.zip
** code courtesy of Christophe Fergeau **
* src/itdb_itunesdb.c (mk_mhbd): write extended header needed for new iPod Nanos (3G Video) and iPod Classics. src/itdb_device.c src/itdb_device.h: Code to parse SysInfoExtended and SysInfo for the FireWireGUID. You must either copy the iPod description XML file to Device/SysInfoExtended or add a line 'FirewireGuid: 000A27....' to Device/SysInfo. You can get your FirewireGuid by using the tests/test-fw-id test program. * src/sha1.c src/sha1.h src/itdb_sha1.c src/itdb_sha1.h New files for obscure hash generation code. * src/Makefile.am: added new files. * tests/test-checksum.c tests/test-fw-id.c tests/Makefile.am: test programs to retrieve the FirewireGuid and calculate/write the obscure hash. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1698 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/itdb_sha1.h')
-rw-r--r--src/itdb_sha1.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/itdb_sha1.h b/src/itdb_sha1.h
new file mode 100644
index 0000000..1effb8b
--- /dev/null
+++ b/src/itdb_sha1.h
@@ -0,0 +1,37 @@
+/*
+| Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+| Part of the gtkpod project.
+|
+| URL: http://www.gtkpod.org/
+| URL: http://gtkpod.sourceforge.net/
+|
+| The code contained in this file is free software; you can redistribute
+| it and/or modify it under the terms of the GNU Lesser General Public
+| License as published by the Free Software Foundation; either version
+| 2.1 of the License, or (at your option) any later version.
+|
+| This file 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
+| Lesser General Public License for more details.
+|
+| You should have received a copy of the GNU Lesser General Public
+| License along with this code; if not, write to the Free Software
+| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+|
+| iTunes and iPod are trademarks of Apple
+|
+| This product is not supported/written/published by Apple!
+|
+| $Id$
+*/
+
+#ifndef __ITDB_SHA1_H__
+#define __ITDB_SHA1_H__
+
+#include <glib.h>
+
+unsigned char *itdb_compute_hash (guint64 firewire_id,
+ const unsigned char *itdb,
+ unsigned long size);
+#endif