FreeTDS API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tdssrv.h
1 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2 * Copyright (C) 1998-1999 Brian Bruns
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20 #ifndef _tdssrv_h_
21 #define _tdssrv_h_
22 #endif
23
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 #if 0
29 }
30 #endif
31
32 static const char rcsid_tdssrv_h[] = "$Id: tdssrv.h,v 1.10 2008-01-07 14:07:21 freddy77 Exp $";
33 static const void *const no_unused_tdssrv_h_warn[] = { rcsid_tdssrv_h, no_unused_tdssrv_h_warn };
34
35 /* login.c */
36 unsigned char *tds7_decrypt_pass(const unsigned char *crypt_pass, int len, unsigned char *clear_pass);
37 TDSSOCKET *tds_listen(TDSCONTEXT * ctx, int ip_port);
38 void tds_read_login(TDSSOCKET * tds, TDSLOGIN * login);
39 int tds7_read_login(TDSSOCKET * tds, TDSLOGIN * login);
40 TDSLOGIN *tds_alloc_read_login(TDSSOCKET * tds);
41
42 /* query.c */
43 char *tds_get_query(TDSSOCKET * tds);
44 char *tds_get_generic_query(TDSSOCKET * tds);
45
46 /* server.c */
47 void tds_env_change(TDSSOCKET * tds, int type, const char *oldvalue, const char *newvalue);
48 void tds_send_msg(TDSSOCKET * tds, int msgno, int msgstate, int severity, const char *msgtext, const char *srvname,
49 const char *procname, int line);
50 void tds_send_login_ack(TDSSOCKET * tds, const char *progname);
51 void tds_send_eed(TDSSOCKET * tds, int msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line);
52 void tds_send_err(TDSSOCKET * tds, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr);
53 void tds_send_capabilities_token(TDSSOCKET * tds);
54 /* TODO remove, use tds_send_done */
55 void tds_send_done_token(TDSSOCKET * tds, TDS_SMALLINT flags, TDS_INT numrows);
56 void tds_send_done(TDSSOCKET * tds, int token, TDS_SMALLINT flags, TDS_INT numrows);
57 void tds_send_control_token(TDSSOCKET * tds, TDS_SMALLINT numcols);
58 void tds_send_col_name(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
59 void tds_send_col_info(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
60 void tds_send_result(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
61 void tds7_send_result(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
62 void tds_send_table_header(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
63 void tds_send_row(TDSSOCKET * tds, TDSRESULTINFO * resinfo);
64 void tds8_send_prelogin(TDSSOCKET * tds);
65
66 #if 0
67 {
68 #endif
69 #ifdef __cplusplus
70 }
71 #endif