Loading...
Searching...
No Matches
oval_schema_version.h
/*
* Copyright 2015 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* "Jan Černý" <jcerny@redhat.com>
*/
#ifndef OVAL_SCHEMA_VERSION_H
#define OVAL_SCHEMA_VERSION_H
#include "oscap_export.h"
enum oval_schema_version_components {
OVAL_SCHEMA_VERSION_CORE_MAJOR = 0,
OVAL_SCHEMA_VERSION_CORE_MINOR,
OVAL_SCHEMA_VERSION_CORE_UPDATE,
OVAL_SCHEMA_VERSION_PLATFORM_MAJOR,
OVAL_SCHEMA_VERSION_PLATFORM_MINOR,
OVAL_SCHEMA_VERSION_PLATFORM_UPDATE,
OVAL_SCHEMA_VERSION_COMPONENTS_COUNT
};
#define OVAL_SCHEMA_VERSION_INVALID oval_schema_version_from_cstr(NULL)
#define OVAL_SCHEMA_VERSION(v) oval_schema_version_from_cstr(#v)
typedef struct {
int component[OVAL_SCHEMA_VERSION_COMPONENTS_COUNT];
} oval_schema_version_t;
OSCAP_API oval_schema_version_t oval_schema_version_from_cstr(const char *ver_str);
OSCAP_API const char *oval_schema_version_to_cstr(oval_schema_version_t version);
OSCAP_API int oval_schema_version_cmp(oval_schema_version_t v1, oval_schema_version_t v2);
#endif
oval_schema_version_t
Definition oval_schema_version.h:41