scpm_types.h

Go to the documentation of this file.
00001 /*
00002  * $Id: scpm_types.h,v 1.11 2004/03/22 15:28:09 jg Exp $
00003  *
00004  * Type definitions for the SCPM interface.
00005  *
00006  * Copyright 2001 SuSE GbmH
00007  *           2002-2004 SuSE Linux AG
00008  *
00009  * Author: Joachim Gleissner <jg@suse.de>
00010  *
00011  *   This program is free software; you can redistribute it and/or modify
00012  *   it under the terms of the GNU General Public License as published by
00013  *   the Free Software Foundation; either version 2 of the License, or
00014  *   (at your option) any later version.
00015  *
00016  *   This program is distributed in the hope that it will be useful,
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *   GNU General Public License for more details.
00020  *
00021  *   You should have received a copy of the GNU General Public License
00022  *   along with this program; if not, write to the Free Software
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  */
00025 #ifndef SCPM_TYPES_H
00026 #define SCPM_TYPES_H
00027 
00028 #include <string>
00029 #include <vector>
00030 
00031 typedef enum save_mode_t {
00032   normal,
00033   save_all,
00034   patch_all
00035 } ;
00036 
00037 typedef struct resource_group_t {
00038   string name;
00039   string description;
00040   bool user_defined;
00041   bool user_modified;
00042   bool active;
00043 } ;
00044 
00045 typedef struct resource_entry_t {
00046   string name;
00047   string type;
00048   bool active;
00049   bool user_defined;
00050 } ;
00051 
00052 typedef struct resource_info_t {
00053   string resource_name;
00054   string resource_type;
00055   bool   is_new;
00056   bool   is_deleted;
00057   bool   save;
00058   save_mode_t save_mode;
00059   vector<resource_group_t> groups;
00060 } ;
00061 
00062 typedef struct switch_info_t {
00063   bool profile_modified;
00064   string profile_name;
00065   vector<resource_info_t> modified_resources;
00066 } ;
00067 
00068 typedef struct scpm_status_t {
00069   bool initialized;
00070   bool enabled;
00071   bool db_loaded;
00072   bool db_uptodate;
00073   bool locked;
00074   bool needs_reinit;
00075   string active_profile;
00076   string scpm_version;
00077   string db_version;
00078   string db_format;
00079   string db_format_version;
00080 } ;
00081 
00082 typedef struct backup_info_t {
00083   string name;
00084   string type;
00085   string profile;
00086 } ;
00087 
00088 extern char *scpm_error;
00089 
00090 const int scpm_flag_force           = 1;
00091 const int scpm_flag_skip            = 2;
00092 const int scpm_flag_quiet           = 4;
00093 const int scpm_flag_verbose         = 8;
00094 const int scpm_flag_hash            = 16;
00095 const int scpm_flag_debug           = 32;
00096 const int scpm_flag_boot            = 64;
00097 const int scpm_flag_exit_on_warning = 128;
00098 const int scpm_flag_skip_load       = 256;
00099 const int scpm_flag_force_db        = 512;
00100 
00101 #endif

SCPM interface description - 2002,2003 SuSE Linux AG