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
6 * modify it under the terms of version 2 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.
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 GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
21 #error "Only <libedataserver/libedataserver.h> should be included directly."
27 /* An EFlag is essentially a binary semaphore with a more intuitive interface.
28 * Based on Python's threading.Event class ("EEvent" was already taken). */
37 * Contains only private data that should be read and manipulated using the
42 typedef struct _EFlag EFlag;
44 EFlag * e_flag_new (void);
45 gboolean e_flag_is_set (EFlag *flag);
46 void e_flag_set (EFlag *flag);
47 void e_flag_clear (EFlag *flag);
48 void e_flag_wait (EFlag *flag);
49 gboolean e_flag_wait_until (EFlag *flag,
51 void e_flag_free (EFlag *flag);
53 #ifndef EDS_DISABLE_DEPRECATED
54 gboolean e_flag_timed_wait (EFlag *flag,
56 #endif /* EDS_DISABLE_DEPRECATED */