libcomps  ..
 All Data Structures Files Functions Variables Enumerations Macros Modules Pages
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;
58 
59 
60 //HEAD_COMPS_CREATE_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
61 //HEAD_COMPS_COPY_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
62 //HEAD_COMPS_DESTROY_u(doccategory, COMPS_DocCategory) /*comps_utils.h macro*/
63 
74 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
75 
76 
81 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
82 
88 HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
89 
95 HEAD_COMPS_NUMPROP_SETTER(category, COMPS_DocCategory,
96  display_order) /*comps_utils.h macro*/
109 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
110 HEAD_COMPS_PROP_GETTER_OBJ(category, id) /*comps_utils.h macro*/
111 
117 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
118 
124 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
125 
131 HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, display_order) /*comps_utils.h macro*/
144 HEAD_COMPS_DOCOBJ_GETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
158 HEAD_COMPS_DOCOBJ_SETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
161 HEAD_COMPS_DOCOBJ_GETARCHES(doccategory, COMPS_DocCategory)
162 HEAD_COMPS_DOCOBJ_SETARCHES(doccategory, COMPS_DocCategory)
163 
164 char __comps_doccategory_idcmp(void *c1, void *c2);
165 
171 signed char comps_doccategory_cmp_u(COMPS_Object *cat1, COMPS_Object *cat2);
172 
178 void comps_doccategory_add_groupid(COMPS_DocCategory *cat,
179  COMPS_DocGroupId *gid);
180 
186 COMPS_DocCategory* comps_doccategory_union(COMPS_DocCategory *c1,
187  COMPS_DocCategory *c2);
188 
194 COMPS_DocCategory* comps_doccategory_intersect(COMPS_DocCategory *c1,
195  COMPS_DocCategory *c2);
196 
197 signed char comps_doccategory_xml(COMPS_DocCategory *category,
198  xmlTextWriterPtr writer, COMPS_Log *log,
199  COMPS_XMLOptions *xml_options,
200  COMPS_DefaultsOptions *def_options);
201 COMPS_DocCategory* comps_doccategory_arch_filter(COMPS_DocCategory *source,
202  COMPS_ObjList *arches);
203 
204 extern COMPS_ObjectInfo COMPS_DocCategory_ObjInfo;
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:65
COMPS_Object header file.
signed char comps_doccategory_cmp_u(COMPS_Object *cat1, COMPS_Object *cat2)
Definition: comps_obj.h:101
Definition: comps_objlist.h:41
Libcomps dictionary and multi-dictionary. COMPS_ObjDict and COMPS_ObjMDict are both derivates of COMP...
A Documented file. Details.
Definition: comps_obj.h:79
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:35
COMPS_ObjDict * name_by_lang
Definition: comps_doccategory.h:52
COMPS_ObjList * group_ids
Definition: comps_doccategory.h:55