1 /* 2 * e-operation-pool.h 3 * 4 * Copyright (C) 2011 Novell, Inc. (www.novell.com) 5 * 6 * This library is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 13 * for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library. If not, see <http://www.gnu.org/licenses/>. 17 * 18 */ 19 20 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION) 21 #error "Only <libedataserver/libedataserver.h> should be included directly." 22 #endif 23 24 #ifndef E_OPERATION_POOL_H 25 #define E_OPERATION_POOL_H 26 27 #include <gio/gio.h> 28 29 /** 30 * EOperationPool: 31 * 32 * Contains only private data that should be read and manipulated using the 33 * functions below. 34 * 35 * Since: 3.2 36 **/ 37 typedef struct _EOperationPool EOperationPool; 38 39 EOperationPool *e_operation_pool_new (guint max_threads, GFunc thread_func, gpointer user_data); 40 void e_operation_pool_free (EOperationPool *pool); 41 guint32 e_operation_pool_reserve_opid (EOperationPool *pool); 42 void e_operation_pool_release_opid (EOperationPool *pool, guint32 opid); 43 void e_operation_pool_push (EOperationPool *pool, gpointer opdata); 44 45 #endif /* E_OPERATION_POOL_H */ 46