Main Page Modules Compound List File List Compound Members File Members Related Pages

# ctlib.h

    00001 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
    00002  * Copyright (C) 1998-1999  Brian Bruns
    00003  *
    00004  * This library is free software; you can redistribute it and/or
    00005  * modify it under the terms of the GNU Library General Public
    00006  * License as published by the Free Software Foundation; either
    00007  * version 2 of the License, or (at your option) any later version.
    00008  *
    00009  * This library is distributed in the hope that it will be useful,
    00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  * Library General Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Library General Public
    00015  * License along with this library; if not, write to the
    00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017  * Boston, MA 02111-1307, USA.
    00018  */
    00019
    00020 #ifndef _ctlib_h_
    00021 #define _ctlib_h_
    00022 /*
    00023 ** Internal (not part of the exposed API) prototypes and such.
    00024 */
    00025 #ifdef __cplusplus
    00026 extern "C"
    00027 {
    00028 #if 0
    00029 }
    00030 #endif
    00031 #endif
    00032
    00033 static char rcsid_ctlib_h[] = "$Id: ctlib.h,v 1.7 2003/12/19 23:25:59 freddy77 Exp $";
    00034 static void *no_unused_ctlib_h_warn[] = { rcsid_ctlib_h, no_unused_ctlib_h_warn };
    00035
    00036 #include <tds.h>
    00037 /*
    00038  * internal types
    00039  */
    00040 struct _cs_context
    00041 {
    00042         CS_INT date_convert_fmt;
    00043         CS_INT cs_errhandletype;
    00044         CS_INT cs_diag_msglimit;
    00045
    00046         /* added for storing the maximum messages limit CT_DIAG */
    00047         /* code changes starts here - CT_DIAG - 02 */
    00048
    00049         CS_INT cs_diag_msglimit_client;
    00050         CS_INT cs_diag_msglimit_server;
    00051         CS_INT cs_diag_msglimit_total;
    00052         struct cs_diag_msg_client *clientstore;
    00053         struct cs_diag_msg_svr *svrstore;
    00054
    00055         /* code changes ends here - CT_DIAG - 02 */
    00056
    00057         struct cs_diag_msg *msgstore;
    00058         CS_CSLIBMSG_FUNC _cslibmsg_cb;
    00059         CS_CLIENTMSG_FUNC _clientmsg_cb;
    00060         CS_SERVERMSG_FUNC _servermsg_cb;
    00061 /* code changes start here - CS_CONFIG - 01*/
    00062         void *userdata;
    00063         int userdata_len;
    00064 /* code changes end here - CS_CONFIG - 01*/
    00065         TDSCONTEXT *tds_ctx;
    00066         CS_CONFIG config;
    00067 };
    00068
    00069 struct _cs_blkdesc
    00070 {
    00071         int dummy;
    00072 };
    00073
    00074 /*
    00075  * internal typedefs
    00076  */
    00077 typedef struct ctcolinfo
    00078 {
    00079         TDS_SMALLINT *indicator;
    00080 }
    00081 CT_COLINFO;
    00082
    00083 /*
    00084  * internal prototypes
    00085  */
    00086 int ctlib_handle_server_message(TDSCONTEXT * ctxptr, TDSSOCKET * tdsptr, TDSMSGINFO * msgptr);
    00087 int ctlib_handle_client_message(TDSCONTEXT * ctxptr, TDSSOCKET * tdsptr, TDSMSGINFO * msgptr);
    00088 int _ct_get_server_type(int datatype);
    00089
    00090 #ifdef __cplusplus
    00091 #if 0
    00092 {
    00093 #endif
    00094 }
    00095 #endif
    00096
    00097 #endif