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

ctpublic.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 _ctpublic_h_
00021 #define _ctpublic_h_
00022 
00023 #include <cspublic.h>
00024 
00025 #undef TDS_STATIC_CAST
00026 #ifdef __cplusplus
00027 #define TDS_STATIC_CAST(type, a) static_cast<type>(a)
00028 extern "C"
00029 {
00030 #if 0
00031 }
00032 #endif
00033 #else
00034 #define TDS_STATIC_CAST(type, a) ((type)(a))
00035 #endif
00036 
00037 /*
00038 ** define for each CT-Lib API
00039 */
00040 #define CT_BIND         TDS_STATIC_CAST(CS_INT, 0)
00041 #define CT_BR_COLUMN    TDS_STATIC_CAST(CS_INT, 1)
00042 #define CT_BR_TABLE     TDS_STATIC_CAST(CS_INT, 2)
00043 #define CT_CALLBACK     TDS_STATIC_CAST(CS_INT, 3)
00044 #define CT_CANCEL       TDS_STATIC_CAST(CS_INT, 4)
00045 #define CT_CAPABILITY   TDS_STATIC_CAST(CS_INT, 5)
00046 #define CT_CLOSE        TDS_STATIC_CAST(CS_INT, 6)
00047 #define CT_CMD_ALLOC    TDS_STATIC_CAST(CS_INT, 7)
00048 #define CT_CMD_DROP     TDS_STATIC_CAST(CS_INT, 8)
00049 #define CT_CMD_PROPS    TDS_STATIC_CAST(CS_INT, 9)
00050 #define CT_COMMAND      TDS_STATIC_CAST(CS_INT, 10)
00051 #define CT_COMPUTE_INFO TDS_STATIC_CAST(CS_INT, 11)
00052 #define CT_CON_ALLOC    TDS_STATIC_CAST(CS_INT, 12)
00053 #define CT_CON_DROP     TDS_STATIC_CAST(CS_INT, 13)
00054 #define CT_CON_PROPS    TDS_STATIC_CAST(CS_INT, 14)
00055 #define CT_CON_XFER     TDS_STATIC_CAST(CS_INT, 15)
00056 #define CT_CONFIG       TDS_STATIC_CAST(CS_INT, 16)
00057 #define CT_CONNECT      TDS_STATIC_CAST(CS_INT, 17)
00058 #define CT_CURSOR       TDS_STATIC_CAST(CS_INT, 18)
00059 #define CT_DATA_INFO    TDS_STATIC_CAST(CS_INT, 19)
00060 #define CT_DEBUG        TDS_STATIC_CAST(CS_INT, 20)
00061 #define CT_DESCRIBE     TDS_STATIC_CAST(CS_INT, 21)
00062 #define CT_DIAG         TDS_STATIC_CAST(CS_INT, 22)
00063 #define CT_DYNAMIC      TDS_STATIC_CAST(CS_INT, 23)
00064 #define CT_DYNDESC      TDS_STATIC_CAST(CS_INT, 24)
00065 #define CT_EXIT         TDS_STATIC_CAST(CS_INT, 25)
00066 #define CT_FETCH        TDS_STATIC_CAST(CS_INT, 26)
00067 #define CT_GET_DATA     TDS_STATIC_CAST(CS_INT, 27)
00068 #define CT_GETFORMAT    TDS_STATIC_CAST(CS_INT, 28)
00069 #define CT_GETLOGINFO   TDS_STATIC_CAST(CS_INT, 29)
00070 #define CT_INIT         TDS_STATIC_CAST(CS_INT, 30)
00071 #define CT_KEYDATA      TDS_STATIC_CAST(CS_INT, 31)
00072 #define CT_OPTIONS      TDS_STATIC_CAST(CS_INT, 32)
00073 #define CT_PARAM        TDS_STATIC_CAST(CS_INT, 33)
00074 #define CT_POLL         TDS_STATIC_CAST(CS_INT, 34)
00075 #define CT_RECVPASSTHRU TDS_STATIC_CAST(CS_INT, 35)
00076 #define CT_REMOTE_PWD   TDS_STATIC_CAST(CS_INT, 36)
00077 #define CT_RES_INFO     TDS_STATIC_CAST(CS_INT, 37)
00078 #define CT_RESULTS      TDS_STATIC_CAST(CS_INT, 38)
00079 #define CT_SEND         TDS_STATIC_CAST(CS_INT, 39)
00080 #define CT_SEND_DATA    TDS_STATIC_CAST(CS_INT, 40)
00081 #define CT_SENDPASSTHRU TDS_STATIC_CAST(CS_INT, 41)
00082 #define CT_SETLOGINFO   TDS_STATIC_CAST(CS_INT, 42)
00083 #define CT_WAKEUP       TDS_STATIC_CAST(CS_INT, 43)
00084 #define CT_LABELS       TDS_STATIC_CAST(CS_INT, 44)
00085 #define CT_DS_LOOKUP    TDS_STATIC_CAST(CS_INT, 45)
00086 #define CT_DS_DROP      TDS_STATIC_CAST(CS_INT, 46)
00087 #define CT_DS_OBJINFO   TDS_STATIC_CAST(CS_INT, 47)
00088 #define CT_SETPARAM     TDS_STATIC_CAST(CS_INT, 48)
00089 #define CT_DYNSQLDA     TDS_STATIC_CAST(CS_INT, 49)
00090 #define CT_NOTIFICATION TDS_STATIC_CAST(CS_INT, 1000)
00091 
00092 static const char rcsid_ctpublic_h[] = "$Id: ctpublic.h,v 1.14 2005/05/28 10:48:26 freddy77 Exp $";
00093 static const void *const no_unused_ctpublic_h_warn[] = { rcsid_ctpublic_h, no_unused_ctpublic_h_warn };
00094 
00095 
00096 CS_RETCODE ct_init(CS_CONTEXT * ctx, CS_INT version);
00097 CS_RETCODE ct_con_alloc(CS_CONTEXT * ctx, CS_CONNECTION ** con);
00098 CS_RETCODE ct_con_props(CS_CONNECTION * con, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
00099 CS_RETCODE ct_connect(CS_CONNECTION * con, CS_CHAR * servername, CS_INT snamelen);
00100 CS_RETCODE ct_cmd_alloc(CS_CONNECTION * con, CS_COMMAND ** cmd);
00101 CS_RETCODE ct_cancel(CS_CONNECTION * conn, CS_COMMAND * cmd, CS_INT type);
00102 CS_RETCODE ct_cmd_drop(CS_COMMAND * cmd);
00103 CS_RETCODE ct_close(CS_CONNECTION * con, CS_INT option);
00104 CS_RETCODE ct_con_drop(CS_CONNECTION * con);
00105 CS_RETCODE ct_exit(CS_CONTEXT * ctx, CS_INT unused);
00106 CS_RETCODE ct_command(CS_COMMAND * cmd, CS_INT type, const CS_VOID * buffer, CS_INT buflen, CS_INT option);
00107 CS_RETCODE ct_send(CS_COMMAND * cmd);
00108 CS_RETCODE ct_results(CS_COMMAND * cmd, CS_INT * result_type);
00109 CS_RETCODE ct_bind(CS_COMMAND * cmd, CS_INT item, CS_DATAFMT * datafmt, CS_VOID * buffer, CS_INT * copied, CS_SMALLINT * indicator);
00110 CS_RETCODE ct_fetch(CS_COMMAND * cmd, CS_INT type, CS_INT offset, CS_INT option, CS_INT * rows_read);
00111 CS_RETCODE ct_res_info_dyn(CS_COMMAND * cmd, CS_INT type, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
00112 CS_RETCODE ct_res_info(CS_COMMAND * cmd, CS_INT type, CS_VOID * buffer, CS_INT buflen, CS_INT * out_len);
00113 CS_RETCODE ct_describe(CS_COMMAND * cmd, CS_INT item, CS_DATAFMT * datafmt);
00114 CS_RETCODE ct_callback(CS_CONTEXT * ctx, CS_CONNECTION * con, CS_INT action, CS_INT type, CS_VOID * func);
00115 CS_RETCODE ct_send_dyn(CS_COMMAND * cmd);
00116 CS_RETCODE ct_results_dyn(CS_COMMAND * cmd, CS_INT * result_type);
00117 CS_RETCODE ct_config(CS_CONTEXT * ctx, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
00118 CS_RETCODE ct_cmd_props(CS_COMMAND * cmd, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
00119 CS_RETCODE ct_compute_info(CS_COMMAND * cmd, CS_INT type, CS_INT colnum, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
00120 CS_RETCODE ct_get_data(CS_COMMAND * cmd, CS_INT item, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen);
00121 CS_RETCODE ct_send_data(CS_COMMAND * cmd, CS_VOID * buffer, CS_INT buflen);
00122 CS_RETCODE ct_data_info(CS_COMMAND * cmd, CS_INT action, CS_INT colnum, CS_IODESC * iodesc);
00123 CS_RETCODE ct_capability(CS_CONNECTION * con, CS_INT action, CS_INT type, CS_INT capability, CS_VOID * value);
00124 CS_RETCODE ct_dynamic(CS_COMMAND * cmd, CS_INT type, CS_CHAR * id, CS_INT idlen, CS_CHAR * buffer, CS_INT buflen);
00125 CS_RETCODE ct_param(CS_COMMAND * cmd, CS_DATAFMT * datafmt, CS_VOID * data, CS_INT datalen, CS_SMALLINT indicator);
00126 CS_RETCODE ct_setparam(CS_COMMAND * cmd, CS_DATAFMT * datafmt, CS_VOID * data, CS_INT * datalen, CS_SMALLINT * indicator);
00127 CS_RETCODE ct_options(CS_CONNECTION * con, CS_INT action, CS_INT option, CS_VOID * param, CS_INT paramlen, CS_INT * outlen);
00128 CS_RETCODE ct_poll(CS_CONTEXT * ctx, CS_CONNECTION * connection, CS_INT milliseconds, CS_CONNECTION ** compconn,
00129                    CS_COMMAND ** compcmd, CS_INT * compid, CS_INT * compstatus);
00130 CS_RETCODE ct_cursor(CS_COMMAND * cmd, CS_INT type, CS_CHAR * name, CS_INT namelen, CS_CHAR * text, CS_INT tlen, CS_INT option);
00131 CS_RETCODE ct_diag(CS_CONNECTION * conn, CS_INT operation, CS_INT type, CS_INT idx, CS_VOID * buffer);
00132 
00133 #ifdef __cplusplus
00134 #if 0
00135 {
00136 #endif
00137 }
00138 #endif
00139 
00140 #endif

Generated on Wed May 7 19:22:09 2008 for FreeTDS API by  doxygen 1.4.1