2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 2005-2012 DINH Viet Hoa and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef ETPAN_THREAD_MANAGER_TYPES_H
22 #define ETPAN_THREAD_MANAGER_TYPES_H
25 #include <libetpan/libetpan.h>
27 struct etpan_thread_manager
{
30 carray
* thread_pending
;
31 int can_create_thread
;
39 struct etpan_thread_manager
* manager
;
45 carray
* op_done_list
;
50 struct mailsem
* start_sem
;
51 struct mailsem
* stop_sem
;
52 struct mailsem
* op_sem
;
55 struct etpan_thread_op
{
56 struct etpan_thread
* thread
;
58 void (* run
)(struct etpan_thread_op
* op
);
60 void (* callback
)(int cancelled
, void * result
, void * callback_data
);
63 void (* cleanup
)(struct etpan_thread_op
* op
);