~drizzle-trunk/drizzle/development

2244.1.1 by Monty Taylor
Split libdrizzle into 1.0 and 2.0. Applied the C++ changes to 2.0 branch.
1
/*
2
 * Drizzle Client & Protocol Library
3
 *
4
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
5
 * All rights reserved.
6
 *
7
 * Redistribution and use in source and binary forms, with or without
8
 * modification, are permitted provided that the following conditions are
9
 * met:
10
 *
11
 *     * Redistributions of source code must retain the above copyright
12
 * notice, this list of conditions and the following disclaimer.
13
 *
14
 *     * Redistributions in binary form must reproduce the above
15
 * copyright notice, this list of conditions and the following disclaimer
16
 * in the documentation and/or other materials provided with the
17
 * distribution.
18
 *
19
 *     * The names of its contributors may not be used to endorse or
20
 * promote products derived from this software without specific prior
21
 * written permission.
22
 *
23
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
 *
35
 */
36
2449.1.4 by Brian Aker
Complete update of libdrizzle
37
#pragma once
2244.1.1 by Monty Taylor
Split libdrizzle into 1.0 and 2.0. Applied the C++ changes to 2.0 branch.
38
39
/**
40
 * @file
41
 * @brief Drizzle Declarations for Clients
42
 */
43
2449.1.2 by Brian Aker
Additional fixes for libdrizzle.
44
#include <libdrizzle-2.0/drizzle.h>
45
#include <libdrizzle-2.0/conn_client.h>
46
#include <libdrizzle-2.0/handshake_client.h>
47
#include <libdrizzle-2.0/command_client.h>
48
#include <libdrizzle-2.0/query.h>
49
#include <libdrizzle-2.0/result_client.h>
50
#include <libdrizzle-2.0/column_client.h>
51
#include <libdrizzle-2.0/row_client.h>
52
#include <libdrizzle-2.0/field_client.h>
2244.1.1 by Monty Taylor
Split libdrizzle into 1.0 and 2.0. Applied the C++ changes to 2.0 branch.
53
54
#ifdef __cplusplus
55
extern "C" {
56
#endif
57
58
/**
59
 * @defgroup drizzle_client_interface Drizzle Client Interface
60
 */
61
62
/**
63
 * @addtogroup drizzle_client Drizzle Declarations for Clients
64
 * @ingroup drizzle_client_interface
65
 * @{
66
 */
67
68
/**
69
 * Add TCP (IPv4 or IPv6) connection with common arguments.
70
 *
71
 * @param[in] drizzle Drizzle structure previously initialized with
72
 *  drizzle_create() or drizzle_clone().
73
 * @param[in] con Caller allocated structure, or NULL to allocate one.
74
 * @param[in] host Host to connect to. This may be a hostname to resolve, an
75
 *  IPv4 address, or an IPv6 address. This is passed directly to getaddrinfo().
76
 * @param[in] port Remote port to connect to.
77
 * @param[in] user User to use while establishing the connection.
78
 * @param[in] password Password to use while establishing the connection.
79
 * @param[in] db Initial database to connect to.
80
 * @param[in] options Drizzle connection options to add.
81
 * @return Same return as drizzle_con_create().
82
 */
83
DRIZZLE_API
2463.1.4 by Brian Aker
Remove con from being passed object.
84
drizzle_con_st *drizzle_con_add_tcp(drizzle_st *drizzle,
2244.1.1 by Monty Taylor
Split libdrizzle into 1.0 and 2.0. Applied the C++ changes to 2.0 branch.
85
                                    const char *host, in_port_t port,
86
                                    const char *user, const char *password,
87
                                    const char *db,
88
                                    drizzle_con_options_t options);
89
90
/**
91
 * Add unix domain socket connection with common arguments.
92
 *
93
 * @param[in] drizzle Drizzle structure previously initialized with
94
 *  drizzle_create() or drizzle_clone().
95
 * @param[in] con Caller allocated structure, or NULL to allocate one.
96
 * @param[in] uds Path to unix domain socket to use for connection.
97
 * @param[in] user User to use while establishing the connection.
98
 * @param[in] password Password to use while establishing the connection.
99
 * @param[in] db Initial database to connect to.
100
 * @param[in] options Drizzle connection options to add.
101
 * @return Same return as drizzle_con_create().
102
 */
103
DRIZZLE_API
2463.1.4 by Brian Aker
Remove con from being passed object.
104
drizzle_con_st *drizzle_con_add_uds(drizzle_st *drizzle,
2244.1.1 by Monty Taylor
Split libdrizzle into 1.0 and 2.0. Applied the C++ changes to 2.0 branch.
105
                                    const char *uds, const char *user,
106
                                    const char *password, const char *db,
107
                                    drizzle_con_options_t options);
108
109
/** @} */
110
111
#ifdef  __cplusplus
112
}
113
#endif