Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

# tdssrv.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 _tdssrv_h_
    00021 #define _tdssrv_h_
    00022 #endif
    00023
    00024 #ifdef __cplusplus
    00025 extern "C"
    00026 {
    00027 #endif
    00028 #if 0
    00029 }
    00030 #endif
    00031
    00032 static const char rcsid_tdssrv_h[] = "$Id: tdssrv.h,v 1.10 2008/01/07 14:07:21 freddy77 Exp $";
    00033 static const void *const no_unused_tdssrv_h_warn[] = { rcsid_tdssrv_h, no_unused_tdssrv_h_warn };
    00034
    00035 /* login.c */
    00036 unsigned char *tds7_decrypt_pass(const unsigned char *crypt_pass, int len, unsigned char *clear_pass);
    00037 TDSSOCKET *tds_listen(TDSCONTEXT * ctx, int ip_port);
    00038 void tds_read_login(TDSSOCKET * tds, TDSLOGIN * login);
    00039 int tds7_read_login(TDSSOCKET * tds, TDSLOGIN * login);
    00040 TDSLOGIN *tds_alloc_read_login(TDSSOCKET * tds);
    00041
    00042 /* query.c */
    00043 char *tds_get_query(TDSSOCKET * tds);
    00044 char *tds_get_generic_query(TDSSOCKET * tds);
    00045
    00046 /* server.c */
    00047 void tds_env_change(TDSSOCKET * tds, int type, const char *oldvalue, const char *newvalue);
    00048 void tds_send_msg(TDSSOCKET * tds, int msgno, int msgstate, int severity, const char *msgtext, const char *srvname,
    00049                   const char *procname, int line);
    00050 void tds_send_login_ack(TDSSOCKET * tds, const char *progname);
    00051 void tds_send_eed(TDSSOCKET * tds, int msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line);
    00052 void tds_send_err(TDSSOCKET * tds, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr);
    00053 void tds_send_capabilities_token(TDSSOCKET * tds);
    00054 /* TODO remove, use tds_send_done */
    00055 void tds_send_done_token(TDSSOCKET * tds, TDS_SMALLINT flags, TDS_INT numrows);
    00056 void tds_send_done(TDSSOCKET * tds, int token, TDS_SMALLINT flags, TDS_INT numrows);
    00057 void tds_send_control_token(TDSSOCKET * tds, TDS_SMALLINT numcols);
    00058 void tds_send_col_name(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00059 void tds_send_col_info(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00060 void tds_send_result(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00061 void tds7_send_result(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00062 void tds_send_table_header(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00063 void tds_send_row(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
    00064 void tds8_send_prelogin(TDSSOCKET * tds);
    00065
    00066 #if 0
    00067 {
    00068 #endif
    00069 #ifdef __cplusplus
    00070 }
    00071 #endif