createrepo_c library
C library for metadata manipulation
Hlavní stránka
Moduly
Třídy
Soubory
Seznam souborů
Vše
Třídy
Funkce
Proměnné
Definice typů
Výčty
Hodnoty výčtu
Skupiny
Stránky
load_metadata.h
1
/* createrepo_c - Library of routines for manipulation with repodata
2
* Copyright (C) 2012 Tomas Mlcoch
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but 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 the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17
* USA.
18
*/
19
20
#ifndef __C_CREATEREPOLIB_LOAD_METADATA_H__
21
#define __C_CREATEREPOLIB_LOAD_METADATA_H__
22
23
#include <glib.h>
24
#include "locate_metadata.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
36
typedef
enum
{
37
CR_HT_KEY_DEFAULT
,
38
CR_HT_KEY_HASH
=
CR_HT_KEY_DEFAULT
,
39
CR_HT_KEY_NAME
,
40
CR_HT_KEY_FILENAME
42
}
cr_HashTableKey
;
43
44
#define cr_metadata_key(X) ((X)->key)
45
#define cr_metadata_hashtable(X) ((X)->ht)
46
#define cr_metadata_chunk(X) ((X)->chunk)
47
51
struct
_cr_Metadata
{
52
cr_HashTableKey
key
;
53
GHashTable *
ht
;
54
GStringChunk *
chunk
;
55
GHashTable *
pkglist_ht
;
56
};
57
61
typedef
struct
_cr_Metadata
*
cr_Metadata
;
62
64
#define CR_LOAD_METADATA_OK 0
65
#define CR_LOAD_METADATA_ERR 1
83
cr_Metadata cr_new_metadata(cr_HashTableKey key,
84
int
use_single_chunk,
85
GSList *pkglist);
86
91
void
cr_destroy_metadata
(cr_Metadata md);
92
99
int
cr_load_xml_metadata
(cr_Metadata md,
100
struct
cr_MetadataLocation
*ml);
101
108
int
cr_locate_and_load_xml_metadata
(cr_Metadata md,
109
const
char
*repopath);
110
111
#ifdef __cplusplus
112
}
113
#endif
114
115
#endif
/* __C_CREATEREPOLIB_LOAD_METADATA_H__ */
src
load_metadata.h
Generováno čt 14. úno 2013 05.42:57 pro projekt createrepo_c library programem
1.8.3.1