00001 /* libcomps - C alternative to yum.comps library 00002 * Copyright (C) 2013 Jindrich Luza 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00017 * USA 00018 */ 00019 00024 #ifndef COMPS_DOCGROUPID_H 00025 #define COMPS_DOCGROUPID_H 00026 00027 #include <stdbool.h> 00028 00029 #include "comps_utils.h" 00030 #include "comps_log.h" 00031 #include "comps_validate.h" 00032 #include "comps_default.h" 00033 #include "comps_obj.h" 00034 00036 typedef struct { 00037 COMPS_Object_HEAD; 00038 COMPS_Str *name; 00040 bool def; 00042 COMPS_ObjList *arches; 00043 } COMPS_DocGroupId; 00044 COMPS_Object_TAIL(COMPS_DocGroupId); 00045 00046 //HEAD_COMPS_CREATE_u(docgroupid, COMPS_DocGroupId) /*comps_utils.h macro*/ 00047 //HEAD_COMPS_COPY_u(docgroupid, COMPS_DocGroupId) /*comps_utils.h macro*/ 00048 //HEAD_COMPS_DESTROY_u(docgroupid, COMPS_DocGroupId) /*comps_utils.h macro*/ 00049 00050 char __comps_docgroupid_cmp_set(void *gid1, void *gid2); 00051 00057 COMPS_Object* comps_docgroupid_get_name(COMPS_DocGroupId *gid); 00058 00065 void comps_docgroupid_set_name(COMPS_DocGroupId *gid, char *name, char copy); 00066 00072 COMPS_Object* comps_docgroupid_get_default(COMPS_DocGroupId *gid); 00073 00080 void comps_docgroupid_set_default(COMPS_DocGroupId *gid, int def); 00081 00082 COMPS_ObjList* comps_docgroupid_arches(COMPS_DocGroupId *gid); 00083 void comps_docgroupid_set_arches(COMPS_DocGroupId *gid, 00084 COMPS_ObjList *arches); 00085 00086 signed char comps_docgroupid_xml(COMPS_DocGroupId *groupid, 00087 xmlTextWriterPtr writer, 00088 COMPS_Log *log, COMPS_XMLOptions *options, 00089 COMPS_DefaultsOptions *def_options); 00090 00091 extern COMPS_ValRuleGeneric* COMPS_DocGroupId_ValidateRules[]; 00092 00093 #endif