1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, see <http://www.gnu.org/licenses/>.
18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
19 #error "Only <libedataserver/libedataserver.h> should be included directly."
22 #ifndef EDS_DISABLE_DEPRECATED
24 /* Do not generate bindings. */
25 #ifndef __GI_SCANNER__
27 #ifndef E_CANCELLABLE_LOCKS_H
28 #define E_CANCELLABLE_LOCKS_H
35 typedef struct _ECancellableMutex ECancellableMutex;
36 typedef struct _ECancellableRecMutex ECancellableRecMutex;
38 void e_cancellable_mutex_init (ECancellableMutex *mutex);
39 void e_cancellable_mutex_clear (ECancellableMutex *mutex);
40 gboolean e_cancellable_mutex_lock (ECancellableMutex *mutex,
41 GCancellable *cancellable);
42 void e_cancellable_mutex_unlock (ECancellableMutex *mutex);
43 GMutex * e_cancellable_mutex_get_internal_mutex
44 (ECancellableMutex *mutex);
46 void e_cancellable_rec_mutex_init (ECancellableRecMutex *rec_mutex);
47 void e_cancellable_rec_mutex_clear (ECancellableRecMutex *rec_mutex);
48 gboolean e_cancellable_rec_mutex_lock (ECancellableRecMutex *rec_mutex,
49 GCancellable *cancellable);
50 void e_cancellable_rec_mutex_unlock (ECancellableRecMutex *rec_mutex);
52 /* private structures, members should not be accessed
53 * otherwise than with above functions */
55 struct _ECancellableLocksBase {
60 struct _ECancellableMutex {
61 struct _ECancellableLocksBase base;
65 struct _ECancellableRecMutex {
66 struct _ECancellableLocksBase base;
72 #endif /* E_CANCELLABLE_LOCKS_H */
74 #endif /* __GI_SCANNER__ */
76 #endif /* EDS_DISABLE_DEPRECATED */