1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>TnyCamelAccount</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
7
<link rel="start" href="index.html" title="Reference Manual of the tinymail framework">
8
<link rel="up" href="libtinymail-camel.html" title="libtinymail-camel - implementation of the main library">
9
<link rel="prev" href="libtinymail-camel.html" title="libtinymail-camel - implementation of the main library">
10
<link rel="next" href="TnyCamelStoreAccount.html" title="TnyCamelStoreAccount">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="preface" href="pr01.html" title="Introduction">
14
<link rel="reference" href="rn01.html" title="Object Index">
15
<link rel="reference" href="rn02.html" title="API Reference">
16
<link rel="chapter" href="libtinymail.html" title="libtinymail - main abstraction library">
17
<link rel="chapter" href="libtinymailui.html" title="libtinymailui - ui abstraction library">
18
<link rel="chapter" href="libtinymailui-gtk.html" title="libtinymailui-gtk - an optional ui implementation library">
19
<link rel="chapter" href="libtinymail-gnomevfs.html" title="libtinymail-gnomevfs - an optional implementation library">
20
<link rel="chapter" href="libtinymailui-mozembed.html" title="libtinymailui-mozembed - an optional ui implementation library">
21
<link rel="chapter" href="libtinymail-gnome-desktop.html" title="libtinymail-gnome-desktop - implementations for a gnome desktop">
22
<link rel="chapter" href="libtinymail-camel.html" title="libtinymail-camel - implementation of the main library">
23
<link rel="index" href="ix01.html" title="Index">
25
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
26
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
28
<td><a accesskey="p" href="libtinymail-camel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
29
<td><a accesskey="u" href="libtinymail-camel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
30
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
31
<th width="100%" align="center">Reference Manual of the tinymail framework</th>
32
<td><a accesskey="n" href="TnyCamelStoreAccount.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2690303" class="shortcut">Top</a>
36
<a href="#id2691147" class="shortcut">Description</a>
38
<a href="#id2691056" class="shortcut">Object Hierarchy</a>
40
<a href="#id2691096" class="shortcut">Implemented Interfaces</a>
42
<a href="#id2691118" class="shortcut">Signals</a></nobr></td></tr>
44
<div class="refentry" lang="en">
45
<a name="TnyCamelAccount"></a><div class="titlepage"></div>
46
<div class="refnamediv"><table width="100%"><tr>
49
<a name="id2690303"></a><span class="refentrytitle">TnyCamelAccount</span>
51
<p>TnyCamelAccount — A abstract account type implemented for Camel</p>
53
<td valign="top" align="right"></td>
55
<div class="refsynopsisdiv">
57
<pre class="synopsis">
61
#define <a href="TnyCamelAccount.html#TNY-TYPE-CAMEL-ACCOUNT:CAPS">TNY_TYPE_CAMEL_ACCOUNT</a>
62
#define <a href="TnyCamelAccount.html#TNY-CAMEL-ACCOUNT:CAPS">TNY_CAMEL_ACCOUNT</a> (obj)
63
#define <a href="TnyCamelAccount.html#TNY-CAMEL-ACCOUNT-CLASS:CAPS">TNY_CAMEL_ACCOUNT_CLASS</a> (vtable)
64
#define <a href="TnyCamelAccount.html#TNY-IS-CAMEL-ACCOUNT:CAPS">TNY_IS_CAMEL_ACCOUNT</a> (obj)
65
#define <a href="TnyCamelAccount.html#TNY-CAMEL-ACCOUNT-GET-CLASS:CAPS">TNY_CAMEL_ACCOUNT_GET_CLASS</a> (inst)
66
void (<a href="TnyCamelAccount.html#TnyCamelSetOnlineCallback">*TnyCamelSetOnlineCallback</a>) (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *account,
70
<a href="TnyCamelAccount.html#TnyCamelAccount-struct">TnyCamelAccount</a>;
71
void <a href="TnyCamelAccount.html#tny-camel-account-add-option">tny_camel_account_add_option</a> (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
73
void <a href="TnyCamelAccount.html#tny-camel-account-set-session">tny_camel_account_set_session</a> (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
74
<a href="libtinymail-TnySessionCamel.html#TnySessionCamel">TnySessionCamel</a> *session);
75
void <a href="TnyCamelAccount.html#tny-camel-account-set-online">tny_camel_account_set_online</a> (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
77
<a href="TnyCamelAccount.html#TnyCamelSetOnlineCallback">TnyCamelSetOnlineCallback</a> callback,
79
void (<a href="TnyCamelAccount.html#TnyCamelGetSupportedSecureAuthCallback">*TnyCamelGetSupportedSecureAuthCallback</a>)
80
(<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
82
<a href="libtinymail-tny-list.html#TnyList">TnyList</a> *auth_types,
85
void <a href="TnyCamelAccount.html#tny-camel-account-get-supported-secure-authentication">tny_camel_account_get_supported_secure_authentication</a>
86
(<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
87
<a href="TnyCamelAccount.html#TnyCamelGetSupportedSecureAuthCallback">TnyCamelGetSupportedSecureAuthCallback</a> callback,
88
<a href="libtinymail-tny-shared.html#TnyStatusCallback">TnyStatusCallback</a> status_callback,
93
<div class="refsect1" lang="en">
94
<a name="id2691056"></a><h2>Object Hierarchy</h2>
95
<pre class="synopsis">
99
+----<a href="TnyCamelStoreAccount.html" title="TnyCamelStoreAccount">TnyCamelStoreAccount</a>
100
+----<a href="TnyCamelTransportAccount.html" title="TnyCamelTransportAccount">TnyCamelTransportAccount</a>
103
<div class="refsect1" lang="en">
104
<a name="id2691096"></a><h2>Implemented Interfaces</h2>
106
TnyCamelAccount implements
107
<a href="libtinymail-tny-account.html#TnyAccount">TnyAccount</a>.</p>
109
<div class="refsect1" lang="en">
110
<a name="id2691118"></a><h2>Signals</h2>
111
<pre class="synopsis">
113
"<a href="TnyCamelAccount.html#TnyCamelAccount-set-online-happened">set-online-happened</a>" : Run First
116
<div class="refsect1" lang="en">
117
<a name="id2691147"></a><h2>Description</h2>
119
A abstract account type implemented for Camel
122
<div class="refsect1" lang="en">
123
<a name="id2691162"></a><h2>Details</h2>
124
<div class="refsect2" lang="en">
125
<a name="id2691172"></a><h3>
126
<a name="TNY-TYPE-CAMEL-ACCOUNT:CAPS"></a>TNY_TYPE_CAMEL_ACCOUNT</h3>
127
<a class="indexterm" name="id2691186"></a><pre class="programlisting">#define TNY_TYPE_CAMEL_ACCOUNT (tny_camel_account_get_type ())
134
<div class="refsect2" lang="en">
135
<a name="id2691202"></a><h3>
136
<a name="TNY-CAMEL-ACCOUNT:CAPS"></a>TNY_CAMEL_ACCOUNT()</h3>
137
<a class="indexterm" name="id2691216"></a><pre class="programlisting">#define TNY_CAMEL_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_CAMEL_ACCOUNT, TnyCamelAccount))
142
<div class="variablelist"><table border="0">
143
<col align="left" valign="top">
145
<td><span class="term"><em class="parameter"><code>obj</code></em> :</span></td>
154
<div class="refsect2" lang="en">
155
<a name="id2691250"></a><h3>
156
<a name="TNY-CAMEL-ACCOUNT-CLASS:CAPS"></a>TNY_CAMEL_ACCOUNT_CLASS()</h3>
157
<a class="indexterm" name="id2691263"></a><pre class="programlisting">#define TNY_CAMEL_ACCOUNT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_CAMEL_ACCOUNT, TnyCamelAccountClass))
162
<div class="variablelist"><table border="0">
163
<col align="left" valign="top">
165
<td><span class="term"><em class="parameter"><code>vtable</code></em> :</span></td>
174
<div class="refsect2" lang="en">
175
<a name="id2691298"></a><h3>
176
<a name="TNY-IS-CAMEL-ACCOUNT:CAPS"></a>TNY_IS_CAMEL_ACCOUNT()</h3>
177
<a class="indexterm" name="id2691311"></a><pre class="programlisting">#define TNY_IS_CAMEL_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_CAMEL_ACCOUNT))
182
<div class="variablelist"><table border="0">
183
<col align="left" valign="top">
185
<td><span class="term"><em class="parameter"><code>obj</code></em> :</span></td>
194
<div class="refsect2" lang="en">
195
<a name="id2691346"></a><h3>
196
<a name="TNY-CAMEL-ACCOUNT-GET-CLASS:CAPS"></a>TNY_CAMEL_ACCOUNT_GET_CLASS()</h3>
197
<a class="indexterm" name="id2691359"></a><pre class="programlisting">#define TNY_CAMEL_ACCOUNT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_CAMEL_ACCOUNT, TnyCamelAccountClass))
202
<div class="variablelist"><table border="0">
203
<col align="left" valign="top">
205
<td><span class="term"><em class="parameter"><code>inst</code></em> :</span></td>
214
<div class="refsect2" lang="en">
215
<a name="id2691394"></a><h3>
216
<a name="TnyCamelSetOnlineCallback"></a>TnyCamelSetOnlineCallback ()</h3>
217
<a class="indexterm" name="id2691407"></a><pre class="programlisting">void (*TnyCamelSetOnlineCallback) (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *account,
220
gpointer user_data);</pre>
224
<div class="variablelist"><table border="0">
225
<col align="left" valign="top">
228
<td><span class="term"><em class="parameter"><code>account</code></em> :</span></td>
233
<td><span class="term"><em class="parameter"><code>canceled</code></em> :</span></td>
238
<td><span class="term"><em class="parameter"><code>err</code></em> :</span></td>
243
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
253
<div class="refsect2" lang="en">
254
<a name="id2691517"></a><h3>
255
<a name="TnyCamelAccount-struct"></a>TnyCamelAccount</h3>
256
<a class="indexterm" name="id2691531"></a><pre class="programlisting">typedef struct _TnyCamelAccount TnyCamelAccount;</pre>
262
<div class="refsect2" lang="en">
263
<a name="id2691547"></a><h3>
264
<a name="tny-camel-account-add-option"></a>tny_camel_account_add_option ()</h3>
265
<a class="indexterm" name="id2691560"></a><pre class="programlisting">void tny_camel_account_add_option (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
266
const gchar *option);</pre>
268
Add a Camel option to this <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> instance.
271
An often used option is the use_ssl one. For example "use_ssl=wrapped" or
272
"use_ssl=tls" are the typical options added. Other possibilities for the
273
"use_ssl" option are "never" and "when-possible":
276
use_ssl=wrapped will wrap the connection on default port 993 with IMAP and
277
defualt port 995 with POP3 with SSL or also called "imaps" or "pops".
280
use_ssl=tls will connect using default port 143 for IMAP and 110 for POP and
281
requires support for STARTTLS, which is often a command for letting the
282
connection be or become encrypted in IMAP and POP3 servers.
285
use_ssl=when-possible will try to do a STARTTLS, but will fallback to a non
286
encrypted session if it fails (not recommended, as your users will want SSL
287
if they require this security for their accounts).
290
use_ssl=never will forcefully make sure that no SSL is to be used.
293
One option for some accounts (like the IMAP accounts) is idle_delay. The
294
parameter is the amount of seconds that you want to wait for the IDLE state
295
to be stopped. Stopping the IDLE state will make the server flush all the
296
pending events for the IDLE state. This improve responsibility of the Push
297
E-mail and expunge events, although it will cause a little bit more continuous
298
bandwidth consumption (each delayth second). For example idle_delay=20. The
302
Another option is getsrv_delay, also for IMAP accounts, which allows you to
303
specify the delay before the connection that gets created for receiving
304
uncached messages gets shut down. If this service is not yet shut down, then
305
it'll be reused. Else a new one will be created that will be kept around for
306
delay seconds (in the hopes that new requests will happen). Keeping a socket
307
open for a long period of time might not be ideal for some situations, but
308
closing it very quickly will let almost each request create a new connection
309
with the IMAP server. Which is why you can play with the value yourself. For
310
example getsrv_delay=100. The default value is 100.</p>
314
<div class="variablelist"><table border="0">
315
<col align="left" valign="top">
318
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
319
<td> a <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> object
323
<td><span class="term"><em class="parameter"><code>option</code></em> :</span></td>
324
<td> a "key=value" Camel option
331
<div class="refsect2" lang="en">
332
<a name="id2690648"></a><h3>
333
<a name="tny-camel-account-set-session"></a>tny_camel_account_set_session ()</h3>
334
<a class="indexterm" name="id2690661"></a><pre class="programlisting">void tny_camel_account_set_session (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
335
<a href="libtinymail-TnySessionCamel.html#TnySessionCamel">TnySessionCamel</a> *session);</pre>
337
Set the <a href="libtinymail-TnySessionCamel.html#TnySessionCamel"><span class="type">TnySessionCamel</span></a> session this account will use</p>
341
<div class="variablelist"><table border="0">
342
<col align="left" valign="top">
345
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
346
<td> a <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> object
350
<td><span class="term"><em class="parameter"><code>session</code></em> :</span></td>
351
<td> a <a href="libtinymail-TnySessionCamel.html#TnySessionCamel"><span class="type">TnySessionCamel</span></a> object
358
<div class="refsect2" lang="en">
359
<a name="id2691954"></a><h3>
360
<a name="tny-camel-account-set-online"></a>tny_camel_account_set_online ()</h3>
361
<a class="indexterm" name="id2691968"></a><pre class="programlisting">void tny_camel_account_set_online (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
363
<a href="TnyCamelAccount.html#TnyCamelSetOnlineCallback">TnyCamelSetOnlineCallback</a> callback,
364
gpointer user_data);</pre>
366
Set the connectivity status of an account. Setting this to FALSE means that
367
the account will not attempt to use the network, and will use only the cache.
368
Setting this to TRUE means that the account may use the network to
369
provide up-to-date information.
372
The <em class="parameter"><code>callback</code></em> will be invoke as soon as the account is actually online. It's
373
guaranteed that the <em class="parameter"><code>callback</code></em> will happen in the mainloop, if available.</p>
377
<div class="variablelist"><table border="0">
378
<col align="left" valign="top">
381
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
382
<td> a <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> object
386
<td><span class="term"><em class="parameter"><code>online</code></em> :</span></td>
387
<td> whether or not the account is online
391
<td><span class="term"><em class="parameter"><code>callback</code></em> :</span></td>
392
<td> a callback when the account went online
396
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
397
<td> user data for the callback
404
<div class="refsect2" lang="en">
405
<a name="id2692115"></a><h3>
406
<a name="TnyCamelGetSupportedSecureAuthCallback"></a>TnyCamelGetSupportedSecureAuthCallback ()</h3>
407
<a class="indexterm" name="id2692129"></a><pre class="programlisting">void (*TnyCamelGetSupportedSecureAuthCallback)
408
(<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
410
<a href="libtinymail-tny-list.html#TnyList">TnyList</a> *auth_types,
412
gpointer user_data);</pre>
414
The callback for <a href="TnyCamelAccount.html#tny-camel-account-get-supported-secure-authentication"><code class="function">tny_camel_account_get_supported_secure_authentication()</code></a>.</p>
418
<div class="variablelist"><table border="0">
419
<col align="left" valign="top">
422
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
423
<td> The TnyCamelAccount on which <a href="TnyCamelAccount.html#tny-camel-account-get-supported-secure-authentication"><code class="function">tny_camel_account_get_supported_secure_authentication()</code></a> was called.
427
<td><span class="term"><em class="parameter"><code>cancelled</code></em> :</span></td>
428
<td> Whether the operation was cancelled.
432
<td><span class="term"><em class="parameter"><code>auth_types</code></em> :</span></td>
433
<td> A TnyList of TnyPair objects. Each TnyPair in the list has a supported secure authentication method name as its name. This list must be freed with <code class="function">g_object_unref()</code>.
437
<td><span class="term"><em class="parameter"><code>err</code></em> :</span></td>
438
<td> A GError if an error occurred, or NULL.
442
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
443
<td> The user data that was provided to <a href="TnyCamelAccount.html#tny-camel-account-get-supported-secure-authentication"><code class="function">tny_camel_account_get_supported_secure_authentication()</code></a>.
450
<div class="refsect2" lang="en">
451
<a name="id2692322"></a><h3>
452
<a name="tny-camel-account-get-supported-secure-authentication"></a>tny_camel_account_get_supported_secure_authentication ()</h3>
453
<a class="indexterm" name="id2692336"></a><pre class="programlisting">void tny_camel_account_get_supported_secure_authentication
454
(<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
455
<a href="TnyCamelAccount.html#TnyCamelGetSupportedSecureAuthCallback">TnyCamelGetSupportedSecureAuthCallback</a> callback,
456
<a href="libtinymail-tny-shared.html#TnyStatusCallback">TnyStatusCallback</a> status_callback,
457
gpointer user_data);</pre>
459
Query the server for the list of supported secure authentication mechanisms.
460
The <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> must have a valid hostname and the port number
461
must be set if appropriate.
462
The returned strings may be used as parameters to
463
<a href="libtinymail-tny-account.html#tny-account-set-secure-auth-mech"><code class="function">tny_account_set_secure_auth_mech()</code></a>.</p>
467
<div class="variablelist"><table border="0">
468
<col align="left" valign="top">
471
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
472
<td> a <a href="TnyCamelAccount.html" title="TnyCamelAccount"><span class="type">TnyCamelAccount</span></a> object.
476
<td><span class="term"><em class="parameter"><code>callback</code></em> :</span></td>
477
<td> A function to be called when the operation is complete.
481
<td><span class="term"><em class="parameter"><code>status_callback</code></em> :</span></td>
482
<td> A function to be called one or more times while the operation is in progress.
486
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
487
<td> Data to be passed to the callback and status callback.
494
<div class="refsect1" lang="en">
495
<a name="id2692490"></a><h2>Signal Details</h2>
496
<div class="refsect2" lang="en">
497
<a name="id2692501"></a><h3>
498
<a name="TnyCamelAccount-set-online-happened"></a>The "set-online-happened" signal</h3>
499
<a class="indexterm" name="id2692512"></a><pre class="programlisting">void user_function (<a href="TnyCamelAccount.html" title="TnyCamelAccount">TnyCamelAccount</a> *self,
501
gpointer user_data) : Run First</pre>
503
Emitted when tny_camel_account_set_online happened</p>
507
<div class="variablelist"><table border="0">
508
<col align="left" valign="top">
511
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
512
<td> the object on which the signal is emitted
516
<td><span class="term"><em class="parameter"><code>online</code></em> :</span></td>
517
<td> whether it was online
521
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
522
<td> user data set when the signal handler was connected.
526
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
527
<td>user data set when the signal handler was connected.</td>
533
<div class="refsect1" lang="en">
534
<a name="id2692625"></a><h2>See Also</h2>
536
<a href="libtinymail-tny-account.html#TnyAccount"><span class="type">TnyAccount</span></a>