libcomps ..

Loading...
Searching...
No Matches
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
47
49 typedef struct {
50 COMPS_Object_HEAD;
51 COMPS_ObjDict *properties;
52 COMPS_ObjDict *name_by_lang;
53 COMPS_ObjDict *desc_by_lang;
55 COMPS_ObjList *group_ids;
57} COMPS_DocCategory;
58 COMPS_Object_TAIL(COMPS_DocCategory);
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
69
75HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
76
77
82HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
83
89HEAD_COMPS_STRPROP_SETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
90
96HEAD_COMPS_NUMPROP_SETTER(category, COMPS_DocCategory,
97 display_order) /*comps_utils.h macro*/
99
104
110HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, id) /*comps_utils.h macro*/
111HEAD_COMPS_PROP_GETTER_OBJ(category, id) /*comps_utils.h macro*/
112
118HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, name) /*comps_utils.h macro*/
119
125HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, desc) /*comps_utils.h macro*/
126
132HEAD_COMPS_PROP_GETTER(category, COMPS_DocCategory, display_order) /*comps_utils.h macro*/
134
139
145HEAD_COMPS_DOCOBJ_GETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
147
152
159HEAD_COMPS_DOCOBJ_SETOBJLIST(doccategory, COMPS_DocCategory, group_ids, group_ids)
161
162HEAD_COMPS_DOCOBJ_GETARCHES(doccategory, COMPS_DocCategory)
163HEAD_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
205extern COMPS_ValRuleGeneric* COMPS_DocCategory_ValidateRules[];
206#endif
comps_doccategory_add_groupid
void comps_doccategory_add_groupid(COMPS_DocCategory *cat, COMPS_DocGroupId *gid)
comps_doccategory_cmp_u
signed char comps_doccategory_cmp_u(COMPS_Object *cat1, COMPS_Object *cat2)
comps_doccategory_union
COMPS_DocCategory * comps_doccategory_union(COMPS_DocCategory *c1, COMPS_DocCategory *c2)
comps_doccategory_intersect
COMPS_DocCategory * comps_doccategory_intersect(COMPS_DocCategory *c1, COMPS_DocCategory *c2)
comps_docgroupid.h
COMPS_DocGroupId header file.
comps_obj.h
COMPS_Object header file.
COMPS_Object_HEAD
#define COMPS_Object_HEAD
Definition comps_obj.h:86
COMPS_Object_TAIL
#define COMPS_Object_TAIL(obj)
insert "extern COMPS_ObjectInfo <obj>_ObjInfo" statement. Use this macro in combination with COMPS_OB...
Definition comps_obj.h:89
comps_objdict.h
Libcomps dictionary and multi-dictionary. COMPS_ObjDict and COMPS_ObjMDict are both derivates of COMP...
comps_objlist.h
A Documented file. Details.
COMPS_DocCategory
Definition comps_doccategory.h:49
COMPS_DocCategory::properties
COMPS_ObjDict * properties
Definition comps_doccategory.h:51
COMPS_DocCategory::name_by_lang
COMPS_ObjDict * name_by_lang
Definition comps_doccategory.h:52
COMPS_DocCategory::desc_by_lang
COMPS_ObjDict * desc_by_lang
Definition comps_doccategory.h:53
COMPS_DocCategory::group_ids
COMPS_ObjList * group_ids
Definition comps_doccategory.h:55
COMPS_DocGroupId
Definition comps_docgroupid.h:36
COMPS_ObjList
Definition comps_objlist.h:41
COMPS_Object
Definition comps_obj.h:124