Broke eazel-install-lib.h up into appropriate headers for each source file.

This commit is contained in:
J Shane Culpepper 2000-04-23 19:50:42 +00:00
parent 0d92285677
commit c8c380f2b4
11 changed files with 186 additions and 27 deletions

View file

@ -1,3 +1,20 @@
2000-04-22 J. Shane Culpepper <pepper@eazel.com>
*components/services/install/eazel-install.c
*components/services/install/eazel-install-lib.h
*components/services/install/eazel-install-lib-xml.h
*components/services/install/eazel-install-lib-xml.c
*components/services/install/eazel-install-lib-debug.h
*components/services/install/eazel-install-lib-debug.c
*components/services/install/eazel-install-lib-rpm.h
*components/services/install/eazel-install-lib-rpm.c
*components/services/install/eazel-install-lib-util.h
*components/services/install/eazel-install-lib-util.c
Broke up eazel-install-lib.h to appropriate headers for each source
file. Did a little cleaning so that functions are more modular.
Setting everything up so that lib functions can be moved to a separate
services library down the road.
2000-04-23 Martin Baulig <martin@home-of-linux.org>
* configure.in: Check for -lrpm and its dependency libs.

View file

@ -25,7 +25,7 @@
* file and install a services generated packages.xml.
*/
#include "eazel-install-lib.h"
#include "eazel-install-lib-debug.h"
InstallOptions*
init_default_install_configuration_test () {

View file

@ -0,0 +1,37 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: J Shane Culpepper <pepper@eazel.com>
*/
/* eazel-install - services command line install/update/uninstall
* component. This program will parse the eazel-configuration.xml
* file and install a services generated packages.xml.
*/
#ifndef __EAZEL_INSTALL_LIB_DEBUG_H__
#define __EAZEL_INSTALL_LIB_DEBUG_H__
#include "eazel-install-lib.h"
InstallOptions* init_default_install_configuration_test (void);
void dump_install_options (InstallOptions* iopts);
void dump_package_list (PackageData* pkg);
#endif /* __EAZEL_INSTALL_LIB_DEBUG_H__ */

View file

@ -25,7 +25,7 @@
* file and install a services generated packages.xml.
*/
#include "eazel-install-lib.h"
#include "eazel-install-lib-rpm.h"
gboolean
install_new_packages (InstallOptions* iopts) {

View file

@ -0,0 +1,39 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: J Shane Culpepper <pepper@eazel.com>
*/
/* eazel-install - services command line install/update/uninstall
* component. This program will parse the eazel-configuration.xml
* file and install a services generated packages.xml.
*/
#ifndef __EAZEL_INSTALL_LIB_RPM_H__
#define __EAZEL_INSTALL_LIB_RPM_H__
#include <rpm/rpmlib.h>
#include "eazel-install-lib.h"
#include "eazel-install-lib-xml.h"
gboolean install_new_packages (InstallOptions* iopts);
gboolean uninstall_packages (InstallOptions* iopts);
#endif /* __EAZEL_INSTALL_LIB_RPM_H__ */

View file

@ -25,7 +25,7 @@
* file and install a services generated packages.xml.
*/
#include "eazel-install-lib.h"
#include "eazel-install-lib-util.h"
gboolean
check_for_root_user () {

View file

@ -0,0 +1,38 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: J Shane Culpepper <pepper@eazel.com>
*/
/* eazel-install - services command line install/update/uninstall
* component. This program will parse the eazel-configuration.xml
* file and install a services generated packages.xml.
*/
#ifndef __EAZEL_INSTALL_LIB_UTIL_H__
#define __EAZEL_INSTALL_LIB_UTIL_H__
#include "eazel-install-lib.h"
gboolean check_for_root_user (void);
gboolean check_for_redhat (void);
#endif /* __EAZEL_INSTALL_LIB_UTIL_H__ */

View file

@ -26,6 +26,7 @@
*/
#include "eazel-install-lib.h"
#include "eazel-install-lib-xml.h"
static PackageData* parse_package (xmlNode* package);
static CategoryData* parse_category (xmlNode* cat);

View file

@ -0,0 +1,44 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: J Shane Culpepper <pepper@eazel.com>
*/
/* eazel-install - services command line install/update/uninstall
* component. This program will parse the eazel-configuration.xml
* file and install a services generated packages.xml.
*/
#ifndef __EAZEL_INSTALL_LIB_XML_H__
#define __EAZEL_INSTALL_LIB_XML_H__
#include <errno.h>
#include <sys/stat.h>
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include "eazel-install-lib.h"
char* xml_get_value (xmlNode* node, const char* name);
InstallOptions* init_default_install_configuration (const char* config_file);
GList* fetch_xml_package_list_local (const char* pkg_list_file);
void free_categories (GList* categories);
gboolean create_default_configuration_metafile (void);
#endif /* __EAZEL_INSTALL_LIB_XML_H__ */

View file

@ -25,21 +25,13 @@
* file and install a services generated packages.xml.
*/
#ifndef __EAZEL_INSTALL_LIB_H__
#define __EAZEL_INSTALL_LIB_H__
#ifndef __EAZEL_INSTALL_LIB_H__
#define __EAZEL_INSTALL_LIB_H__
#include <popt-gnome.h>
#include <gnome.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <sys/stat.h>
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <rpm/rpmlib.h>
typedef enum _URLType URLType;
typedef struct _InstallOptions InstallOptions;
@ -92,17 +84,4 @@ struct _PackageData {
GList* HardDepends;
};
gboolean check_for_root_user (void);
gboolean check_for_redhat (void);
char* xml_get_value (xmlNode* node, const char* name);
InstallOptions* init_default_install_configuration (const char* config_file);
InstallOptions* init_default_install_configuration_test (void);
GList* fetch_xml_package_list_local (const char* pkg_list_file);
gboolean install_new_packages (InstallOptions* iopts);
gboolean uninstall_packages (InstallOptions* iopts);
void dump_install_options (InstallOptions* iopts);
void dump_package_list (PackageData* pkg);
void free_categories (GList* categories);
gboolean create_default_configuration_metafile (void);
#endif /* __EAZEL_INSTALL_LIB_H__ */
#endif /* __EAZEL_INSTALL_LIB_H__ */

View file

@ -25,7 +25,11 @@
* file and install a services generated packages.xml.
*/
#include <popt-gnome.h>
#include "eazel-install-lib.h"
#include "eazel-install-lib-rpm.h"
#include "eazel-install-lib-util.h"
#include "eazel-install-lib-xml.h"
static void show_usage (int exitcode, char* error);
static void show_license (int exitcode, char* error);