libcomps  ..
comps_doccategory.h
Go to the documentation of this file.
1 /* libcomps - C alternative to yum.comps library
2  * Copyright (C) 2013 Jindrich Luza
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17  * USA
18  */
19 
20 #ifndef COMPS_DOCCATEGORY_H
21 #define COMPS_DOCCATEGORY_H
22 
23 #include "comps_obj.h"
24 #include "comps_objdict.h"
25 #include "comps_objlist.h"
26 #include "comps_utils.h"
27 #include "comps_docgroupid.h"
28 #include "comps_validate.h"
29 #include "comps_radix.h"
30 #include "comps_log.h"
31 #include "comps_default.h"
32 
33 #include <stddef.h>
34 #include <assert.h>
35 
49 typedef struct {
51  COMPS_ObjDict *properties;
52  COMPS_ObjDict *name_by_lang;
53  COMPS_ObjDict *desc_by_lang;
59 
60 
61 //HEAD_COMPS_CREATE_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
62 //HEAD_COMPS_COPY_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
63 //HEAD_COMPS_DESTROY_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
64 
75 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
76 
77 
82 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
83 
89 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
90 
96 HEAD_COMPS_NUMPROP_SETTER(category, COMPS_DocCategory,
97  display_order) /*comps_utils.h macro*/
110 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
111 HEAD_COMPS_PROP_GETTER_OBJ(category, id) /*comps_utils.h macro*/
112 
118 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
119 
125 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
126 
132 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, display_order) /*comps_utils.h macro*/
145 HEAD_COMPS_DOCOBJ_GETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
159 HEAD_COMPS_DOCOBJ_SETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
162 HEAD_COMPS_DOCOBJ_GETARCHES(doccategory, COMPS_DocCategory)
163 HEAD_COMPS_DOCOBJ_SETARCHES(doccategory, COMPS_DocCategory)
164 
165 char __comps_doccategory_idcmp(void *c1, void *c2);
166 
172 signed char comps_doccategory_cmp_u(COMPS_Object *cat1, COMPS_Object *cat2);
173 
179 void comps_doccategory_add_groupid(COMPS_DocCategory *cat,
180  COMPS_DocGroupId *gid);
181 
187 COMPS_DocCategory* comps_doccategory_union(COMPS_DocCategory *c1,
188  COMPS_DocCategory *c2);
189 
195 COMPS_DocCategory* comps_doccategory_intersect(COMPS_DocCategory *c1,
196  COMPS_DocCategory *c2);
197 
198 signed char comps_doccategory_xml(COMPS_DocCategory *category,
199  xmlTextWriterPtr writer, COMPS_Log *log,
200  COMPS_XMLOptions *xml_options,
201  COMPS_DefaultsOptions *def_options);
202 COMPS_DocCategory* comps_doccategory_arch_filter(COMPS_DocCategory *source,
203  COMPS_ObjList *arches);
204 
205 extern COMPS_ValRuleGeneric* COMPS_DocCategory_ValidateRules[];
206 #endif
COMPS_DocGroupId header file.
COMPS_ObjDict * desc_by_lang
Definition: comps_doccategory.h:53
#define COMPS_Object_HEAD
Definition: comps_obj.h:86
COMPS_Object header file.
signed char comps_doccategory_cmp_u(COMPS_Object *cat1, COMPS_Object *cat2)
Definition: comps_obj.h:124
Definition: comps_objlist.h:41
#define COMPS_Object_TAIL(obj)
insert "extern COMPS_ObjectInfo _ObjInfo" statement. Use this macro in combination with COMPS_OB...
Definition: comps_obj.h:89
Libcomps dictionary and multi-dictionary. COMPS_ObjDict and COMPS_ObjMDict are both derivates of COMP...
A Documented file. Details.
COMPS_ObjDict * properties
Definition: comps_doccategory.h:51
Definition: comps_doccategory.h:49
COMPS_DocCategory * comps_doccategory_union(COMPS_DocCategory *c1, COMPS_DocCategory *c2)
COMPS_DocCategory * comps_doccategory_intersect(COMPS_DocCategory *c1, COMPS_DocCategory *c2)
void comps_doccategory_add_groupid(COMPS_DocCategory *cat, COMPS_DocGroupId *gid)
Definition: comps_docgroupid.h:36
COMPS_ObjDict * name_by_lang
Definition: comps_doccategory.h:52
COMPS_ObjList * group_ids
Definition: comps_doccategory.h:55