FreeTDS API: include/ctpublic.h Source File

FreeTDS API

Loading...
Searching...
No Matches
ctpublic.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 _ctpublic_h_
21#define _ctpublic_h_
22
23#include <cspublic.h>
24
25#undef TDS_STATIC_CAST
26#ifdef __cplusplus
27#define TDS_STATIC_CAST(type, a) static_cast<type>(a)
28extern "C"
29{
30#if 0
31}
32#endif
33#else
34#define TDS_STATIC_CAST(type, a) ((type)(a))
35#endif
36
37/*
38** define for each CT-Lib API
39*/
40#define CT_BIND TDS_STATIC_CAST(CS_INT, 0)
41#define CT_BR_COLUMN TDS_STATIC_CAST(CS_INT, 1)
42#define CT_BR_TABLE TDS_STATIC_CAST(CS_INT, 2)
43#define CT_CALLBACK TDS_STATIC_CAST(CS_INT, 3)
44#define CT_CANCEL TDS_STATIC_CAST(CS_INT, 4)
45#define CT_CAPABILITY TDS_STATIC_CAST(CS_INT, 5)
46#define CT_CLOSE TDS_STATIC_CAST(CS_INT, 6)
47#define CT_CMD_ALLOC TDS_STATIC_CAST(CS_INT, 7)
48#define CT_CMD_DROP TDS_STATIC_CAST(CS_INT, 8)
49#define CT_CMD_PROPS TDS_STATIC_CAST(CS_INT, 9)
50#define CT_COMMAND TDS_STATIC_CAST(CS_INT, 10)
51#define CT_COMPUTE_INFO TDS_STATIC_CAST(CS_INT, 11)
52#define CT_CON_ALLOC TDS_STATIC_CAST(CS_INT, 12)
53#define CT_CON_DROP TDS_STATIC_CAST(CS_INT, 13)
54#define CT_CON_PROPS TDS_STATIC_CAST(CS_INT, 14)
55#define CT_CON_XFER TDS_STATIC_CAST(CS_INT, 15)
56#define CT_CONFIG TDS_STATIC_CAST(CS_INT, 16)
57#define CT_CONNECT TDS_STATIC_CAST(CS_INT, 17)
58#define CT_CURSOR TDS_STATIC_CAST(CS_INT, 18)
59#define CT_DATA_INFO TDS_STATIC_CAST(CS_INT, 19)
60#define CT_DEBUG TDS_STATIC_CAST(CS_INT, 20)
61#define CT_DESCRIBE TDS_STATIC_CAST(CS_INT, 21)
62#define CT_DIAG TDS_STATIC_CAST(CS_INT, 22)
63#define CT_DYNAMIC TDS_STATIC_CAST(CS_INT, 23)
64#define CT_DYNDESC TDS_STATIC_CAST(CS_INT, 24)
65#define CT_EXIT TDS_STATIC_CAST(CS_INT, 25)
66#define CT_FETCH TDS_STATIC_CAST(CS_INT, 26)
67#define CT_GET_DATA TDS_STATIC_CAST(CS_INT, 27)
68#define CT_GETFORMAT TDS_STATIC_CAST(CS_INT, 28)
69#define CT_GETLOGINFO TDS_STATIC_CAST(CS_INT, 29)
70#define CT_INIT TDS_STATIC_CAST(CS_INT, 30)
71#define CT_KEYDATA TDS_STATIC_CAST(CS_INT, 31)
72#define CT_OPTIONS TDS_STATIC_CAST(CS_INT, 32)
73#define CT_PARAM TDS_STATIC_CAST(CS_INT, 33)
74#define CT_POLL TDS_STATIC_CAST(CS_INT, 34)
75#define CT_RECVPASSTHRU TDS_STATIC_CAST(CS_INT, 35)
76#define CT_REMOTE_PWD TDS_STATIC_CAST(CS_INT, 36)
77#define CT_RES_INFO TDS_STATIC_CAST(CS_INT, 37)
78#define CT_RESULTS TDS_STATIC_CAST(CS_INT, 38)
79#define CT_SEND TDS_STATIC_CAST(CS_INT, 39)
80#define CT_SEND_DATA TDS_STATIC_CAST(CS_INT, 40)
81#define CT_SENDPASSTHRU TDS_STATIC_CAST(CS_INT, 41)
82#define CT_SETLOGINFO TDS_STATIC_CAST(CS_INT, 42)
83#define CT_WAKEUP TDS_STATIC_CAST(CS_INT, 43)
84#define CT_LABELS TDS_STATIC_CAST(CS_INT, 44)
85#define CT_DS_LOOKUP TDS_STATIC_CAST(CS_INT, 45)
86#define CT_DS_DROP TDS_STATIC_CAST(CS_INT, 46)
87#define CT_DS_OBJINFO TDS_STATIC_CAST(CS_INT, 47)
88#define CT_SETPARAM TDS_STATIC_CAST(CS_INT, 48)
89#define CT_DYNSQLDA TDS_STATIC_CAST(CS_INT, 49)
90#define CT_NOTIFICATION TDS_STATIC_CAST(CS_INT, 1000)
91
92static const char rcsid_ctpublic_h[] = "$Id: ctpublic.h,v 1.14 2005-05-28 10:48:26 freddy77 Exp $";
93static const void *const no_unused_ctpublic_h_warn[] = { rcsid_ctpublic_h, no_unused_ctpublic_h_warn };
94
95
96CS_RETCODE ct_init(CS_CONTEXT * ctx, CS_INT version);
97CS_RETCODE ct_con_alloc(CS_CONTEXT * ctx, CS_CONNECTION ** con);
98CS_RETCODE ct_con_props(CS_CONNECTION * con, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
99CS_RETCODE ct_connect(CS_CONNECTION * con, CS_CHAR * servername, CS_INT snamelen);
100CS_RETCODE ct_cmd_alloc(CS_CONNECTION * con, CS_COMMAND ** cmd);
101CS_RETCODE ct_cancel(CS_CONNECTION * conn, CS_COMMAND * cmd, CS_INT type);
102CS_RETCODE ct_cmd_drop(CS_COMMAND * cmd);
103CS_RETCODE ct_close(CS_CONNECTION * con, CS_INT option);
104CS_RETCODE ct_con_drop(CS_CONNECTION * con);
105CS_RETCODE ct_exit(CS_CONTEXT * ctx, CS_INT unused);
106CS_RETCODE ct_command(CS_COMMAND * cmd, CS_INT type, const CS_VOID * buffer, CS_INT buflen, CS_INT option);
107CS_RETCODE ct_send(CS_COMMAND * cmd);
108CS_RETCODE ct_results(CS_COMMAND * cmd, CS_INT * result_type);
109CS_RETCODE ct_bind(CS_COMMAND * cmd, CS_INT item, CS_DATAFMT * datafmt, CS_VOID * buffer, CS_INT * copied, CS_SMALLINT * indicator);
110CS_RETCODE ct_fetch(CS_COMMAND * cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT * rows_read);
111CS_RETCODE ct_res_info_dyn(CS_COMMAND * cmd, CS_INT type, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
112CS_RETCODE ct_res_info(CS_COMMAND * cmd, CS_INT type, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
113CS_RETCODE ct_describe(CS_COMMAND * cmd, CS_INT item, CS_DATAFMT * datafmt);
114CS_RETCODE ct_callback(CS_CONTEXT * ctx, CS_CONNECTION * con, CS_INT action, CS_INT type, CS_VOID * func);
115CS_RETCODE ct_send_dyn(CS_COMMAND * cmd);
116CS_RETCODE ct_results_dyn(CS_COMMAND * cmd, CS_INT * result_type);
117CS_RETCODE ct_config(CS_CONTEXT * ctx, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
118CS_RETCODE ct_cmd_props(CS_COMMAND * cmd, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
119CS_RETCODE ct_compute_info(CS_COMMAND * cmd, CS_INT type, CS_INT colnum, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
120CS_RETCODE ct_get_data(CS_COMMAND * cmd, CS_INT item, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
121CS_RETCODE ct_send_data(CS_COMMAND * cmd, CS_VOID * buffer, CS_INT buflen);
122CS_RETCODE ct_data_info(CS_COMMAND * cmd, CS_INT action, CS_INT colnum, CS_IODESC * iodesc);
123CS_RETCODE ct_capability(CS_CONNECTION * con, CS_INT action, CS_INT type, CS_INT capability, CS_VOID * value);
124CS_RETCODE ct_dynamic(CS_COMMAND * cmd, CS_INT type, CS_CHAR * id, CS_INT idlen, CS_CHAR * buffer, CS_INT buflen);
125CS_RETCODE ct_param(CS_COMMAND * cmd, CS_DATAFMT * datafmt, CS_VOID * data, CS_INT datalen, CS_SMALLINT indicator);
126CS_RETCODE ct_setparam(CS_COMMAND * cmd, CS_DATAFMT * datafmt, CS_VOID * data, CS_INT * datalen, CS_SMALLINT * indicator);
127CS_RETCODE ct_options(CS_CONNECTION * con, CS_INT action, CS_INT option, CS_VOID * param, CS_INT paramlen, CS_INT * outlen);
128CS_RETCODE ct_poll(CS_CONTEXT * ctx, CS_CONNECTION * connection, CS_INT milliseconds, CS_CONNECTION ** compconn,
129 CS_COMMAND ** compcmd, CS_INT * compid, CS_INT * compstatus);
130CS_RETCODE ct_cursor(CS_COMMAND * cmd, CS_INT type, CS_CHAR * name, CS_INT namelen, CS_CHAR * text, CS_INT tlen, CS_INT option);
131CS_RETCODE ct_diag(CS_CONNECTION * conn, CS_INT operation, CS_INT type, CS_INT idx, CS_VOID * buffer);
132
133#ifdef __cplusplus
134#if 0
135{
136#endif
137}
138#endif
139
140#endif
_cs_iodesc
Definition cstypes.h:102
_cs_datafmt
Definition cstypes.h:119
_cs_context
Definition ctlib.h:135
_cs_connection
Definition ctlib.h:188
_cs_command
Definition ctlib.h:284