sbuild
1.5.4
|
00001 /* Copyright © 2005-2008 Roger Leigh <rleigh@debian.org> 00002 * 00003 * schroot is free software: you can redistribute it and/or modify it 00004 * under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation, either version 3 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * schroot is distributed in the hope that it will be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program. If not, see 00015 * <http://www.gnu.org/licenses/>. 00016 * 00017 *********************************************************************/ 00018 00019 #ifndef SBUILD_KEYFILE_BASE_H 00020 #define SBUILD_KEYFILE_BASE_H 00021 00022 #include <sbuild/sbuild-i18n.h> 00023 #include <sbuild/sbuild-log.h> 00024 #include <sbuild/sbuild-parse-error.h> 00025 #include <sbuild/sbuild-parse-value.h> 00026 #include <sbuild/sbuild-types.h> 00027 #include <sbuild/sbuild-tr1types.h> 00028 #include <sbuild/sbuild-util.h> 00029 00030 #include <cassert> 00031 #include <map> 00032 #include <string> 00033 #include <sstream> 00034 00035 #include <boost/format.hpp> 00036 00037 namespace sbuild 00038 { 00039 00043 class keyfile_base 00044 { 00045 public: 00047 enum priority 00048 { 00049 PRIORITY_OPTIONAL, 00050 PRIORITY_REQUIRED, 00051 PRIORITY_DISALLOWED, 00052 PRIORITY_DEPRECATED, 00053 PRIORITY_OBSOLETE 00054 }; 00055 00057 enum error_code 00058 { 00059 BAD_FILE, 00060 DEPRECATED_KEY, 00061 DEPRECATED_KEY_NL, 00062 DISALLOWED_KEY, 00063 DISALLOWED_KEY_NL, 00064 DUPLICATE_GROUP, 00065 DUPLICATE_KEY, 00066 INVALID_GROUP, 00067 INVALID_KEY, 00068 INVALID_LINE, 00069 MISSING_KEY, 00070 MISSING_KEY_NL, 00071 NO_GROUP, 00072 NO_KEY, 00073 OBSOLETE_KEY, 00074 OBSOLETE_KEY_NL, 00075 PASSTHROUGH_G, 00076 PASSTHROUGH_GK, 00077 PASSTHROUGH_LG, 00078 PASSTHROUGH_LGK, 00079 UNKNOWN_KEY 00080 }; 00081 00083 typedef parse_error<error_code> error; 00084 00086 keyfile_base (); 00087 00089 virtual ~keyfile_base (); 00090 00091 }; 00092 00093 } 00094 00095 #endif /* SBUILD_KEYFILE_BASE_H */ 00096 00097 /* 00098 * Local Variables: 00099 * mode:C++ 00100 * End: 00101 */