|
Open SCAP Library
|
00001 /* 00002 * Copyright 2015 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * "Jan Černý" <jcerny@redhat.com> 00021 */ 00022 00023 #ifndef OVAL_SCHEMA_VERSION_H 00024 #define OVAL_SCHEMA_VERSION_H 00025 00026 enum oval_schema_version_components { 00027 OVAL_SCHEMA_VERSION_CORE_MAJOR = 0, 00028 OVAL_SCHEMA_VERSION_CORE_MINOR, 00029 OVAL_SCHEMA_VERSION_CORE_UPDATE, 00030 OVAL_SCHEMA_VERSION_PLATFORM_MAJOR, 00031 OVAL_SCHEMA_VERSION_PLATFORM_MINOR, 00032 OVAL_SCHEMA_VERSION_PLATFORM_UPDATE, 00033 OVAL_SCHEMA_VERSION_COMPONENTS_COUNT 00034 }; 00035 00036 #define OVAL_SCHEMA_VERSION_INVALID oval_schema_version_from_cstr(NULL) 00037 #define OVAL_SCHEMA_VERSION(v) oval_schema_version_from_cstr(#v) 00038 00039 typedef struct { 00040 int component[OVAL_SCHEMA_VERSION_COMPONENTS_COUNT]; 00041 } oval_schema_version_t; 00042 00048 oval_schema_version_t oval_schema_version_from_cstr(const char *ver_str); 00049 00058 const char *oval_schema_version_to_cstr(oval_schema_version_t version); 00059 00067 int oval_schema_version_cmp(oval_schema_version_t v1, oval_schema_version_t v2); 00068 00069 #endif
1.7.3