createrepo_c library
0.4.0
C library for metadata manipulation
Main Page
Modules
Data Structures
Files
File List
All
Data Structures
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
dumper_thread.h
1
/* createrepo_c - Library of routines for manipulation with repodata
2
* Copyright (C) 2014 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_DUMPER_THREAD_H__
21
#define __C_CREATEREPOLIB_DUMPER_THREAD_H__
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#include <rpm/rpmlib.h>
28
#include <glib.h>
29
#include "load_metadata.h"
30
#include "locate_metadata.h"
31
#include "misc.h"
32
#include "package.h"
33
#include "sqlite.h"
34
#include "xml_file.h"
35
41
struct
PoolTask
{
42
long
id;
// ID of the task
43
char
* full_path;
// Complete path - /foo/bar/packages/foo.rpm
44
char
* filename;
// Just filename - foo.rpm
45
char
* path;
// Just path - /foo/bar/packages
46
};
47
48
struct
UserData
{
49
GThreadPool *pool;
// thread pool
50
cr_XmlFile
*pri_f;
// Opened compressed primary.xml.*
51
cr_XmlFile
*fil_f;
// Opened compressed filelists.xml.*
52
cr_XmlFile
*oth_f;
// Opened compressed other.xml.*
53
cr_SqliteDb
*pri_db;
// Primary db
54
cr_SqliteDb
*fil_db;
// Filelists db
55
cr_SqliteDb
*oth_db;
// Other db
56
int
changelog_limit;
// Max number of changelogs for a package
57
const
char
*location_base;
// Base location url
58
int
repodir_name_len;
// Len of path to repo /foo/bar/repodata
59
// This part |<----->|
60
const
char
*checksum_type_str;
// Name of selected checksum
61
cr_ChecksumType
checksum_type;
// Constant representing selected checksum
62
const
char
*checksum_cachedir;
// Dir with cached checksums
63
gboolean skip_symlinks;
// Skip symlinks
64
long
package_count;
// Total number of packages to process
65
66
// Update stuff
67
gboolean skip_stat;
// Skip stat() while updating
68
cr_Metadata
*old_metadata;
// Loaded metadata
69
70
// Thread serialization
71
GMutex *mutex_pri;
// Mutex for primary metadata
72
GMutex *mutex_fil;
// Mutex for filelists metadata
73
GMutex *mutex_oth;
// Mutex for other metadata
74
GCond *cond_pri;
// Condition for primary metadata
75
GCond *cond_fil;
// Condition for filelists metadata
76
GCond *cond_oth;
// Condition for other metadata
77
volatile
long
id_pri;
// ID of task on turn (write primary metadata)
78
volatile
long
id_fil;
// ID of task on turn (write filelists metadata)
79
volatile
long
id_oth;
// ID of task on turn (write other metadata)
80
81
// Buffering
82
GQueue *buffer;
// Buffer for done tasks
83
GMutex *mutex_buffer;
// Mutex for accessing the buffer
84
};
85
86
87
void
88
cr_dumper_thread(gpointer data, gpointer user_data);
89
92
#ifdef __cplusplus
93
}
94
#endif
95
96
#endif
/* __C_CREATEREPOLIB_DUMPER_THREAD_H__ */
PoolTask
Definition:
dumper_thread.h:41
cr_ChecksumType
cr_ChecksumType
Definition:
checksum.h:41
cr_Metadata
struct _cr_Metadata cr_Metadata
Definition:
load_metadata.h:85
UserData
Definition:
dumper_thread.h:48
cr_XmlFile
Definition:
xml_file.h:47
cr_SqliteDb
Definition:
sqlite.h:87
src
dumper_thread.h
Generated on Thu Jul 3 2014 23:25:04 for createrepo_c library by
1.8.5