Revision: 2286
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2286&view=rev
Author: teuf
Date: 2009-03-26 22:11:27 +0000 (Thu, 26 Mar 2009)
Log Message:
-----------
Add test program for iPod time sync
Modified Paths:
--------------
libgpod/trunk/tools/Makefile.am
Added Paths:
-----------
libgpod/trunk/tools/ipod-time-sync.c
Modified: libgpod/trunk/tools/Makefile.am
===================================================================
--- libgpod/trunk/tools/Makefile.am 2009-03-26 22:11:12 UTC (rev 2285)
+++ libgpod/trunk/tools/Makefile.am 2009-03-26 22:11:27 UTC (rev 2286)
@@ -1,6 +1,6 @@
if HAVE_SGUTILS
-bin_PROGRAMS=ipod-read-sysinfo-extended
+bin_PROGRAMS=ipod-read-sysinfo-extended ipod-time-sync
ipod_read_sysinfo_extended_SOURCES = \
read-sysinfoextended-sgutils.c \
@@ -18,6 +18,12 @@
libgpod_callout_CFLAGS=$(LIBGPOD_CFLAGS) $(SGUTILS_CFLAGS) -I$(top_srcdir)/src
libgpod_callout_LDADD=$(LIBGPOD_LIBS) $(SGUTILS_LIBS)
$(top_builddir)/src/libgpod.la
+ipod_time_sync_SOURCES = \
+ ipod-time-sync.c \
+ ipod-scsi.c
+ipod_time_sync_CFLAGS=$(SGUTILS_CFLAGS) $(LIBGPOD_CFLAGS)
+ipod_time_sync_LDADD=$(SGUTILS_LIBS) $(LIBGPOD_LIBS)
+
fdidir = $(HALFDIDIR)/policy/20thirdparty
fdi_DATA = 20-libgpod-sysinfo-extended.fdi
Added: libgpod/trunk/tools/ipod-time-sync.c
===================================================================
--- libgpod/trunk/tools/ipod-time-sync.c (rev 0)
+++ libgpod/trunk/tools/ipod-time-sync.c 2009-03-26 22:11:27 UTC (rev
2286)
@@ -0,0 +1,42 @@
+/* Copyright (c) 2009, Christophe Fergeau <[email protected]>
+ *
+ * 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!
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+extern void sync_time (const char *device, time_t current_time);
+
+int
+main (int argc, char **argv)
+{
+ if (argc < 2) {
+ g_print (_("usage: %s <device>\n"), g_basename (argv[0]));
+ return 1;
+ }
+
+ sync_time (argv[1], time (NULL));
+
+ return 0;
+}
Property changes on: libgpod/trunk/tools/ipod-time-sync.c
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2