SCPM interface  1.0
scpm_types.h
Go to the documentation of this file.
1 /*
2  * $Id: scpm_types.h,v 1.3 2006/09/21 12:36:16 hschaa Exp $
3  *
4  * Type definitions for the SCPM interface.
5  *
6  * Copyright 2001 SuSE GbmH
7  * 2002-2004 SuSE Linux AG
8  *
9  * Author: Joachim Gleissner <jg@suse.de>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24  */
25 #ifndef SCPM_TYPES_H
26 #define SCPM_TYPES_H
27 
28 #include <string>
29 #include <vector>
30 #include <unistd.h>
31 
33  normal,
34  save_all,
35  patch_all
36 } ;
37 
39  std::string name;
40  std::string description;
43  bool active;
44 } ;
45 
47  std::string name;
48  std::string type;
49  bool active;
51 } ;
52 
54  std::string resource_name;
55  std::string resource_type;
56  bool is_new;
57  bool is_deleted;
58  bool save;
60  std::vector<resource_group_t> groups;
61 } ;
62 
63 struct switch_info_t {
65  std::string profile_name;
66  std::vector<resource_info_t> modified_resources;
67 } ;
68 
69 struct scpm_status_t {
71  bool enabled;
72  bool db_loaded;
74  bool locked;
75  bool needs_reinit;
76  bool needs_recover;
77  std::string active_profile;
78  std::string scpm_version;
79  std::string db_version;
80  std::string db_format;
81  std::string db_format_version;
82 } ;
83 
84 struct backup_info_t {
85  std::string name;
86  std::string type;
87  std::string profile;
88  std::vector< std::pair<time_t, std::string> > versions;
89 } ;
90 
96 };
97 
98 extern char *scpm_error;
99 extern int scpm_journal_abort_steps;
100 
101 const int scpm_flag_force = 1;
102 const int scpm_flag_skip = 2;
103 const int scpm_flag_quiet = 4;
104 const int scpm_flag_verbose = 8;
105 const int scpm_flag_hash = 16;
106 const int scpm_flag_debug = 32;
107 const int scpm_flag_boot = 64;
109 const int scpm_flag_skip_load = 256;
110 const int scpm_flag_force_db = 512;
111 const int scpm_flag_read_only = 1024;
112 const int scpm_flag_wait_commit = 2048;
113 
114 #endif

SCPM interface description - 2002,2003 SuSE Linux AG