[vlc-devel] [PATCH] Sqlite Module for VLC, GSoC 09
Jean-Baptiste Kempf
jb at videolan.org
Mon Aug 24 15:07:43 CEST 2009
Hello,
On Sun, Aug 23, 2009 at 09:48:55PM +0530, Srikanth Raju wrote :
> I'm requesting a code review for the sqlite module.
> +dnl
> +dnl SQLite
> +dnl
> +AC_ARG_ENABLE(sqlite,
> + [ --enable-sqlite SQLite (default disabled)])
> +if test "${enable_sqlite}" = "yes"
> +then
> + AC_ARG_WITH(sqlite,
> + [ --with-sqlite=PATH sqlite path linking])
> + AC_CHECK_HEADERS(sqlite3.h, [
> + VLC_ADD_PLUGIN([sqlite])
> + if test "${with_sqlite}" != "no" -a -n "${with_sqlite}"; then
> + AC_MSG_CHECKING(existence of sqlite directory in ${with_sqlite})
> + real_sqlite="`cd ${with_sqlite} 2>/dev/null && pwd`"
> + if test -z "${real_sqlite}"
> + then
> + dnl The given directory can't be found
> + AC_MSG_RESULT(no)
> + AC_MSG_ERROR([cannot cd to ${with_sqlite}])
> + fi
> + VLC_ADD_CFLAGS([sqlite],[-I${with_sqlite}/include])
> + VLC_ADD_LIBS([sqlite], [-L${with_sqlite}/lib -lsqlite3])
> + AC_MSG_RESULT(yes)
> + else
> + VLC_ADD_LIBS([sqlite], [-lsqlite3])
> + fi
> + AC_DEFINE([SQLITE_MODULE], 1, [Define if you want to use SQLite module]) ],
> + AC_MSG_ERROR([sqlite3 is required for sqlite module]) )
> +fi
Use of pkg-config?
> +/*****************************************************************************
> + * vlc_sql.h: SQL abstraction layer
> + *****************************************************************************
> + * Copyright (C) 2004 the VideoLAN team
Copyright is wrong
> + * Authors: Antoine Lejeune <phytos at videolan.org>
> + * Jean-Philippe André <jpeg at videolan.org>
You didn't modify this?
> +/*****************************************************************************
> + * sqlite.c: An SQLite3 wrapper for VLC
> + *****************************************************************************
> + * Copyright (C) 2008 the VideoLAN team
No work in 2009 ?
> + (void) p_sql;
VLC_UNUSED?
> +/*****************************************************************************
> + * sql.c: SQL Connection: Creators and destructors
> + *****************************************************************************
> + * Copyright (C) 2008 the VideoLAN team
...
> +/*****************************************************************************
> + * @brief Create an instance of an SQL connection
> + * @param p_this Parent object
> + * @param psz_name Name which is passed to module_need (not needed)
> + * @return p_sql created and attached, module loaded
> + *****************************************************************************/
> +sql_t *__sql_Create( vlc_object_t *p_this, char *psz_name )
> +{
> +#if !defined(SQLITE_MODULE)
> + return NULL;
Why not a dynamic check here? What happens if you compile the SQLite
module afterwards?
Not much to say then :D
Best Regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/
More information about the vlc-devel
mailing list