libcomps: /build/libcomps/src/libcomps-0.1.21/libcomps/src/comps_docpackage.h Source File

libcomps ..

Loading...
Searching...
No Matches
comps_docpackage.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_DOCPACKAGE_H
21#define COMPS_DOCPACKAGE_H
22
23#include "comps_utils.h"
24#include "comps_obj.h"
25#include "comps_log.h"
26
27#include "comps_validate.h"
28#include "comps_default.h"
29
33
36 typedef enum {COMPS_PACKAGE_DEFAULT, COMPS_PACKAGE_OPTIONAL,
37 COMPS_PACKAGE_CONDITIONAL, COMPS_PACKAGE_MANDATORY,
38 COMPS_PACKAGE_UNKNOWN} COMPS_PackageType;
39
41 typedef struct {
42 COMPS_Object_HEAD;
43 COMPS_PackageType type;
44 COMPS_Str *name;
45 COMPS_Str *requires;
46 COMPS_Num *basearchonly;
47 COMPS_ObjList *arches;
48} COMPS_DocGroupPackage;
49
50
51//HEAD_COMPS_CREATE_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
52//HEAD_COMPS_COPY_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
53//HEAD_COMPS_DESTROY_u(docpackage, COMPS_DocGroupPackagePackage) /*comps_utils.h macro*/
54
55signed char comps_docpackage_cmp_u(COMPS_Object *pkg1, COMPS_Object *pkg2);
56char comps_docpackage_cmp_set(void *pkg1, void *pkg2);
57
63 COMPS_Object* comps_docpackage_get_name(COMPS_DocGroupPackage *pkg);
64
72 void comps_docpackage_set_name(COMPS_DocGroupPackage *pkg, char *name, char copy);
73
79 COMPS_Object* comps_docpackage_get_requires(COMPS_DocGroupPackage *pkg);
80
88 void comps_docpackage_set_requires(COMPS_DocGroupPackage *pkg, char *requires, char copy);
89
95 COMPS_Object* comps_docpackage_get_type(COMPS_DocGroupPackage *pkg);
96
103 void comps_docpackage_set_type(COMPS_DocGroupPackage *pkg,
104 COMPS_PackageType type,
105 bool unset);
106
111 void comps_docpackage_set_type_i(COMPS_DocGroupPackage *pkg, int type, bool unset);
112
117 const char* comps_docpackage_type_str(COMPS_PackageType type);
118
123 void comps_docpackage_set_basearchonly(COMPS_DocGroupPackage *pkg,
124 int basearchonly, bool unset);
125
130 COMPS_Object* comps_docpackage_get_basearchonly(COMPS_DocGroupPackage *pkg);
131
132char __comps_docpackage_idcmp(void *pkg1, void *pkg2);
133 COMPS_ObjList* comps_docpackage_arches(COMPS_DocGroupPackage *pkg);
134void comps_docpackage_set_arches(COMPS_DocGroupPackage *pkg,
135 COMPS_ObjList *arches);
136
137signed char comps_docpackage_xml(COMPS_DocGroupPackage *pkg,
138 xmlTextWriterPtr writer,
139 COMPS_Log *log, COMPS_XMLOptions *xml_options,
140 COMPS_DefaultsOptions *def_options);
141
142extern COMPS_ObjectInfo COMPS_DocGroupPackage_ObjInfo;
143extern COMPS_ValRuleGeneric* COMPS_DocGroupPackage_ValidateRules[];
144
145#endif
146
comps_docpackage_get_basearchonly
COMPS_Object * comps_docpackage_get_basearchonly(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_type_i
void comps_docpackage_set_type_i(COMPS_DocGroupPackage *pkg, int type, bool unset)
comps_docpackage_get_type
COMPS_Object * comps_docpackage_get_type(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_basearchonly
void comps_docpackage_set_basearchonly(COMPS_DocGroupPackage *pkg, int basearchonly, bool unset)
comps_docpackage_get_name
COMPS_Object * comps_docpackage_get_name(COMPS_DocGroupPackage *pkg)
comps_docpackage_set_requires
void comps_docpackage_set_requires(COMPS_DocGroupPackage *pkg, char *requires, char copy)
comps_docpackage_type_str
const char * comps_docpackage_type_str(COMPS_PackageType type)
comps_docpackage_set_type
void comps_docpackage_set_type(COMPS_DocGroupPackage *pkg, COMPS_PackageType type, bool unset)
comps_docpackage_set_name
void comps_docpackage_set_name(COMPS_DocGroupPackage *pkg, char *name, char copy)
COMPS_PackageType
COMPS_PackageType
Definition comps_docpackage.h:36
comps_docpackage_get_requires
COMPS_Object * comps_docpackage_get_requires(COMPS_DocGroupPackage *pkg)
comps_obj.h
COMPS_Object header file.
COMPS_Object_HEAD
#define COMPS_Object_HEAD
Definition comps_obj.h:86
COMPS_DocGroupPackage
Definition comps_docpackage.h:41
COMPS_DocGroupPackage::type
COMPS_PackageType type
Definition comps_docpackage.h:43
COMPS_DocGroupPackage::basearchonly
COMPS_Str *COMPS_Num * basearchonly
Definition comps_docpackage.h:46
COMPS_DocGroupPackage::name
COMPS_Str * name
Definition comps_docpackage.h:44
COMPS_Num
Definition comps_obj.h:133
COMPS_ObjList
Definition comps_objlist.h:41
COMPS_ObjectInfo
Definition comps_obj.h:102
COMPS_Object
Definition comps_obj.h:124
COMPS_Str
Definition comps_obj.h:143