goa: Add missing linker flag (for real).
[platform/upstream/evolution-data-server.git] / libedataserver / e-flag.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
4  *
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.
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 GNU
12  * General Public License for more details.
13  *
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.
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_FLAG_H
25 #define E_FLAG_H
26
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). */
29
30 #include <glib.h>
31
32 G_BEGIN_DECLS
33
34 /**
35  * EFlag:
36  *
37  * Contains only private data that should be read and manipulated using the
38  * functions below.
39  *
40  * Since: 1.12
41  **/
42 typedef struct _EFlag EFlag;
43
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,
50                                                  gint64 end_time);
51 void            e_flag_free                     (EFlag *flag);
52
53 #ifndef EDS_DISABLE_DEPRECATED
54 gboolean        e_flag_timed_wait               (EFlag *flag,
55                                                  GTimeVal *abs_time);
56 #endif /* EDS_DISABLE_DEPRECATED */
57
58 G_END_DECLS
59
60 #endif /* E_FLAG_H */