Loading...
Searching...
No Matches
comps_docpackage.h
Go to the documentation of this file.
/* libcomps - C alternative to yum.comps library
* Copyright (C) 2013 Jindrich Luza
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA
*/
#ifndef COMPS_DOCPACKAGE_H
#define COMPS_DOCPACKAGE_H
#include "comps_utils.h"
#include "comps_obj.h"
#include "comps_log.h"
#include "comps_validate.h"
#include "comps_default.h"
typedef enum {COMPS_PACKAGE_DEFAULT, COMPS_PACKAGE_OPTIONAL,
COMPS_PACKAGE_CONDITIONAL, COMPS_PACKAGE_MANDATORY,
COMPS_PACKAGE_UNKNOWN} COMPS_PackageType;
typedef struct {
COMPS_Object_HEAD;
COMPS_PackageType type;
COMPS_Str *name;
COMPS_Str *requires;
COMPS_Num *basearchonly;
COMPS_ObjList *arches;
} COMPS_DocGroupPackage;
//HEAD_COMPS_CREATE_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
//HEAD_COMPS_COPY_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
//HEAD_COMPS_DESTROY_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
signed char comps_docpackage_cmp_u(COMPS_Object *pkg1, COMPS_Object *pkg2);
char comps_docpackage_cmp_set(void *pkg1, void *pkg2);
COMPS_Object* comps_docpackage_get_name(COMPS_DocGroupPackage *pkg);
void comps_docpackage_set_name(COMPS_DocGroupPackage *pkg, char *name, char copy);
COMPS_Object* comps_docpackage_get_requires(COMPS_DocGroupPackage *pkg);
void comps_docpackage_set_requires(COMPS_DocGroupPackage *pkg, char *requires, char copy);
COMPS_Object* comps_docpackage_get_type(COMPS_DocGroupPackage *pkg);
void comps_docpackage_set_type(COMPS_DocGroupPackage *pkg,
COMPS_PackageType type,
bool unset);
void comps_docpackage_set_type_i(COMPS_DocGroupPackage *pkg, int type, bool unset);
const char* comps_docpackage_type_str(COMPS_PackageType type);
void comps_docpackage_set_basearchonly(COMPS_DocGroupPackage *pkg,
int basearchonly, bool unset);
COMPS_Object* comps_docpackage_get_basearchonly(COMPS_DocGroupPackage *pkg);
char __comps_docpackage_idcmp(void *pkg1, void *pkg2);
COMPS_ObjList* comps_docpackage_arches(COMPS_DocGroupPackage *pkg);
void comps_docpackage_set_arches(COMPS_DocGroupPackage *pkg,
COMPS_ObjList *arches);
signed char comps_docpackage_xml(COMPS_DocGroupPackage *pkg,
xmlTextWriterPtr writer,
COMPS_Log *log, COMPS_XMLOptions *xml_options,
COMPS_DefaultsOptions *def_options);
extern COMPS_ObjectInfo COMPS_DocGroupPackage_ObjInfo;
extern COMPS_ValRuleGeneric* COMPS_DocGroupPackage_ValidateRules[];
#endif
comps_docpackage_get_basearchonly
COMPS_Object * comps_docpackage_get_basearchonly(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_type_i
void comps_docpackage_set_type_i(COMPS_DocGroupPackage *pkg, int type, bool unset)
comps_docpackage_get_type
COMPS_Object * comps_docpackage_get_type(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_basearchonly
void comps_docpackage_set_basearchonly(COMPS_DocGroupPackage *pkg, int basearchonly, bool unset)
comps_docpackage_get_name
COMPS_Object * comps_docpackage_get_name(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_requires
void comps_docpackage_set_requires(COMPS_DocGroupPackage *pkg, char *requires, char copy)
comps_docpackage_type_str
const char * comps_docpackage_type_str(COMPS_PackageType type)
comps_docpackage_set_type
void comps_docpackage_set_type(COMPS_DocGroupPackage *pkg, COMPS_PackageType type, bool unset)
comps_docpackage_set_name
void comps_docpackage_set_name(COMPS_DocGroupPackage *pkg, char *name, char copy)
COMPS_PackageType
COMPS_PackageType
Definition comps_docpackage.h:36
comps_docpackage_get_requires
COMPS_Object * comps_docpackage_get_requires(COMPS_DocGroupPackage *pkg)
comps_obj.h
COMPS_Object header file.
COMPS_Object_HEAD
#define COMPS_Object_HEAD
Definition comps_obj.h:86
COMPS_DocGroupPackage
Definition comps_docpackage.h:41
COMPS_DocGroupPackage::type
COMPS_PackageType type
Definition comps_docpackage.h:43
COMPS_DocGroupPackage::basearchonly
COMPS_Str *COMPS_Num * basearchonly
Definition comps_docpackage.h:46
COMPS_DocGroupPackage::name
COMPS_Str * name
Definition comps_docpackage.h:44
COMPS_Num
Definition comps_obj.h:133
COMPS_ObjList
Definition comps_objlist.h:41
COMPS_ObjectInfo
Definition comps_obj.h:102
COMPS_Object
Definition comps_obj.h:124
COMPS_Str
Definition comps_obj.h:143