4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="Evolution-Data-Server Manual: Utilities (libedataserver)">
8
8
<link rel="up" href="ch01.html" title="Evolution-Data-Server Manual: Utilities (libedataserver)">
9
9
<link rel="prev" href="EComponentListener.html" title="EComponentListener">
28
28
<a href="#libedataserver-EFlag.description" class="shortcut">Description</a>
31
<div class="refentry" lang="en">
31
<div class="refentry" title="EFlag">
32
32
<a name="libedataserver-EFlag"></a><div class="titlepage"></div>
33
33
<div class="refnamediv"><table width="100%"><tr>
38
38
<td valign="top" align="right"></td>
39
39
</tr></table></div>
40
<div class="refsynopsisdiv">
40
<div class="refsynopsisdiv" title="Synopsis">
41
41
<a name="libedataserver-EFlag.synopsis"></a><h2>Synopsis</h2>
42
42
<pre class="synopsis">
43
43
<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a>;
44
44
<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> * <a class="link" href="libedataserver-EFlag.html#e-flag-new" title="e_flag_new ()">e_flag_new</a> (void);
45
gboolean <a class="link" href="libedataserver-EFlag.html#e-flag-is-set" title="e_flag_is_set ()">e_flag_is_set</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
46
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
47
>gboolean</a> <a class="link" href="libedataserver-EFlag.html#e-flag-is-set" title="e_flag_is_set ()">e_flag_is_set</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
46
48
void <a class="link" href="libedataserver-EFlag.html#e-flag-set" title="e_flag_set ()">e_flag_set</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
47
49
void <a class="link" href="libedataserver-EFlag.html#e-flag-clear" title="e_flag_clear ()">e_flag_clear</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
48
50
void <a class="link" href="libedataserver-EFlag.html#e-flag-wait" title="e_flag_wait ()">e_flag_wait</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
49
gboolean <a class="link" href="libedataserver-EFlag.html#e-flag-timed-wait" title="e_flag_timed_wait ()">e_flag_timed_wait</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag,
52
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
53
>gboolean</a> <a class="link" href="libedataserver-EFlag.html#e-flag-timed-wait" title="e_flag_timed_wait ()">e_flag_timed_wait</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag,
55
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
56
>GTimeVal</a> *abs_time);
51
57
void <a class="link" href="libedataserver-EFlag.html#e-flag-free" title="e_flag_free ()">e_flag_free</a> (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);
54
<div class="refsect1" lang="en">
60
<div class="refsect1" title="Description">
55
61
<a name="libedataserver-EFlag.description"></a><h2>Description</h2>
57
63
An <a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag"><span class="type">EFlag</span></a> is a simple thread synchronization mechanism. It implements a
58
64
thread-safe flag that can be blocked on.
61
<div class="refsect1" lang="en">
67
<div class="refsect1" title="Details">
62
68
<a name="libedataserver-EFlag.details"></a><h2>Details</h2>
63
<div class="refsect2" lang="en">
69
<div class="refsect2" title="EFlag">
64
70
<a name="EFlag"></a><h3>EFlag</h3>
65
71
<pre class="programlisting">typedef struct _EFlag EFlag;</pre>
73
<div class="refsect2" lang="en">
79
<div class="refsect2" title="e_flag_new ()">
74
80
<a name="e-flag-new"></a><h3>e_flag_new ()</h3>
75
81
<pre class="programlisting"><a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> * e_flag_new (void);</pre>
90
<div class="refsect2" lang="en">
96
<div class="refsect2" title="e_flag_is_set ()">
91
97
<a name="e-flag-is-set"></a><h3>e_flag_is_set ()</h3>
92
<pre class="programlisting">gboolean e_flag_is_set (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>
98
<pre class="programlisting"><a
99
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
100
>gboolean</a> e_flag_is_set (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>
94
102
Returns the state of <em class="parameter"><code>flag</code></em>.</p>
106
114
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
107
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>flag</code></em> is set
116
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
117
><code class="literal">TRUE</code></a> if <em class="parameter"><code>flag</code></em> is set
114
<div class="refsect2" lang="en">
124
<div class="refsect2" title="e_flag_set ()">
115
125
<a name="e-flag-set"></a><h3>e_flag_set ()</h3>
116
126
<pre class="programlisting">void e_flag_set (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>
133
<div class="refsect2" lang="en">
143
<div class="refsect2" title="e_flag_clear ()">
134
144
<a name="e-flag-clear"></a><h3>e_flag_clear ()</h3>
135
145
<pre class="programlisting">void e_flag_clear (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>
151
<div class="refsect2" lang="en">
161
<div class="refsect2" title="e_flag_wait ()">
152
162
<a name="e-flag-wait"></a><h3>e_flag_wait ()</h3>
153
163
<pre class="programlisting">void e_flag_wait (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>
169
<div class="refsect2" lang="en">
179
<div class="refsect2" title="e_flag_timed_wait ()">
170
180
<a name="e-flag-timed-wait"></a><h3>e_flag_timed_wait ()</h3>
171
<pre class="programlisting">gboolean e_flag_timed_wait (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag,
172
GTimeVal *abs_time);</pre>
181
<pre class="programlisting"><a
182
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
183
>gboolean</a> e_flag_timed_wait (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag,
185
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
186
>GTimeVal</a> *abs_time);</pre>
174
188
Blocks until <em class="parameter"><code>flag</code></em> is set, or until the time specified by <em class="parameter"><code>abs_time</code></em>.
175
189
If <em class="parameter"><code>flag</code></em> is already set, the function returns immediately. The return
176
190
value indicates the state of <em class="parameter"><code>flag</code></em> after waiting.
179
If <em class="parameter"><code>abs_time</code></em> is <code class="literal">NULL</code>, <a class="link" href="libedataserver-EFlag.html#e-flag-timed-wait" title="e_flag_timed_wait ()"><code class="function">e_flag_timed_wait()</code></a> acts like <a class="link" href="libedataserver-EFlag.html#e-flag-wait" title="e_flag_wait ()"><code class="function">e_flag_wait()</code></a>.
193
If <em class="parameter"><code>abs_time</code></em> is <a
194
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
195
><code class="literal">NULL</code></a>, <a class="link" href="libedataserver-EFlag.html#e-flag-timed-wait" title="e_flag_timed_wait ()"><code class="function">e_flag_timed_wait()</code></a> acts like <a class="link" href="libedataserver-EFlag.html#e-flag-wait" title="e_flag_wait ()"><code class="function">e_flag_wait()</code></a>.
182
To easily calculate <em class="parameter"><code>abs_time</code></em>, a combination of <code class="function">g_get_current_time()</code> and
183
<code class="function">g_time_val_add()</code> can be used.</p>
198
To easily calculate <em class="parameter"><code>abs_time</code></em>, a combination of <a
199
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#g-get-current-time"
200
><code class="function">g_get_current_time()</code></a> and
202
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#g-time-val-add"
203
><code class="function">g_time_val_add()</code></a> can be used.</p>
186
206
<div class="variablelist"><table border="0">
195
215
<td><p><span class="term"><em class="parameter"><code>abs_time</code></em> :</span></p></td>
196
<td> a <span class="type">GTimeVal</span>, determining the final time
217
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
218
><span class="type">GTimeVal</span></a>, determining the final time
200
222
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
201
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>flag</code></em> is now set
224
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
225
><code class="literal">TRUE</code></a> if <em class="parameter"><code>flag</code></em> is now set
208
<div class="refsect2" lang="en">
232
<div class="refsect2" title="e_flag_free ()">
209
233
<a name="e-flag-free"></a><h3>e_flag_free ()</h3>
210
234
<pre class="programlisting">void e_flag_free (<a class="link" href="libedataserver-EFlag.html#EFlag" title="EFlag">EFlag</a> *flag);</pre>