Drizzled Public API Documentation

conn_server.h
Go to the documentation of this file.
00001 /*
00002  * Drizzle Client & Protocol Library
00003  *
00004  * Copyright (C) 2008 Eric Day (eday@oddments.org)
00005  * All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions are
00009  * met:
00010  *
00011  *     * Redistributions of source code must retain the above copyright
00012  * notice, this list of conditions and the following disclaimer.
00013  *
00014  *     * Redistributions in binary form must reproduce the above
00015  * copyright notice, this list of conditions and the following disclaimer
00016  * in the documentation and/or other materials provided with the
00017  * distribution.
00018  *
00019  *     * The names of its contributors may not be used to endorse or
00020  * promote products derived from this software without specific prior
00021  * written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00026  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00027  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00028  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00029  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00030  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00031  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00032  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034  *
00035  */
00036 
00042 #ifndef __DRIZZLE_CON_SERVER_H
00043 #define __DRIZZLE_CON_SERVER_H
00044 
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048 
00066 DRIZZLE_API
00067 drizzle_return_t drizzle_con_listen(drizzle_con_st *con);
00068 
00076 DRIZZLE_API
00077 int drizzle_con_backlog(const drizzle_con_st *con);
00078 
00086 DRIZZLE_API
00087 void drizzle_con_set_backlog(drizzle_con_st *con, int backlog);
00088 
00096 DRIZZLE_API
00097 void drizzle_con_set_protocol_version(drizzle_con_st *con,
00098                                       uint8_t protocol_version);
00099 
00107 DRIZZLE_API
00108 void drizzle_con_set_server_version(drizzle_con_st *con,
00109                                     const char *server_version);
00110 
00118 DRIZZLE_API
00119 void drizzle_con_set_thread_id(drizzle_con_st *con, uint32_t thread_id);
00120 
00128 DRIZZLE_API
00129 void drizzle_con_set_scramble(drizzle_con_st *con, const uint8_t *scramble);
00130 
00138 DRIZZLE_API
00139 void drizzle_con_set_capabilities(drizzle_con_st *con,
00140                                   drizzle_capabilities_t capabilities);
00141 
00149 DRIZZLE_API
00150 void drizzle_con_set_charset(drizzle_con_st *con, drizzle_charset_t charset);
00151 
00159 DRIZZLE_API
00160 void drizzle_con_set_status(drizzle_con_st *con, drizzle_con_status_t status);
00161 
00169 DRIZZLE_API
00170 void drizzle_con_set_max_packet_size(drizzle_con_st *con,
00171                                      uint32_t max_packet_size);
00172 
00180 DRIZZLE_API
00181 void drizzle_con_copy_handshake(drizzle_con_st *con, drizzle_con_st *from);
00182 
00196 DRIZZLE_API
00197 void *drizzle_con_command_read(drizzle_con_st *con,
00198                                drizzle_command_t *command, size_t *offset,
00199                                size_t *size, size_t *total,
00200                                drizzle_return_t *ret_ptr);
00201 
00213 DRIZZLE_API
00214 void *drizzle_con_command_buffer(drizzle_con_st *con,
00215                                  drizzle_command_t *command, size_t *total,
00216                                  drizzle_return_t *ret_ptr);
00217 
00220 #ifdef __cplusplus
00221 }
00222 #endif
00223 
00224 #endif /* __DRIZZLE_CON_SERVER_H */