~ubuntu-branches/ubuntu/trusty/libprelude/trusty

« back to all changes in this revision

Viewing changes to docs/api/html/libprelude-prelude-connection-pool.html

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2008-04-28 15:23:30 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080428152330-su7zlfscjjeh30ig
Tags: 0.9.17.1-1
New upstream release (remove debug output)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>prelude-connection-pool</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
7
<link rel="start" href="index.html" title="Prelude library Reference Manual">
8
 
<link rel="up" href="pt03.html" title="Part&#160;III.&#160;Reading events from the collector">
 
8
<link rel="up" href="pt03.html" title="Part III. Reading events from the collector">
9
9
<link rel="prev" href="libprelude-idmef-message-read.html" title="idmef-message-read">
10
 
<link rel="next" href="pt04.html" title="Part&#160;IV.&#160;Filtering operation on IDMEF messages">
11
 
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
 
10
<link rel="next" href="pt04.html" title="Part IV. Filtering operation on IDMEF messages">
 
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Using libprelude to interoperate with prelude-manager">
14
 
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;Sending events with libprelude">
 
13
<link rel="part" href="pt01.html" title="Part I. Using libprelude to interoperate with prelude-manager">
 
14
<link rel="part" href="pt02.html" title="Part II. Sending events with libprelude">
15
15
<link rel="chapter" href="ch01.html" title="The low level IDMEF API">
16
16
<link rel="chapter" href="ch02.html" title="The high level IDMEF API">
17
 
<link rel="part" href="pt03.html" title="Part&#160;III.&#160;Reading events from the collector">
18
 
<link rel="part" href="pt04.html" title="Part&#160;IV.&#160;Filtering operation on IDMEF messages">
 
17
<link rel="part" href="pt03.html" title="Part III. Reading events from the collector">
 
18
<link rel="part" href="pt04.html" title="Part IV. Filtering operation on IDMEF messages">
19
19
<link rel="chapter" href="ch03.html" title="Utility functions">
20
20
<link rel="chapter" href="ch04.html" title="Others">
21
21
</head>
28
28
<th width="100%" align="center">Prelude library Reference Manual</th>
29
29
<td><a accesskey="n" href="pt04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
30
30
</tr>
31
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id380504" class="shortcut">Top</a>
32
 
                  &#160;|&#160;
33
 
                  <a href="#id334398" class="shortcut">Description</a></nobr></td></tr>
 
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#libprelude-prelude-connection-pool.synopsis" class="shortcut">Top</a>
 
32
                   | 
 
33
                  <a href="#libprelude-prelude-connection-pool.description" class="shortcut">Description</a></nobr></td></tr>
34
34
</table>
35
35
<div class="refentry" lang="en">
36
36
<a name="libprelude-prelude-connection-pool"></a><div class="titlepage"></div>
37
37
<div class="refnamediv"><table width="100%"><tr>
38
38
<td valign="top">
39
 
<h2>
40
 
<a name="id380504"></a><span class="refentrytitle">prelude-connection-pool</span>
41
 
</h2>
42
 
<p>prelude-connection-pool &#8212; 
 
39
<h2><span class="refentrytitle"><a name="libprelude-prelude-connection-pool.top_of_page"></a>prelude-connection-pool</span></h2>
 
40
<p>prelude-connection-pool — 
43
41
Pool of connection handling</p>
44
42
</td>
45
43
<td valign="top" align="right"></td>
46
44
</tr></table></div>
47
45
<div class="refsynopsisdiv">
48
 
<h2>Synopsis</h2>
 
46
<a name="libprelude-prelude-connection-pool.synopsis"></a><h2>Synopsis</h2>
49
47
<pre class="synopsis">
50
 
 
51
 
 
52
 
 
53
 
enum                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a>;
54
 
enum                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a>;
55
 
typedef             <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a>;
56
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast">prelude_connection_pool_broadcast</a>   (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
57
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);
58
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast-async">prelude_connection_pool_broadcast_async</a>
59
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
60
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);
61
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init">prelude_connection_pool_init</a>        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
62
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new">prelude_connection_pool_new</a>         (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> **ret,
63
 
                                                         <a href="libprelude-prelude-client-profile.html#prelude-client-profile-t">prelude_client_profile_t</a> *cp,
64
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> permission);
65
 
<a href="libprelude-prelude-list.html#prelude-list-t">prelude_list_t</a>*     <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-list">prelude_connection_pool_get_connection_list</a>
66
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
67
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-add-connection">prelude_connection_pool_add_connection</a>
68
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
69
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
70
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-dead">prelude_connection_pool_set_connection_dead</a>
71
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
72
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
73
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-alive">prelude_connection_pool_set_connection_alive</a>
74
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
75
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
76
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string">prelude_connection_pool_set_connection_string</a>
77
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
48
enum                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a>;
 
49
enum                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a>;
 
50
typedef             <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a>;
 
51
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast" title="prelude_connection_pool_broadcast ()">prelude_connection_pool_broadcast</a>   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
52
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
 
53
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast-async" title="prelude_connection_pool_broadcast_async ()">prelude_connection_pool_broadcast_async</a>
 
54
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
55
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
 
56
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()">prelude_connection_pool_init</a>        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
57
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new" title="prelude_connection_pool_new ()">prelude_connection_pool_new</a>         (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> **ret,
 
58
                                                         <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t">prelude_client_profile_t</a> *cp,
 
59
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> permission);
 
60
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a>* <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-ref" title="prelude_connection_pool_ref ()">prelude_connection_pool_ref</a>  (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
61
<a class="link" href="libprelude-prelude-list.html#prelude-list-t" title="prelude_list_t">prelude_list_t</a>*     <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-list" title="prelude_connection_pool_get_connection_list ()">prelude_connection_pool_get_connection_list</a>
 
62
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
63
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-add-connection" title="prelude_connection_pool_add_connection ()">prelude_connection_pool_add_connection</a>
 
64
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
65
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
 
66
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-dead" title="prelude_connection_pool_set_connection_dead ()">prelude_connection_pool_set_connection_dead</a>
 
67
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
68
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
 
69
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-alive" title="prelude_connection_pool_set_connection_alive ()">prelude_connection_pool_set_connection_alive</a>
 
70
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
71
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
 
72
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string" title="prelude_connection_pool_set_connection_string ()">prelude_connection_pool_set_connection_string</a>
 
73
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
78
74
                                                         const char *cfgstr);
79
 
const char*         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-string">prelude_connection_pool_get_connection_string</a>
80
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
81
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy">prelude_connection_pool_destroy</a>     (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
82
 
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-flags">prelude_connection_pool_get_flags</a>
83
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
84
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-flags">prelude_connection_pool_set_flags</a>   (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
85
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> flags);
86
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-required-permission">prelude_connection_pool_set_required_permission</a>
87
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
88
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> req_perm);
89
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data">prelude_connection_pool_set_data</a>    (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
75
const char*         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-string" title="prelude_connection_pool_get_connection_string ()">prelude_connection_pool_get_connection_string</a>
 
76
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
77
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy" title="prelude_connection_pool_destroy ()">prelude_connection_pool_destroy</a>     (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
78
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-flags" title="prelude_connection_pool_get_flags ()">prelude_connection_pool_get_flags</a>
 
79
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
80
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-flags" title="prelude_connection_pool_set_flags ()">prelude_connection_pool_set_flags</a>   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
81
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> flags);
 
82
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-required-permission" title="prelude_connection_pool_set_required_permission ()">prelude_connection_pool_set_required_permission</a>
 
83
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
84
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> req_perm);
 
85
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data" title="prelude_connection_pool_set_data ()">prelude_connection_pool_set_data</a>    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
90
86
                                                         void *data);
91
 
void*               <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data">prelude_connection_pool_get_data</a>    (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
92
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-recv">prelude_connection_pool_recv</a>        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
93
 
                                                         int timeout,
94
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> **outconn,
95
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> **outmsg);
96
 
int                 <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event">prelude_connection_pool_check_event</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
97
 
                                                         int timeout,
98
 
                                                         int (*event_cb) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra),
 
87
void*               <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data" title="prelude_connection_pool_get_data ()">prelude_connection_pool_get_data</a>    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
 
88
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-recv" title="prelude_connection_pool_recv ()">prelude_connection_pool_recv</a>        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
89
                                                         int timeout,
 
90
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> **outcon,
 
91
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> **outmsg);
 
92
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()">prelude_connection_pool_check_event</a> (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
93
                                                         int timeout,
 
94
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
99
95
                                                         void *extra);
100
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-global-event-handler">prelude_connection_pool_set_global_event_handler</a>
101
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
102
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
103
 
                                                         int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events));
104
 
void                <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler">prelude_connection_pool_set_event_handler</a>
105
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
106
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
107
 
                                                         int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx));
 
96
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-global-event-handler" title="prelude_connection_pool_set_global_event_handler ()">prelude_connection_pool_set_global_event_handler</a>
 
97
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
98
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
 
99
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());
 
100
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler" title="prelude_connection_pool_set_event_handler ()">prelude_connection_pool_set_event_handler</a>
 
101
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
102
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
 
103
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());
108
104
</pre>
109
105
</div>
110
106
<div class="refsect1" lang="en">
111
 
<a name="id334398"></a><h2>Description</h2>
 
107
<a name="libprelude-prelude-connection-pool.description"></a><h2>Description</h2>
112
108
<p>
113
109
This API handle pool of connection, allowing to address a set of connection using only one object.
114
110
</p>
125
121
<p>
126
122
It is usually not necessary to access this API directly, however if 
127
123
you are looking at how to read events from a pool of connection, you're most 
128
 
probably looking for the <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event"><code class="function">prelude_connection_pool_check_event()</code></a> function.
 
124
probably looking for the <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()"><code class="function">prelude_connection_pool_check_event()</code></a> function.
129
125
</p>
130
126
<p>
131
 
If this is the case, use <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event"><code class="function">prelude_connection_pool_check_event()</code></a> for polling the
 
127
If this is the case, use <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()"><code class="function">prelude_connection_pool_check_event()</code></a> for polling the
132
128
pool or <code class="function">prelude_connection_set_event_handler()</code> / <code class="function">prelude_connection_set_global_event_handler()</code>
133
129
if you want asynchronous notification of event.
134
130
</p>
135
131
<p>
136
132
Note that <code class="function">prelude_connection_set_event_handler()</code> and <code class="function">prelude_connection_set_global_event_handler()</code>
137
133
are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses
138
 
function might be called when you call the <a href="libprelude-prelude-timer.html#prelude-timer-wake-up"><code class="function">prelude_timer_wake_up()</code></a> function.
 
134
function might be called when you call the <a class="link" href="libprelude-prelude-timer.html#prelude-timer-wake-up" title="prelude_timer_wake_up ()"><code class="function">prelude_timer_wake_up()</code></a> function.
139
135
</p>
140
136
<p>
141
 
In the provided callback, you might use <a href="libprelude-prelude-connection.html#prelude-connection-recv"><code class="function">prelude_connection_recv()</code></a> to retrieve an event of type
 
137
In the provided callback, you might use <a class="link" href="libprelude-prelude-connection.html#prelude-connection-recv" title="prelude_connection_recv ()"><code class="function">prelude_connection_recv()</code></a> to retrieve an event of type
142
138
<span class="type">PRELUDE_CONNECTION_POOL_EVENT_INPUT</span>. And, you could, for example, if the retrieved message has
143
 
the <span class="type">PRELUDE_MSG_ID_IDMEF</span> tag, provide the returned <a href="libprelude-prelude-msg.html#prelude-msg-t"><span class="type">prelude_msg_t</span></a> object to <a href="libprelude-idmef-message-read.html#idmef-message-read"><code class="function">idmef_message_read()</code></a> 
144
 
in order to convert the received message to a <a href="libprelude-idmef-tree-wrap.html#idmef-message-t"><span class="type">idmef_message_t</span></a> object.
 
139
the <span class="type">PRELUDE_MSG_ID_IDMEF</span> tag, provide the returned <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object to <a class="link" href="libprelude-idmef-message-read.html#idmef-message-read" title="idmef_message_read ()"><code class="function">idmef_message_read()</code></a> 
 
140
in order to convert the received message to a <a class="link" href="libprelude-idmef-tree-wrap.html#idmef-message-t" title="idmef_message_t"><span class="type">idmef_message_t</span></a> object.
145
141
</p>
146
142
</div>
147
143
<div class="refsect1" lang="en">
148
 
<a name="id347773"></a><h2>Details</h2>
 
144
<a name="libprelude-prelude-connection-pool.details"></a><h2>Details</h2>
149
145
<div class="refsect2" lang="en">
150
 
<a name="id347784"></a><h3>
151
 
<a name="prelude-connection-pool-flags-t"></a>enum prelude_connection_pool_flags_t</h3>
152
 
<a class="indexterm" name="id347796"></a><pre class="programlisting">typedef enum {
 
146
<a name="prelude-connection-pool-flags-t"></a><h3>enum prelude_connection_pool_flags_t</h3>
 
147
<pre class="programlisting">typedef enum {
153
148
        PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT        = 0x01,
154
149
        PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER         = 0x02
155
150
} prelude_connection_pool_flags_t;
160
155
</div>
161
156
<hr>
162
157
<div class="refsect2" lang="en">
163
 
<a name="id347813"></a><h3>
164
 
<a name="prelude-connection-pool-event-t"></a>enum prelude_connection_pool_event_t</h3>
165
 
<a class="indexterm" name="id347825"></a><pre class="programlisting">typedef enum {
 
158
<a name="prelude-connection-pool-event-t"></a><h3>enum prelude_connection_pool_event_t</h3>
 
159
<pre class="programlisting">typedef enum {
166
160
        PRELUDE_CONNECTION_POOL_EVENT_INPUT            = 0x01,
167
161
        PRELUDE_CONNECTION_POOL_EVENT_DEAD             = 0x02,
168
162
        PRELUDE_CONNECTION_POOL_EVENT_ALIVE            = 0x04
174
168
</div>
175
169
<hr>
176
170
<div class="refsect2" lang="en">
177
 
<a name="id347843"></a><h3>
178
 
<a name="prelude-connection-pool-t"></a>prelude_connection_pool_t</h3>
179
 
<a class="indexterm" name="id343085"></a><pre class="programlisting">typedef struct prelude_connection_pool prelude_connection_pool_t;
 
171
<a name="prelude-connection-pool-t"></a><h3>prelude_connection_pool_t</h3>
 
172
<pre class="programlisting">typedef struct prelude_connection_pool prelude_connection_pool_t;
180
173
</pre>
181
174
<p>
182
175
 
184
177
</div>
185
178
<hr>
186
179
<div class="refsect2" lang="en">
187
 
<a name="id343100"></a><h3>
188
 
<a name="prelude-connection-pool-broadcast"></a>prelude_connection_pool_broadcast ()</h3>
189
 
<a class="indexterm" name="id343113"></a><pre class="programlisting">void                prelude_connection_pool_broadcast   (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
190
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);</pre>
 
180
<a name="prelude-connection-pool-broadcast"></a><h3>prelude_connection_pool_broadcast ()</h3>
 
181
<pre class="programlisting">void                prelude_connection_pool_broadcast   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
182
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);</pre>
191
183
<p>
192
184
Sends the message contained in <em class="parameter"><code>msg</code></em> to all the connection in <em class="parameter"><code>pool</code></em>.</p>
193
185
<p>
197
189
<col align="left" valign="top">
198
190
<tbody>
199
191
<tr>
200
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
201
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
192
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
193
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
202
194
</td>
203
195
</tr>
204
196
<tr>
205
 
<td><span class="term"><em class="parameter"><code>msg</code></em>&#160;:</span></td>
206
 
<td> Pointer on a <a href="libprelude-prelude-msg.html#prelude-msg-t"><span class="type">prelude_msg_t</span></a> object.
 
197
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
 
198
<td> Pointer on a <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object.
207
199
</td>
208
200
</tr>
209
201
</tbody>
211
203
</div>
212
204
<hr>
213
205
<div class="refsect2" lang="en">
214
 
<a name="id404230"></a><h3>
215
 
<a name="prelude-connection-pool-broadcast-async"></a>prelude_connection_pool_broadcast_async ()</h3>
216
 
<a class="indexterm" name="id404242"></a><pre class="programlisting">void                prelude_connection_pool_broadcast_async
217
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
218
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);</pre>
 
206
<a name="prelude-connection-pool-broadcast-async"></a><h3>prelude_connection_pool_broadcast_async ()</h3>
 
207
<pre class="programlisting">void                prelude_connection_pool_broadcast_async
 
208
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
209
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);</pre>
219
210
<p>
220
211
Sends the message contained in <em class="parameter"><code>msg</code></em> to all connections
221
212
in <em class="parameter"><code>pool</code></em> asynchronously. After the request is processed,
227
218
<col align="left" valign="top">
228
219
<tbody>
229
220
<tr>
230
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
231
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object
 
221
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
222
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object
232
223
</td>
233
224
</tr>
234
225
<tr>
235
 
<td><span class="term"><em class="parameter"><code>msg</code></em>&#160;:</span></td>
236
 
<td> Pointer on a <a href="libprelude-prelude-msg.html#prelude-msg-t"><span class="type">prelude_msg_t</span></a> object.
 
226
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
 
227
<td> Pointer on a <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object.
237
228
</td>
238
229
</tr>
239
230
</tbody>
241
232
</div>
242
233
<hr>
243
234
<div class="refsect2" lang="en">
244
 
<a name="id448257"></a><h3>
245
 
<a name="prelude-connection-pool-init"></a>prelude_connection_pool_init ()</h3>
246
 
<a class="indexterm" name="id448269"></a><pre class="programlisting">int                 prelude_connection_pool_init        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
 
235
<a name="prelude-connection-pool-init"></a><h3>prelude_connection_pool_init ()</h3>
 
236
<pre class="programlisting">int                 prelude_connection_pool_init        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
247
237
<p>
248
 
Initializes <em class="parameter"><code>pool</code></em>. This means that connection associated
249
 
with <em class="parameter"><code>pool</code></em> using <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string"><code class="function">prelude_connection_pool_set_connection_string()</code></a>
250
 
will be established.</p>
 
238
Initializes <em class="parameter"><code>pool</code></em>. This means that connection associated with <em class="parameter"><code>pool</code></em>
 
239
using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string" title="prelude_connection_pool_set_connection_string ()"><code class="function">prelude_connection_pool_set_connection_string()</code></a> will be
 
240
established.</p>
251
241
<p>
252
242
 
253
243
</p>
255
245
<col align="left" valign="top">
256
246
<tbody>
257
247
<tr>
258
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
259
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
248
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
249
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
260
250
</td>
261
251
</tr>
262
252
<tr>
263
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
253
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
264
254
<td> 0 on success, a negative value on error.
265
255
</td>
266
256
</tr>
269
259
</div>
270
260
<hr>
271
261
<div class="refsect2" lang="en">
272
 
<a name="id424694"></a><h3>
273
 
<a name="prelude-connection-pool-new"></a>prelude_connection_pool_new ()</h3>
274
 
<a class="indexterm" name="id424707"></a><pre class="programlisting">int                 prelude_connection_pool_new         (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> **ret,
275
 
                                                         <a href="libprelude-prelude-client-profile.html#prelude-client-profile-t">prelude_client_profile_t</a> *cp,
276
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> permission);</pre>
 
262
<a name="prelude-connection-pool-new"></a><h3>prelude_connection_pool_new ()</h3>
 
263
<pre class="programlisting">int                 prelude_connection_pool_new         (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> **ret,
 
264
                                                         <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t">prelude_client_profile_t</a> *cp,
 
265
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> permission);</pre>
277
266
<p>
278
 
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new"><code class="function">prelude_connection_pool_new()</code></a> initializes a new Connection Manager object.</p>
 
267
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new" title="prelude_connection_pool_new ()"><code class="function">prelude_connection_pool_new()</code></a> initializes a new Connection Manager object.</p>
279
268
<p>
280
269
 
281
270
</p>
283
272
<col align="left" valign="top">
284
273
<tbody>
285
274
<tr>
286
 
<td><span class="term"><em class="parameter"><code>ret</code></em>&#160;:</span></td>
287
 
<td> Pointer to an address where to store the created <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
288
 
</td>
289
 
</tr>
290
 
<tr>
291
 
<td><span class="term"><em class="parameter"><code>cp</code></em>&#160;:</span></td>
292
 
<td> The <a href="libprelude-prelude-client-profile.html#prelude-client-profile-t"><span class="type">prelude_client_profile_t</span></a> to use for connection.
293
 
</td>
294
 
</tr>
295
 
<tr>
296
 
<td><span class="term"><em class="parameter"><code>permission</code></em>&#160;:</span></td>
 
275
<td><p><span class="term"><em class="parameter"><code>ret</code></em> :</span></p></td>
 
276
<td> Pointer to an address where to store the created <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
277
</td>
 
278
</tr>
 
279
<tr>
 
280
<td><p><span class="term"><em class="parameter"><code>cp</code></em> :</span></p></td>
 
281
<td> The <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t"><span class="type">prelude_client_profile_t</span></a> to use for connection.
 
282
</td>
 
283
</tr>
 
284
<tr>
 
285
<td><p><span class="term"><em class="parameter"><code>permission</code></em> :</span></p></td>
297
286
<td> Permission the connection in this connection-pool will require.
298
287
</td>
299
288
</tr>
300
289
<tr>
301
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
290
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
302
291
<td> 0 on success or a negative value if an error occured.
303
292
</td>
304
293
</tr>
307
296
</div>
308
297
<hr>
309
298
<div class="refsect2" lang="en">
310
 
<a name="id404992"></a><h3>
311
 
<a name="prelude-connection-pool-get-connection-list"></a>prelude_connection_pool_get_connection_list ()</h3>
312
 
<a class="indexterm" name="id405003"></a><pre class="programlisting"><a href="libprelude-prelude-list.html#prelude-list-t">prelude_list_t</a>*     prelude_connection_pool_get_connection_list
313
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
314
 
<p>
315
 
</p>
316
 
<p>
317
 
 
318
 
</p>
319
 
<div class="variablelist"><table border="0">
320
 
<col align="left" valign="top">
321
 
<tbody>
322
 
<tr>
323
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
324
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
325
 
</td>
326
 
</tr>
327
 
<tr>
328
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
299
<a name="prelude-connection-pool-ref"></a><h3>prelude_connection_pool_ref ()</h3>
 
300
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a>* prelude_connection_pool_ref  (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
 
301
<p>
 
302
Increases <em class="parameter"><code>pool</code></em> reference count.
 
303
</p>
 
304
<p>
 
305
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy" title="prelude_connection_pool_destroy ()"><code class="function">prelude_connection_pool_destroy()</code></a> will decrease the refcount until
 
306
it reaches 0, at which point the <em class="parameter"><code>pool</code></em> will be destroyed.</p>
 
307
<p>
 
308
 
 
309
</p>
 
310
<div class="variablelist"><table border="0">
 
311
<col align="left" valign="top">
 
312
<tbody>
 
313
<tr>
 
314
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
315
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
316
</td>
 
317
</tr>
 
318
<tr>
 
319
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
320
<td> The provided <em class="parameter"><code>pool</code></em> is returned.
 
321
</td>
 
322
</tr>
 
323
</tbody>
 
324
</table></div>
 
325
</div>
 
326
<hr>
 
327
<div class="refsect2" lang="en">
 
328
<a name="prelude-connection-pool-get-connection-list"></a><h3>prelude_connection_pool_get_connection_list ()</h3>
 
329
<pre class="programlisting"><a class="link" href="libprelude-prelude-list.html#prelude-list-t" title="prelude_list_t">prelude_list_t</a>*     prelude_connection_pool_get_connection_list
 
330
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
 
331
<p>
 
332
</p>
 
333
<p>
 
334
 
 
335
</p>
 
336
<div class="variablelist"><table border="0">
 
337
<col align="left" valign="top">
 
338
<tbody>
 
339
<tr>
 
340
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
341
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
342
</td>
 
343
</tr>
 
344
<tr>
 
345
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
329
346
<td> The list of connections handled by <em class="parameter"><code>pool</code></em>.
330
347
</td>
331
348
</tr>
334
351
</div>
335
352
<hr>
336
353
<div class="refsect2" lang="en">
337
 
<a name="id432161"></a><h3>
338
 
<a name="prelude-connection-pool-add-connection"></a>prelude_connection_pool_add_connection ()</h3>
339
 
<a class="indexterm" name="id432173"></a><pre class="programlisting">int                 prelude_connection_pool_add_connection
340
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
341
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);</pre>
342
 
<p>
343
 
Adds <em class="parameter"><code>cnx</code></em> to <em class="parameter"><code>pool</code></em> set of connections.</p>
 
354
<a name="prelude-connection-pool-add-connection"></a><h3>prelude_connection_pool_add_connection ()</h3>
 
355
<pre class="programlisting">int                 prelude_connection_pool_add_connection
 
356
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
357
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
 
358
<p>
 
359
Adds <em class="parameter"><code>cnx</code></em> to <em class="parameter"><code>pool</code></em> set of connections.
 
360
</p>
 
361
<p>
 
362
If <em class="parameter"><code>pool</code></em> is already initialized (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()"><code class="function">prelude_connection_pool_init()</code></a> called)
 
363
and <em class="parameter"><code>cnx</code></em> is not alive, it will attempt a reconnection.</p>
344
364
<p>
345
365
 
346
366
</p>
348
368
<col align="left" valign="top">
349
369
<tbody>
350
370
<tr>
351
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
352
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
353
 
</td>
354
 
</tr>
355
 
<tr>
356
 
<td><span class="term"><em class="parameter"><code>cnx</code></em>&#160;:</span></td>
357
 
<td> Pointer to a <a href="libprelude-prelude-connection.html#prelude-connection-t"><span class="type">prelude_connection_t</span></a> object to add to <em class="parameter"><code>pool</code></em>.
358
 
</td>
359
 
</tr>
360
 
<tr>
361
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
371
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
372
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
373
</td>
 
374
</tr>
 
375
<tr>
 
376
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
 
377
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object to add to <em class="parameter"><code>pool</code></em>.
 
378
</td>
 
379
</tr>
 
380
<tr>
 
381
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
362
382
<td> 0 on success, a negative value if an error occured.
363
383
</td>
364
384
</tr>
367
387
</div>
368
388
<hr>
369
389
<div class="refsect2" lang="en">
370
 
<a name="id436580"></a><h3>
371
 
<a name="prelude-connection-pool-set-connection-dead"></a>prelude_connection_pool_set_connection_dead ()</h3>
372
 
<a class="indexterm" name="id436591"></a><pre class="programlisting">int                 prelude_connection_pool_set_connection_dead
373
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
374
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);</pre>
 
390
<a name="prelude-connection-pool-set-connection-dead"></a><h3>prelude_connection_pool_set_connection_dead ()</h3>
 
391
<pre class="programlisting">int                 prelude_connection_pool_set_connection_dead
 
392
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
393
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
375
394
<p>
376
395
Notifies <em class="parameter"><code>pool</code></em> that the connection identified by <em class="parameter"><code>cnx</code></em> is dead.
377
396
</p>
388
407
<col align="left" valign="top">
389
408
<tbody>
390
409
<tr>
391
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
392
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
393
 
</td>
394
 
</tr>
395
 
<tr>
396
 
<td><span class="term"><em class="parameter"><code>cnx</code></em>&#160;:</span></td>
397
 
<td> Pointer to a <a href="libprelude-prelude-connection.html#prelude-connection-t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
398
 
</td>
399
 
</tr>
400
 
<tr>
401
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
410
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
411
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
412
</td>
 
413
</tr>
 
414
<tr>
 
415
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
 
416
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
 
417
</td>
 
418
</tr>
 
419
<tr>
 
420
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
402
421
<td> 0 on success, a negative value if an error occured.
403
422
</td>
404
423
</tr>
407
426
</div>
408
427
<hr>
409
428
<div class="refsect2" lang="en">
410
 
<a name="id433897"></a><h3>
411
 
<a name="prelude-connection-pool-set-connection-alive"></a>prelude_connection_pool_set_connection_alive ()</h3>
412
 
<a class="indexterm" name="id433908"></a><pre class="programlisting">int                 prelude_connection_pool_set_connection_alive
413
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
414
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);</pre>
 
429
<a name="prelude-connection-pool-set-connection-alive"></a><h3>prelude_connection_pool_set_connection_alive ()</h3>
 
430
<pre class="programlisting">int                 prelude_connection_pool_set_connection_alive
 
431
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
432
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
415
433
<p>
416
434
Notifies <em class="parameter"><code>pool</code></em> that the connection identified by <em class="parameter"><code>cnx</code></em> went back alive.
417
435
</p>
428
446
<col align="left" valign="top">
429
447
<tbody>
430
448
<tr>
431
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
432
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
433
 
</td>
434
 
</tr>
435
 
<tr>
436
 
<td><span class="term"><em class="parameter"><code>cnx</code></em>&#160;:</span></td>
437
 
<td> Pointer to a <a href="libprelude-prelude-connection.html#prelude-connection-t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
438
 
</td>
439
 
</tr>
440
 
<tr>
441
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
449
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
450
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
 
451
</td>
 
452
</tr>
 
453
<tr>
 
454
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
 
455
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
 
456
</td>
 
457
</tr>
 
458
<tr>
 
459
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
442
460
<td> 0 on success, a negative value if an error occured.
443
461
</td>
444
462
</tr>
447
465
</div>
448
466
<hr>
449
467
<div class="refsect2" lang="en">
450
 
<a name="id433233"></a><h3>
451
 
<a name="prelude-connection-pool-set-connection-string"></a>prelude_connection_pool_set_connection_string ()</h3>
452
 
<a class="indexterm" name="id433244"></a><pre class="programlisting">int                 prelude_connection_pool_set_connection_string
453
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
468
<a name="prelude-connection-pool-set-connection-string"></a><h3>prelude_connection_pool_set_connection_string ()</h3>
 
469
<pre class="programlisting">int                 prelude_connection_pool_set_connection_string
 
470
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
454
471
                                                         const char *cfgstr);</pre>
455
472
<p>
456
473
Sets the connection string for <em class="parameter"><code>pool</code></em>. The connection string should be
463
480
will be used.
464
481
</p>
465
482
<p>
466
 
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init"><code class="function">prelude_connection_pool_init()</code></a> should be used to initiates the connection.</p>
 
483
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()"><code class="function">prelude_connection_pool_init()</code></a> should be used to initiates the connection.</p>
467
484
<p>
468
485
 
469
486
</p>
471
488
<col align="left" valign="top">
472
489
<tbody>
473
490
<tr>
474
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
475
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
491
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
492
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
476
493
</td>
477
494
</tr>
478
495
<tr>
479
 
<td><span class="term"><em class="parameter"><code>cfgstr</code></em>&#160;:</span></td>
 
496
<td><p><span class="term"><em class="parameter"><code>cfgstr</code></em> :</span></p></td>
480
497
<td> Connection string.
481
498
</td>
482
499
</tr>
483
500
<tr>
484
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
501
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
485
502
<td> 0 on success, a negative value if an error occured.
486
503
</td>
487
504
</tr>
490
507
</div>
491
508
<hr>
492
509
<div class="refsect2" lang="en">
493
 
<a name="id422716"></a><h3>
494
 
<a name="prelude-connection-pool-get-connection-string"></a>prelude_connection_pool_get_connection_string ()</h3>
495
 
<a class="indexterm" name="id422727"></a><pre class="programlisting">const char*         prelude_connection_pool_get_connection_string
496
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
 
510
<a name="prelude-connection-pool-get-connection-string"></a><h3>prelude_connection_pool_get_connection_string ()</h3>
 
511
<pre class="programlisting">const char*         prelude_connection_pool_get_connection_string
 
512
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
497
513
<p>
498
514
Used to query the connection string used by <em class="parameter"><code>pool</code></em>.</p>
499
515
<p>
503
519
<col align="left" valign="top">
504
520
<tbody>
505
521
<tr>
506
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
507
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
522
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
523
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
508
524
</td>
509
525
</tr>
510
526
<tr>
511
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
527
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
512
528
<td> The connection string.
513
529
</td>
514
530
</tr>
517
533
</div>
518
534
<hr>
519
535
<div class="refsect2" lang="en">
520
 
<a name="id422802"></a><h3>
521
 
<a name="prelude-connection-pool-destroy"></a>prelude_connection_pool_destroy ()</h3>
522
 
<a class="indexterm" name="id439524"></a><pre class="programlisting">void                prelude_connection_pool_destroy     (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
 
536
<a name="prelude-connection-pool-destroy"></a><h3>prelude_connection_pool_destroy ()</h3>
 
537
<pre class="programlisting">void                prelude_connection_pool_destroy     (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
523
538
<p>
524
539
Destroys <em class="parameter"><code>pool</code></em> and all connections handled.</p>
525
540
<p>
528
543
<div class="variablelist"><table border="0">
529
544
<col align="left" valign="top">
530
545
<tbody><tr>
531
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
532
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
546
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
547
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
533
548
</td>
534
549
</tr></tbody>
535
550
</table></div>
536
551
</div>
537
552
<hr>
538
553
<div class="refsect2" lang="en">
539
 
<a name="id439586"></a><h3>
540
 
<a name="prelude-connection-pool-get-flags"></a>prelude_connection_pool_get_flags ()</h3>
541
 
<a class="indexterm" name="id439599"></a><pre class="programlisting"><a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> prelude_connection_pool_get_flags
542
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
 
554
<a name="prelude-connection-pool-get-flags"></a><h3>prelude_connection_pool_get_flags ()</h3>
 
555
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> prelude_connection_pool_get_flags
 
556
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
543
557
<p>
544
558
</p>
545
559
<p>
549
563
<col align="left" valign="top">
550
564
<tbody>
551
565
<tr>
552
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
553
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
566
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
567
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
554
568
</td>
555
569
</tr>
556
570
<tr>
557
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
558
 
<td> the <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t"><span class="type">prelude_connection_pool_flags_t</span></a> used in <em class="parameter"><code>pool</code></em>.
 
571
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
572
<td> the <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t"><span class="type">prelude_connection_pool_flags_t</span></a> used in <em class="parameter"><code>pool</code></em>.
559
573
</td>
560
574
</tr>
561
575
</tbody>
563
577
</div>
564
578
<hr>
565
579
<div class="refsect2" lang="en">
566
 
<a name="id439222"></a><h3>
567
 
<a name="prelude-connection-pool-set-flags"></a>prelude_connection_pool_set_flags ()</h3>
568
 
<a class="indexterm" name="id439234"></a><pre class="programlisting">void                prelude_connection_pool_set_flags   (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
569
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> flags);</pre>
 
580
<a name="prelude-connection-pool-set-flags"></a><h3>prelude_connection_pool_set_flags ()</h3>
 
581
<pre class="programlisting">void                prelude_connection_pool_set_flags   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
582
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> flags);</pre>
570
583
<p>
571
584
Sets <em class="parameter"><code>flags</code></em> within <em class="parameter"><code>pools</code></em>.</p>
572
585
<p>
576
589
<col align="left" valign="top">
577
590
<tbody>
578
591
<tr>
579
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
580
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
592
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
593
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
581
594
</td>
582
595
</tr>
583
596
<tr>
584
 
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
 
597
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
585
598
<td> Flags to use for <em class="parameter"><code>pool</code></em>.
586
599
</td>
587
600
</tr>
590
603
</div>
591
604
<hr>
592
605
<div class="refsect2" lang="en">
593
 
<a name="id457898"></a><h3>
594
 
<a name="prelude-connection-pool-set-required-permission"></a>prelude_connection_pool_set_required_permission ()</h3>
595
 
<a class="indexterm" name="id457910"></a><pre class="programlisting">void                prelude_connection_pool_set_required_permission
596
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
597
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> req_perm);</pre>
 
606
<a name="prelude-connection-pool-set-required-permission"></a><h3>prelude_connection_pool_set_required_permission ()</h3>
 
607
<pre class="programlisting">void                prelude_connection_pool_set_required_permission
 
608
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
609
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> req_perm);</pre>
598
610
<p>
599
611
 
600
612
</p>
602
614
<col align="left" valign="top">
603
615
<tbody>
604
616
<tr>
605
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
 
617
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
606
618
<td>
607
619
</td>
608
620
</tr>
609
621
<tr>
610
 
<td><span class="term"><em class="parameter"><code>req_perm</code></em>&#160;:</span></td>
 
622
<td><p><span class="term"><em class="parameter"><code>req_perm</code></em> :</span></p></td>
611
623
<td>
612
624
 
613
625
 
618
630
</div>
619
631
<hr>
620
632
<div class="refsect2" lang="en">
621
 
<a name="id457977"></a><h3>
622
 
<a name="prelude-connection-pool-set-data"></a>prelude_connection_pool_set_data ()</h3>
623
 
<a class="indexterm" name="id457989"></a><pre class="programlisting">void                prelude_connection_pool_set_data    (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
633
<a name="prelude-connection-pool-set-data"></a><h3>prelude_connection_pool_set_data ()</h3>
 
634
<pre class="programlisting">void                prelude_connection_pool_set_data    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
624
635
                                                         void *data);</pre>
625
636
<p>
626
637
The user might use this function to associate data with <em class="parameter"><code>pool</code></em>.
627
 
The data associated might be retrieved using <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data"><code class="function">prelude_connection_pool_get_data()</code></a>.</p>
 
638
The data associated might be retrieved using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data" title="prelude_connection_pool_get_data ()"><code class="function">prelude_connection_pool_get_data()</code></a>.</p>
628
639
<p>
629
640
 
630
641
</p>
632
643
<col align="left" valign="top">
633
644
<tbody>
634
645
<tr>
635
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
636
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
646
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
647
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
637
648
</td>
638
649
</tr>
639
650
<tr>
640
 
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
651
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
641
652
<td> Pointer to user specific data.
642
653
</td>
643
654
</tr>
646
657
</div>
647
658
<hr>
648
659
<div class="refsect2" lang="en">
649
 
<a name="id456946"></a><h3>
650
 
<a name="prelude-connection-pool-get-data"></a>prelude_connection_pool_get_data ()</h3>
651
 
<a class="indexterm" name="id456959"></a><pre class="programlisting">void*               prelude_connection_pool_get_data    (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
 
660
<a name="prelude-connection-pool-get-data"></a><h3>prelude_connection_pool_get_data ()</h3>
 
661
<pre class="programlisting">void*               prelude_connection_pool_get_data    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
652
662
<p>
653
663
The user might use this function to query data associated with
654
 
<em class="parameter"><code>pool</code></em> using <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data"><code class="function">prelude_connection_pool_set_data()</code></a>.</p>
 
664
<em class="parameter"><code>pool</code></em> using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data" title="prelude_connection_pool_set_data ()"><code class="function">prelude_connection_pool_set_data()</code></a>.</p>
655
665
<p>
656
666
 
657
667
</p>
659
669
<col align="left" valign="top">
660
670
<tbody>
661
671
<tr>
662
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
663
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
672
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
673
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
664
674
</td>
665
675
</tr>
666
676
<tr>
667
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
677
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
668
678
<td> the user data associated to <em class="parameter"><code>pool</code></em>.
669
679
</td>
670
680
</tr>
673
683
</div>
674
684
<hr>
675
685
<div class="refsect2" lang="en">
676
 
<a name="id454490"></a><h3>
677
 
<a name="prelude-connection-pool-recv"></a>prelude_connection_pool_recv ()</h3>
678
 
<a class="indexterm" name="id454502"></a><pre class="programlisting">int                 prelude_connection_pool_recv        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
686
<a name="prelude-connection-pool-recv"></a><h3>prelude_connection_pool_recv ()</h3>
 
687
<pre class="programlisting">int                 prelude_connection_pool_recv        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
679
688
                                                         int timeout,
680
 
                                                         <a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> **outconn,
681
 
                                                         <a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> **outmsg);</pre>
 
689
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> **outcon,
 
690
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> **outmsg);</pre>
682
691
<p>
683
692
This function queries the set of connections available in <em class="parameter"><code>pool</code></em> to see if
684
693
events are waiting to be handled. If timeout is zero, then this function
690
699
number of second.
691
700
</p>
692
701
<p>
693
 
If an event is available, it will be read and store the <a href="libprelude-prelude-connection.html#prelude-connection-t"><span class="type">prelude_connection_t</span></a>
694
 
object in the <em class="parameter"><code>outconn</code></em> pointer. If <em class="parameter"><code>outmsg</code></em> was specified, the message will be
 
702
If an event is available, it will be read and store the <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a>
 
703
object in the <em class="parameter"><code>outcon</code></em> pointer. If <em class="parameter"><code>outmsg</code></em> was specified, the message will be
695
704
read and stored in there.</p>
696
705
<p>
697
706
 
700
709
<col align="left" valign="top">
701
710
<tbody>
702
711
<tr>
703
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
704
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
712
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
713
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
705
714
</td>
706
715
</tr>
707
716
<tr>
708
 
<td><span class="term"><em class="parameter"><code>timeout</code></em>&#160;:</span></td>
 
717
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
709
718
<td> Time to wait for an event.
710
719
</td>
711
720
</tr>
712
721
<tr>
713
 
<td><span class="term"><em class="parameter"><code>outconn</code></em>&#160;:</span></td>
 
722
<td><p><span class="term"><em class="parameter"><code>outcon</code></em> :</span></p></td>
714
723
<td> Pointer where the connection where an event happened should be stored.
715
724
</td>
716
725
</tr>
717
726
<tr>
718
 
<td><span class="term"><em class="parameter"><code>outmsg</code></em>&#160;:</span></td>
 
727
<td><p><span class="term"><em class="parameter"><code>outmsg</code></em> :</span></p></td>
719
728
<td> Pointer where the next message that will be read should be stored.
720
729
</td>
721
730
</tr>
722
731
<tr>
723
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
732
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
724
733
<td> The number of handled events (0 or 1) or a negative value if an error occured.
725
734
</td>
726
735
</tr>
729
738
</div>
730
739
<hr>
731
740
<div class="refsect2" lang="en">
732
 
<a name="id451880"></a><h3>
733
 
<a name="prelude-connection-pool-check-event"></a>prelude_connection_pool_check_event ()</h3>
734
 
<a class="indexterm" name="id451893"></a><pre class="programlisting">int                 prelude_connection_pool_check_event (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
 
741
<a name="prelude-connection-pool-check-event"></a><h3>prelude_connection_pool_check_event ()</h3>
 
742
<pre class="programlisting">int                 prelude_connection_pool_check_event (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
735
743
                                                         int timeout,
736
 
                                                         int (*event_cb) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra),
 
744
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
737
745
                                                         void *extra);</pre>
738
746
<p>
739
747
This function queries the set of connections available in <em class="parameter"><code>pool</code></em> to see if
755
763
<col align="left" valign="top">
756
764
<tbody>
757
765
<tr>
758
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
759
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
766
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
767
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
760
768
</td>
761
769
</tr>
762
770
<tr>
763
 
<td><span class="term"><em class="parameter"><code>timeout</code></em>&#160;:</span></td>
 
771
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
764
772
<td> Time to wait for an event.
765
773
</td>
766
774
</tr>
767
775
<tr>
768
 
<td><span class="term"><em class="parameter"><code>event_cb</code></em>&#160;:</span></td>
 
776
<td><p><span class="term"><em class="parameter"><code>event_cb</code></em> :</span></p></td>
769
777
<td> User provided callback function to call on received events.
770
778
</td>
771
779
</tr>
772
780
<tr>
773
 
<td><span class="term"><em class="parameter"><code>extra</code></em>&#160;:</span></td>
 
781
<td><p><span class="term"><em class="parameter"><code>extra</code></em> :</span></p></td>
774
782
<td> Pointer to user specific data provided to <em class="parameter"><code>event_cb</code></em>.
775
783
</td>
776
784
</tr>
777
785
<tr>
778
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
786
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
779
787
<td> The number of handled events, or a negative value if an error occured.
780
788
</td>
781
789
</tr>
784
792
</div>
785
793
<hr>
786
794
<div class="refsect2" lang="en">
787
 
<a name="id444393"></a><h3>
788
 
<a name="prelude-connection-pool-set-global-event-handler"></a>prelude_connection_pool_set_global_event_handler ()</h3>
789
 
<a class="indexterm" name="id444404"></a><pre class="programlisting">void                prelude_connection_pool_set_global_event_handler
790
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
791
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
792
 
                                                         int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events));</pre>
 
795
<a name="prelude-connection-pool-set-global-event-handler"></a><h3>prelude_connection_pool_set_global_event_handler ()</h3>
 
796
<pre class="programlisting">void                prelude_connection_pool_set_global_event_handler
 
797
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
798
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
 
799
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());</pre>
793
800
<p>
794
801
<em class="parameter"><code>callback</code></em> will be called each time one of the event specified in
795
802
<em class="parameter"><code>wanted_events</code></em> happen to <em class="parameter"><code>pool</code></em>. However, contrary to
796
 
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler"><code class="function">prelude_connection_pool_set_event_handler()</code></a>, the callback will be called
 
803
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler" title="prelude_connection_pool_set_event_handler ()"><code class="function">prelude_connection_pool_set_event_handler()</code></a>, the callback will be called
797
804
only once per set of event.</p>
798
805
<p>
799
806
 
802
809
<col align="left" valign="top">
803
810
<tbody>
804
811
<tr>
805
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
806
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
812
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
813
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
807
814
</td>
808
815
</tr>
809
816
<tr>
810
 
<td><span class="term"><em class="parameter"><code>wanted_events</code></em>&#160;:</span></td>
 
817
<td><p><span class="term"><em class="parameter"><code>wanted_events</code></em> :</span></p></td>
811
818
<td> Event the user want to be notified about.
812
819
</td>
813
820
</tr>
814
821
<tr>
815
 
<td><span class="term"><em class="parameter"><code>callback</code></em>&#160;:</span></td>
 
822
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
816
823
<td> User specific callback to call when an event is available.
817
824
</td>
818
825
</tr>
821
828
</div>
822
829
<hr>
823
830
<div class="refsect2" lang="en">
824
 
<a name="id437889"></a><h3>
825
 
<a name="prelude-connection-pool-set-event-handler"></a>prelude_connection_pool_set_event_handler ()</h3>
826
 
<a class="indexterm" name="id437901"></a><pre class="programlisting">void                prelude_connection_pool_set_event_handler
827
 
                                                        (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
828
 
                                                         <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
829
 
                                                         int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx));</pre>
 
831
<a name="prelude-connection-pool-set-event-handler"></a><h3>prelude_connection_pool_set_event_handler ()</h3>
 
832
<pre class="programlisting">void                prelude_connection_pool_set_event_handler
 
833
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
 
834
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
 
835
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());</pre>
830
836
<p>
831
837
<em class="parameter"><code>callback</code></em> will be called each time one of the event specified in
832
838
<em class="parameter"><code>wanted_events</code></em> happens to <em class="parameter"><code>pool</code></em>.</p>
837
843
<col align="left" valign="top">
838
844
<tbody>
839
845
<tr>
840
 
<td><span class="term"><em class="parameter"><code>pool</code></em>&#160;:</span></td>
841
 
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
 
846
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
 
847
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
842
848
</td>
843
849
</tr>
844
850
<tr>
845
 
<td><span class="term"><em class="parameter"><code>wanted_events</code></em>&#160;:</span></td>
 
851
<td><p><span class="term"><em class="parameter"><code>wanted_events</code></em> :</span></p></td>
846
852
<td> Event the user want to be notified about.
847
853
</td>
848
854
</tr>
849
855
<tr>
850
 
<td><span class="term"><em class="parameter"><code>callback</code></em>&#160;:</span></td>
 
856
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
851
857
<td> User specific callback to call when an event is available.
852
858
</td>
853
859
</tr>
856
862
</div>
857
863
</div>
858
864
<div class="refsect1" lang="en">
859
 
<a name="id437560"></a><h2>See Also</h2>
 
865
<a name="libprelude-prelude-connection-pool.see-also"></a><h2>See Also</h2>
860
866
<p>
861
 
<a href="libprelude-prelude-connection.html#prelude-connection-t"><span class="type">prelude_connection_t</span></a>
862
 
<a href="libprelude-idmef-message-read.html#idmef-message-read"><code class="function">idmef_message_read()</code></a>
 
867
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a>
 
868
<a class="link" href="libprelude-idmef-message-read.html#idmef-message-read" title="idmef_message_read ()"><code class="function">idmef_message_read()</code></a>
863
869
</p>
864
870
</div>
865
871
</div>
 
872
<div class="footer">
 
873
<hr>
 
874
          Generated by GTK-Doc V1.10</div>
866
875
</body>
867
876
</html>