~drizzle-trunk/drizzle/development

1712.1.1 by Monty Taylor
Merged libdrizzle directly into tree.
1
/*
2
 * Drizzle Client & Protocol Library
3
 *
4
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
5
 * All rights reserved.
6
 *
7
 * Use and distribution licensed under the BSD license.  See
8
 * the COPYING file in this directory for full text.
9
 */
10
11
/**
12
 * @file
13
 * @brief Drizzle Declarations for Clients
14
 */
15
16
#ifndef __DRIZZLE_CLIENT_H
17
#define __DRIZZLE_CLIENT_H
18
19
#include <libdrizzle/drizzle.h>
20
#include <libdrizzle/conn_client.h>
21
#include <libdrizzle/handshake_client.h>
22
#include <libdrizzle/command_client.h>
23
#include <libdrizzle/query.h>
24
#include <libdrizzle/result_client.h>
25
#include <libdrizzle/column_client.h>
26
#include <libdrizzle/row_client.h>
27
#include <libdrizzle/field_client.h>
28
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32
33
/**
34
 * @defgroup drizzle_client_interface Drizzle Client Interface
35
 */
36
37
/**
38
 * @addtogroup drizzle_client Drizzle Declarations for Clients
39
 * @ingroup drizzle_client_interface
40
 * @{
41
 */
42
43
/**
44
 * Add TCP (IPv4 or IPv6) connection with common arguments.
45
 *
46
 * @param[in] drizzle Drizzle structure previously initialized with
47
 *  drizzle_create() or drizzle_clone().
48
 * @param[in] con Caller allocated structure, or NULL to allocate one.
49
 * @param[in] host Host to connect to. This may be a hostname to resolve, an
50
 *  IPv4 address, or an IPv6 address. This is passed directly to getaddrinfo().
51
 * @param[in] port Remote port to connect to.
52
 * @param[in] user User to use while establishing the connection.
53
 * @param[in] password Password to use while establishing the connection.
54
 * @param[in] db Initial database to connect to.
55
 * @param[in] options Drizzle connection options to add.
56
 * @return Same return as drizzle_con_create().
57
 */
58
DRIZZLE_API
59
drizzle_con_st *drizzle_con_add_tcp(drizzle_st *drizzle, drizzle_con_st *con,
60
                                    const char *host, in_port_t port,
61
                                    const char *user, const char *password,
62
                                    const char *db,
63
                                    drizzle_con_options_t options);
64
65
/**
66
 * Add unix domain socket connection with common arguments.
67
 *
68
 * @param[in] drizzle Drizzle structure previously initialized with
69
 *  drizzle_create() or drizzle_clone().
70
 * @param[in] con Caller allocated structure, or NULL to allocate one.
71
 * @param[in] uds Path to unix domain socket to use for connection.
72
 * @param[in] user User to use while establishing the connection.
73
 * @param[in] password Password to use while establishing the connection.
74
 * @param[in] db Initial database to connect to.
75
 * @param[in] options Drizzle connection options to add.
76
 * @return Same return as drizzle_con_create().
77
 */
78
DRIZZLE_API
79
drizzle_con_st *drizzle_con_add_uds(drizzle_st *drizzle, drizzle_con_st *con,
80
                                    const char *uds, const char *user,
81
                                    const char *password, const char *db,
82
                                    drizzle_con_options_t options);
83
84
/** @} */
85
86
#ifdef  __cplusplus
87
}
88
#endif
89
90
#endif /* __DRIZZLE_CLIENT_H */