createrepo_c library 1.2.1 C library for metadata manipulation

threads.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2 * Copyright (C) 2013 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_THREADS_H__
21 #define __C_CREATEREPOLIB_THREADS_H__
22
23 #include <glib.h>
24 #include "compression_wrapper.h"
25 #include "checksum.h"
26 #include "repomd.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
69 typedef struct {
70 char *src;
72 char *dst;
75 cr_CompressionType type;
77 cr_ContentStat *stat;
79 char *zck_dict_dir;
81 gboolean zck_auto_chunk;
83 int delsrc;
85 GError *err;
87 } cr_CompressionTask;
88
108 cr_CompressionTask *
109 cr_compressiontask_new(const char *src,
110 const char *dst,
111 cr_CompressionType compression_type,
112 cr_ChecksumType checksum_type,
113 const char *zck_dict_dir,
114 gboolean zck_auto_chunk,
115 int delsrc,
116 GError **err);
117
122 void
123 cr_compressiontask_free(cr_CompressionTask *task, GError **err);
124
127 void
128 cr_compressing_thread(gpointer data, gpointer user_data);
129
132 typedef struct {
133 cr_RepomdRecord *record;
134 cr_ChecksumType checksum_type;
135 GError *err;
136 } cr_RepomdRecordFillTask;
137
144 cr_RepomdRecordFillTask *
145 cr_repomdrecordfilltask_new(cr_RepomdRecord *record,
146 cr_ChecksumType checksum_type,
147 GError **err);
148
151 void
152 cr_repomdrecordfilltask_free(cr_RepomdRecordFillTask *task, GError **err);
153
156 void
157 cr_repomd_record_fill_thread(gpointer data, gpointer user_data);
158
161 void
162 cr_rewrite_pkg_count_thread(gpointer data, gpointer user_data);
163
166 #ifdef __cplusplus
167 }
168 #endif
169
170 #endif /* __C_CREATEREPOLIB_THREADS_H__ */
cr_CompressionTask
Definition: threads.h:69
cr_RepomdRecordFillTask
Definition: threads.h:132
cr_RepomdRecordFillTask::checksum_type
cr_ChecksumType checksum_type
Definition: threads.h:134
cr_CompressionTask::delsrc
int delsrc
Definition: threads.h:83
cr_CompressionTask::type
cr_CompressionType type
Definition: threads.h:75
cr_CompressionTask::zck_dict_dir
char * zck_dict_dir
Definition: threads.h:79
cr_compressiontask_new
cr_CompressionTask * cr_compressiontask_new(const char *src, const char *dst, cr_CompressionType compression_type, cr_ChecksumType checksum_type, const char *zck_dict_dir, gboolean zck_auto_chunk, int delsrc, GError **err)
cr_repomdrecordfilltask_new
cr_RepomdRecordFillTask * cr_repomdrecordfilltask_new(cr_RepomdRecord *record, cr_ChecksumType checksum_type, GError **err)
cr_CompressionTask::zck_auto_chunk
gboolean zck_auto_chunk
Definition: threads.h:81
cr_compressiontask_free
void cr_compressiontask_free(cr_CompressionTask *task, GError **err)
cr_CompressionTask::dst
char * dst
Definition: threads.h:72
cr_ChecksumType
cr_ChecksumType
Definition: checksum.h:43
cr_RepomdRecord
Definition: repomd.h:74
cr_repomdrecordfilltask_free
void cr_repomdrecordfilltask_free(cr_RepomdRecordFillTask *task, GError **err)
cr_CompressionTask::stat
cr_ContentStat * stat
Definition: threads.h:77
cr_rewrite_pkg_count_thread
void cr_rewrite_pkg_count_thread(gpointer data, gpointer user_data)
cr_CompressionTask::src
char * src
Definition: threads.h:70
cr_CompressionTask::err
GError * err
Definition: threads.h:85
cr_compressing_thread
void cr_compressing_thread(gpointer data, gpointer user_data)
cr_CompressionType
cr_CompressionType
Definition: compression_wrapper.h:37
cr_RepomdRecordFillTask::err
GError * err
Definition: threads.h:135
cr_ContentStat
Definition: compression_wrapper.h:59
cr_repomd_record_fill_thread
void cr_repomd_record_fill_thread(gpointer data, gpointer user_data)
cr_RepomdRecordFillTask::record
cr_RepomdRecord * record
Definition: threads.h:133