~drizzle-trunk/drizzle/development

1836.3.1 by Monty Taylor
Removed libdrizzle doxygen. Put in function stubs in sphinx. Someone can
1
.. highlightlang:: c
2
3
Connection Object
4
-----------------
5
6
.. index:: object: drizzle_con_st
7
8
General Functions
9
^^^^^^^^^^^^^^^^^
10
11
12
.. c:function:: int   drizzle_con_fd (const drizzle_con_st *con)
13
14
.. c:function:: drizzle_return_t  drizzle_con_set_fd (drizzle_con_st *con, int fd)
15
16
.. c:function:: void  drizzle_con_close (drizzle_con_st *con)
17
18
.. c:function:: drizzle_return_t  drizzle_con_set_events (drizzle_con_st *con, short events)
19
20
.. c:function:: drizzle_return_t  drizzle_con_set_revents (drizzle_con_st *con, short revents)
21
22
.. c:function:: drizzle_st *  drizzle_con_drizzle (const drizzle_con_st *con)
23
24
.. c:function:: const char *  drizzle_con_error (const drizzle_con_st *con)
25
26
.. c:function:: int   drizzle_con_errno (const drizzle_con_st *con)
27
28
.. c:function:: uint16_t  drizzle_con_error_code (const drizzle_con_st *con)
29
30
.. c:function:: const char *  drizzle_con_sqlstate (const drizzle_con_st *con)
31
32
.. c:function:: drizzle_con_options_t   drizzle_con_options (const drizzle_con_st *con)
33
34
.. c:function:: void  drizzle_con_set_options (drizzle_con_st *con, drizzle_con_options_t options)
35
36
.. c:function:: void  drizzle_con_add_options (drizzle_con_st *con, drizzle_con_options_t options)
37
38
.. c:function:: void  drizzle_con_remove_options (drizzle_con_st *con, drizzle_con_options_t options)
39
40
.. c:function:: const char *  drizzle_con_host (const drizzle_con_st *con)
41
42
.. c:function:: in_port_t   drizzle_con_port (const drizzle_con_st *con)
43
44
.. c:function:: void  drizzle_con_set_tcp (drizzle_con_st *con, const char *host, in_port_t port)
45
46
.. c:function:: const char *  drizzle_con_uds (const drizzle_con_st *con)
47
48
.. c:function:: void  drizzle_con_set_uds (drizzle_con_st *con, const char *uds)
49
50
.. c:function:: const char *  drizzle_con_user (const drizzle_con_st *con)
51
52
.. c:function:: const char *  drizzle_con_password (const drizzle_con_st *con)
53
54
.. c:function:: void  drizzle_con_set_auth (drizzle_con_st *con, const char *user, const char *password)
55
56
.. c:function:: const char *  drizzle_con_db (const drizzle_con_st *con)
57
58
.. c:function:: void  drizzle_con_set_db (drizzle_con_st *con, const char *db)
59
60
.. c:function:: void *  drizzle_con_context (const drizzle_con_st *con)
61
62
.. c:function:: void  drizzle_con_set_context (drizzle_con_st *con, void *context)
63
64
.. c:function:: void  drizzle_con_set_context_free_fn (drizzle_con_st *con, drizzle_con_context_free_fn *function)
65
66
.. c:function:: uint8_t   drizzle_con_protocol_version (const drizzle_con_st *con)
67
68
.. c:function:: const char *  drizzle_con_server_version (const drizzle_con_st *con)
69
70
.. c:function:: uint32_t  drizzle_con_server_version_number (const drizzle_con_st *con)
71
72
.. c:function:: uint32_t  drizzle_con_thread_id (const drizzle_con_st *con)
73
74
.. c:function:: const uint8_t *   drizzle_con_scramble (const drizzle_con_st *con)
75
76
.. c:function:: drizzle_capabilities_t  drizzle_con_capabilities (const drizzle_con_st *con)
77
78
.. c:function:: drizzle_charset_t   drizzle_con_charset (const drizzle_con_st *con)
79
80
.. c:function:: drizzle_con_status_t  drizzle_con_status (const drizzle_con_st *con)
81
82
.. c:function:: uint32_t  drizzle_con_max_packet_size (const drizzle_con_st *con)
83
84
Functions for Clients
85
^^^^^^^^^^^^^^^^^^^^^
86
87
.. c:var DRIZZLE_SHUTDOWN_DEFAULT
88
89
.. c:function:: drizzle_return_t  drizzle_con_connect (drizzle_con_st *con)
90
91
.. c:function:: drizzle_result_st *   drizzle_con_quit (drizzle_con_st *con,
92
93
.. c:function:: drizzle_result_st *result, drizzle_return_t *ret_ptr)
94
95
.. c:function:: drizzle_result_st *   drizzle_quit (drizzle_con_st *con, drizzle_result_st *result, drizzle_return_t *ret_ptr)
96
97
.. c:function:: drizzle_result_st *   drizzle_con_select_db (drizzle_con_st *con,
98
99
.. c:function:: drizzle_result_st *result, const char *db, drizzle_return_t *ret_ptr)
100
101
.. c:function:: drizzle_result_st *   drizzle_select_db (drizzle_con_st *con,
102
103
.. c:function:: drizzle_result_st *result, const char *db, drizzle_return_t *ret_ptr)
104
105
.. c:function:: drizzle_result_st *   drizzle_con_shutdown (drizzle_con_st *con,
106
107
.. c:function:: drizzle_result_st *result, drizzle_return_t *ret_ptr)
108
109
.. c:function:: drizzle_result_st *   drizzle_shutdown (drizzle_con_st *con,
110
111
.. c:function:: drizzle_result_st *result, uint32_t level, drizzle_return_t *ret_ptr)
112
113
.. c:function:: drizzle_result_st *   drizzle_con_ping (drizzle_con_st *con,
114
115
.. c:function:: drizzle_result_st *result, drizzle_return_t *ret_ptr)
116
117
.. c:function:: drizzle_result_st *   drizzle_ping (drizzle_con_st *con, drizzle_result_st *result, drizzle_return_t *ret_ptr)
118
119
.. c:function:: drizzle_result_st *   drizzle_con_command_write (drizzle_con_st *con, drizzle_result_st *result, drizzle_command_t command, const void *data, size_t size, size_t total, drizzle_return_t *ret_ptr)
120
121
Handshake Functions for Clients
122
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
124
These functions are used to send and receive handshake packets for a client.
125
These are only used by low-level clients when the DRIZZLE_CON_RAW_PACKET
126
option is set, so most applications will never need to use these.
127
128
129
.. c:function:: drizzle_return_t  drizzle_handshake_server_read (drizzle_con_st *con)
130
131
Read handshake packet from the server in a client.
132
133
.. c:function:: drizzle_return_t  drizzle_handshake_client_write (drizzle_con_st *con)
134
135
Write client handshake packet to a server.
136
137
Functions for Servers
138
^^^^^^^^^^^^^^^^^^^^^
139
140
These functions extend the core connection functions with a set of functions
141
for server application use. These functions allow you to set raw handshake
142
  information for use with the handshake write functions.
143
144
145
.. c:function:: drizzle_return_t  drizzle_con_listen (drizzle_con_st *con)
146
147
.. c:function:: int   drizzle_con_backlog (const drizzle_con_st *con)
148
149
.. c:function:: void  drizzle_con_set_backlog (drizzle_con_st *con, int backlog)
150
151
.. c:function:: void  drizzle_con_set_protocol_version (drizzle_con_st *con, uint8_t protocol_version)
152
153
.. c:function:: void  drizzle_con_set_server_version (drizzle_con_st *con, const char *server_version)
154
155
.. c:function:: void  drizzle_con_set_thread_id (drizzle_con_st *con, uint32_t thread_id)
156
157
.. c:function:: void  drizzle_con_set_scramble (drizzle_con_st *con, const uint8_t *scramble)
158
159
.. c:function:: void  drizzle_con_set_capabilities (drizzle_con_st *con, drizzle_capabilities_t capabilities)
160
161
.. c:function:: void  drizzle_con_set_charset (drizzle_con_st *con, drizzle_charset_t charset)
162
163
.. c:function:: void  drizzle_con_set_status (drizzle_con_st *con, drizzle_con_status_t status)
164
165
.. c:function:: void  drizzle_con_set_max_packet_size (drizzle_con_st *con, uint32_t max_packet_size)
166
167
.. c:function:: void  drizzle_con_copy_handshake (drizzle_con_st *con, drizzle_con_st *from)
168
169
.. c:function:: void *  drizzle_con_command_read (drizzle_con_st *con, drizzle_command_t *command, size_t *offset, size_t *size, size_t *total, drizzle_return_t *ret_ptr)
170
171
.. c:function:: void *  drizzle_con_command_buffer (drizzle_con_st *con, drizzle_command_t *command, size_t *total, drizzle_return_t *ret_ptr)
172
173
Handshake Functions for Server
174
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175
176
These functions are used to send and receive handshake packets in a server.
177
178
179
.. c:function:: drizzle_return_t  drizzle_handshake_server_write (drizzle_con_st *con)
180
181
Write server handshake packet to a client.
182
183
184
.. c:function:: drizzle_return_t  drizzle_handshake_client_read (drizzle_con_st *con)
185
186
Read handshake packet from the client in a server.
187