Fwd: My first Conduit module



Hi all,

After some talk in conduit irc channel I decided start my first dataprovider for study the conduit api.

I wold like submit my provider for you, to give me some feedbacks and talk about this.

My first module synchronize is  the youtube most watched videos of the day.

First I start read the the tutorial about "create a writing A custom dataProvider" on wiki page, after this I copy the FeedModule and start my module, I fond some differences between the implementation and the tutorial.

This is my question:  In the method "get", this receive the string LUID, generate by "get_all" method, in the tutorial you use the "get_num_items" to get the total of items and pass the integer index to method "get". What is the correct way to do this, or both are correct?


BR
Renato Filho



Attachment: conduit_yt.tar.bz2
Description: BZip2 compressed data

Index: m4/intltool.m4
===================================================================
--- m4/intltool.m4	(revision 823)
+++ m4/intltool.m4	(working copy)
@@ -23,7 +23,7 @@
 ## the same distribution terms that you use for the rest of that program.
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 36 IT_PROG_INTLTOOL
+# serial 35 IT_PROG_INTLTOOL
 AC_DEFUN([IT_PROG_INTLTOOL],
 [AC_PREREQ([2.50])dnl
 
@@ -36,7 +36,7 @@
 esac
 
 if test -n "$1"; then
-    AC_MSG_CHECKING([for intltool >= $1])
+    AC_MSG_CHECKING(for intltool >= $1)
 
     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
@@ -65,7 +65,6 @@
   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
 AC_SUBST(INTLTOOL_DESKTOP_RULE)
 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
@@ -85,7 +84,6 @@
 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 AC_SUBST(INTLTOOL_THEME_RULE)
 AC_SUBST(INTLTOOL_SERVICE_RULE)
-AC_SUBST(INTLTOOL_POLICY_RULE)
 
 # Use the tools built into the package, not the ones that are installed.
 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
@@ -108,16 +106,19 @@
    fi
 fi
 
+AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
+AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
+AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
+AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
+
 # Substitute ALL_LINGUAS so we can use it in po/Makefile
 AC_SUBST(ALL_LINGUAS)
 
 # Set DATADIRNAME correctly if it is not set yet
 # (copied from glib-gettext.m4)
 if test -z "$DATADIRNAME"; then
-  AC_LINK_IFELSE(
-    [AC_LANG_PROGRAM([[]],
-                     [[extern int _nl_msg_cat_cntr;
-                       return _nl_msg_cat_cntr]])],
+  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+                 return _nl_msg_cat_cntr],
     [DATADIRNAME=share],
     [case $host in
     *-*-solaris*)
@@ -158,6 +159,10 @@
 for file in intltool-extract intltool-merge intltool-update; do
   sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
       -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
+      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
+      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
+      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
       -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 	< ${ac_aux_dir}/${file}.in > ${file}.out
   if cmp -s ${file} ${file}.out 2>/dev/null; then
@@ -172,7 +177,9 @@
 ],
 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
+INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
+INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
 ])
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 823)
+++ configure.ac	(working copy)
@@ -94,6 +94,7 @@
 conduit/dataproviders/SettingsModule/settings/Makefile
 conduit/dataproviders/SmugMugModule/Makefile
 conduit/dataproviders/SmugMugModule/SmugMugAPI/Makefile
+conduit/dataproviders/YouTubeModule/Makefile
 data/Makefile
 data/conduit.desktop.in
 data/conduit-autostart.desktop.in
Index: conduit/dataproviders/Makefile.am
===================================================================
--- conduit/dataproviders/Makefile.am	(revision 823)
+++ conduit/dataproviders/Makefile.am	(working copy)
@@ -1,4 +1,5 @@
 SUBDIRS = \
+	NetworkModule \
 	BackpackModule \
 	BoxDotNetModule \
 	FileModule \
@@ -9,7 +10,8 @@
 	PicasaModule \
 	SettingsModule \
 	SmugMugModule \
-	EvolutionModule
+	EvolutionModule \
+	YouTubeModule
 
 conduit_handlersdir = $(libdir)/conduit/dataproviders
 conduit_handlers_PYTHON = \
Index: data/Makefile.am
===================================================================
--- data/Makefile.am	(revision 823)
+++ data/Makefile.am	(working copy)
@@ -44,7 +44,8 @@
 	picasa.png \
 	smugmug.png \
 	boxdotnet.png \
-	flickr.png
+	flickr.png \
+	youtube.png
 
 conduitbindir = $(libdir)/conduit
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]