libcomps ..

Loading...
Searching...
No Matches
comps_docgroup.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_DOCGROUP_H
21#define COMPS_DOCGROUP_H
22
23#include "comps_utils.h"
24#include "comps_obj.h"
25#include "comps_objdict.h"
26#include "comps_objlist.h"
27#include "comps_docpackage.h"
28#include "comps_validate.h"
29#include "comps_radix.h"
30#include "comps_default.h"
31
32#include <stddef.h>
33#include <assert.h>
34
49 typedef struct {
50 COMPS_Object_HEAD;
51 COMPS_ObjDict *properties;
53 COMPS_ObjDict *name_by_lang;
55 COMPS_ObjDict *desc_by_lang;
57 COMPS_ObjList *packages;
59} COMPS_DocGroup;
60
61//HEAD_COMPS_CREATE_u(docgroup, COMPS_DocGroup) /*comps_utils.h macro*/
62//HEAD_COMPS_COPY_u(docgroup, COMPS_DocGroup) /*comps_utils.h macro*/
63//HEAD_COMPS_DESTROY_u(docgroup, COMPS_DocGroup) /*comps_utils.h macro*/
64
74HEAD_COMPS_STRPROP_SETTER(group, COMPS_DocGroup, id) /*comps_utils.h macro*/
75
76
81HEAD_COMPS_STRPROP_SETTER(group, COMPS_DocGroup, name) /*comps_utils.h macro*/
82
88HEAD_COMPS_STRPROP_SETTER(group, COMPS_DocGroup, desc) /*comps_utils.h macro*/
89
95HEAD_COMPS_NUMPROP_SETTER(group, COMPS_DocGroup, def) /*comps_utils.h macro*/
96
102HEAD_COMPS_NUMPROP_SETTER(group, COMPS_DocGroup, uservisible) /*comps_utils.h macro*/
103
109HEAD_COMPS_NUMPROP_SETTER(group, COMPS_DocGroup, biarchonly) /*comps_utils.h macro*/
110
116HEAD_COMPS_NUMPROP_SETTER(group, COMPS_DocGroup, display_order) /*comps_utils.h macro*/
117
123HEAD_COMPS_STRPROP_SETTER(group, COMPS_DocGroup, langonly) /*comps_utils.h macro*/
136HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, id) /*comps_utils.h macro*/
137HEAD_COMPS_PROP_GETTER_OBJ(group, id) /*comps_utils.h macro*/
138
144HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, name) /*comps_utils.h macro*/
145
151HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, desc) /*comps_utils.h macro*/
152
158HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, def) /*comps_utils.h macro*/
159
165HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, uservisible) /*comps_utils.h macro*/
166
172HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, biarchonly) /*comps_utils.h macro*/
173
179HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, display_order) /*comps_utils.h macro*/
180
186HEAD_COMPS_PROP_GETTER(group, COMPS_DocGroup, langonly) /*comps_utils.h macro*/
199HEAD_COMPS_DOCOBJ_GETOBJLIST(docgroup, COMPS_DocGroup, packages, packages)
213HEAD_COMPS_DOCOBJ_SETOBJLIST(docgroup, COMPS_DocGroup, packages, packages)
216HEAD_COMPS_DOCOBJ_GETARCHES(docgroup, COMPS_DocGroup)
217HEAD_COMPS_DOCOBJ_SETARCHES(docgroup, COMPS_DocGroup)
218
219 signed char comps_docgroup_cmp_u(COMPS_Object *group1, COMPS_Object *group2);
220 char __comps_docgroup_idcmp(void *g1, void *g2);
221
227 void comps_docgroup_add_package(COMPS_DocGroup *group,
228 COMPS_DocGroupPackage *package);
229
238 COMPS_ObjList* comps_docgroup_get_packages(COMPS_DocGroup *group, char *name,
239 COMPS_PackageType type);
240
246 COMPS_DocGroup* comps_docgroup_union(COMPS_DocGroup *g1, COMPS_DocGroup *g2);
247
253 COMPS_DocGroup* comps_docgroup_intersect(COMPS_DocGroup *g1,
254 COMPS_DocGroup *g2);
255
256 signed char comps_docgroup_xml(COMPS_DocGroup *group, xmlTextWriterPtr writer,
257 COMPS_Log *log, COMPS_XMLOptions *xml_options,
258 COMPS_DefaultsOptions *def_options);
259
260 COMPS_DocGroup* comps_docgroup_arch_filter(COMPS_DocGroup *source,
261 COMPS_ObjList *arches);
262
263extern COMPS_ObjectInfo COMPS_DocGroup_ObjInfo;
264extern COMPS_ValRuleGeneric* COMPS_DocGroup_ValidateRules[];
265
266#endif
comps_docgroup_get_packages
COMPS_ObjList * comps_docgroup_get_packages(COMPS_DocGroup *group, char *name, COMPS_PackageType type)
comps_docgroup_union
COMPS_DocGroup * comps_docgroup_union(COMPS_DocGroup *g1, COMPS_DocGroup *g2)
comps_docgroup_add_package
void comps_docgroup_add_package(COMPS_DocGroup *group, COMPS_DocGroupPackage *package)
comps_docgroup_intersect
COMPS_DocGroup * comps_docgroup_intersect(COMPS_DocGroup *g1, COMPS_DocGroup *g2)
comps_docpackage.h
COMPS_DocPackage header file.
COMPS_PackageType
COMPS_PackageType
Definition comps_docpackage.h:36
comps_obj.h
COMPS_Object header file.
COMPS_Object_HEAD
#define COMPS_Object_HEAD
Definition comps_obj.h:86
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_DocGroupPackage
Definition comps_docpackage.h:41
COMPS_DocGroup
Definition comps_docgroup.h:49
COMPS_DocGroup::name_by_lang
COMPS_ObjDict * name_by_lang
Definition comps_docgroup.h:53
COMPS_DocGroup::packages
COMPS_ObjList * packages
Definition comps_docgroup.h:57
COMPS_DocGroup::properties
COMPS_ObjDict * properties
Definition comps_docgroup.h:51
COMPS_DocGroup::desc_by_lang
COMPS_ObjDict * desc_by_lang
Definition comps_docgroup.h:55
COMPS_ObjList
Definition comps_objlist.h:41
COMPS_ObjectInfo
Definition comps_obj.h:102
COMPS_Object
Definition comps_obj.h:124