Date: Thu, 15 Aug 2013 10:22:15 GMT From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r255971 - in soc2013/mattbw/backend: . actions Message-ID: <201308151022.r7FAMFlG060798@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mattbw Date: Thu Aug 15 10:22:15 2013 New Revision: 255971 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255971 Log: Add stubs for GetDepends and GetRequires. These aren't yet wired up to the main backend file, but are ready to build and fill in with code otherwise. Added: soc2013/mattbw/backend/actions/get_depends.c soc2013/mattbw/backend/actions/get_requires.c Modified: soc2013/mattbw/backend/Makefile soc2013/mattbw/backend/actions.h soc2013/mattbw/backend/actions/get_files.c Modified: soc2013/mattbw/backend/Makefile ============================================================================== --- soc2013/mattbw/backend/Makefile Thu Aug 15 10:18:36 2013 (r255970) +++ soc2013/mattbw/backend/Makefile Thu Aug 15 10:22:15 2013 (r255971) @@ -33,9 +33,11 @@ search.c \ utils.c SRCS+= \ + actions/get_depends.c \ actions/get_details.c \ actions/get_files.c \ actions/get_repo_list.c \ + actions/get_requires.c \ actions/get_update_detail.c \ actions/install_files.c \ actions/install_packages.c \ Modified: soc2013/mattbw/backend/actions.h ============================================================================== --- soc2013/mattbw/backend/actions.h Thu Aug 15 10:18:36 2013 (r255970) +++ soc2013/mattbw/backend/actions.h Thu Aug 15 10:22:15 2013 (r255971) @@ -28,9 +28,11 @@ * Each thread is implemented in its namesake C file, except simulations * which are stored with their non-simulated counterparts. */ +gboolean get_depends_thread(PkBackend *backend); gboolean get_details_thread(PkBackend *backend); gboolean get_files_thread(PkBackend *backend); gboolean get_repo_list_thread(PkBackend *backend); +gboolean get_requires_thread(PkBackend *backend); gboolean get_update_detail_thread(PkBackend *backend); gboolean install_files_thread(PkBackend *backend); gboolean install_packages_thread(PkBackend *backend); Added: soc2013/mattbw/backend/actions/get_depends.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/mattbw/backend/actions/get_depends.c Thu Aug 15 10:22:15 2013 (r255971) @@ -0,0 +1,36 @@ +/*- + * Copyright (C) 2013 Matt Windsor <mattbw@FreeBSD.org> + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#include <assert.h> /* assert */ +#include <glib.h> /* gboolean */ +#include "../pk-backend.h" /* PkBackend */ + +#include "../actions.h" /* Prototype */ + +/* + * The thread that performs a GetDepends operation. Should be invoked by the + * pk_backend_get_depends hook. + */ +gboolean +get_depends_thread(PkBackend *backend) +{ + + assert(backend != NULL); + return FALSE; +} Modified: soc2013/mattbw/backend/actions/get_files.c ============================================================================== --- soc2013/mattbw/backend/actions/get_files.c Thu Aug 15 10:18:36 2013 (r255970) +++ soc2013/mattbw/backend/actions/get_files.c Thu Aug 15 10:22:15 2013 (r255971) @@ -33,8 +33,8 @@ static bool emit(struct pkg *pkg, const gchar *id, struct query *q); /* - * The thread that performs a GetDetails operation. Should be invoked by the - * pk_backend_get_details hook. + * The thread that performs a GetFiles operation. Should be invoked by the + * pk_backend_get_files hook. */ gboolean get_files_thread(PkBackend *backend) Added: soc2013/mattbw/backend/actions/get_requires.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/mattbw/backend/actions/get_requires.c Thu Aug 15 10:22:15 2013 (r255971) @@ -0,0 +1,37 @@ +/*- + * Copyright (C) 2013 Matt Windsor <mattbw@FreeBSD.org> + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <assert.h> /* assert */ +#include <glib.h> /* gboolean */ +#include "../pk-backend.h" /* PkBackend */ + +#include "../actions.h" /* Prototype */ + +/* + * The thread that performs a GetRequires operation. Should be invoked by the + * pk_backend_get_requires hook. + */ +gboolean +get_requires_thread(PkBackend *backend) +{ + + assert(backend != NULL); + return FALSE; +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308151022.r7FAMFlG060798>