blob: 425d696f34bed138fc68283822abb92e973c2624 [file] [log] [blame]
Tang Cheng03c0b0a2015-01-12 11:19:45 +08001/* Copyright (c) 1991, 2005, Oracle. All rights reserved. */
2/*
3 NAME
4 ocikpr.h - header of K & R compilers
5 MODIFIED (MM/DD/YY)
6 mbastawa 09/16/05 - dbhygiene
7 porangas 12/04/00 - Forward merge bug#974710 to 9i
8 sgollapu 05/19/98 - Change text to OraText
9 dchatter 04/21/96 -
10 dchatter 11/10/95 - add ognfd() - get native fd
11 lchidamb 04/06/95 - drop maxdsz from obindps/odefinps
12 slari 04/07/95 - add opinit
13 dchatter 03/08/95 - osetpi and ogetpi
14 lchidamb 12/09/94 - add obindps() and odefinps()
15 dchatter 03/06/95 - merge changes from branch 1.1.720.2
16 dchatter 11/14/94 - merge changes from branch 1.1.720.1
17 dchatter 02/08/95 - olog call; drop onblon
18 dchatter 10/31/94 - new functions for non-blocking oci
19 rkooi2 11/27/92 - Changing datatypes (in comments) and return types
20 rkooi2 10/26/92 - More portability mods
21 rkooi2 10/18/92 - Changed to agree with oci.c
22 sjain 03/16/92 - Creation
23*/
24
25/*
26 * Declare the OCI functions.
27 * Prototype information is commented out.
28 * Use this header for non-ANSI C compilers.
29 * Note that you will need to include ocidfn.h in the .c files
30 * to get the definition for cda_def.
31 */
32
33#ifndef OCIKPR
34#define OCIKPR
35
36#include <oratypes.h>
37
38/*
39 * Oci BIND (Piecewise or with Skips)
40 */
41sword obindps( struct cda_def *cursor, ub1 opcode, OraText *sqlvar,
42 sb4 sqlvl, ub1 *pvctx, sb4 progvl,
43 sword ftype, sword scale,
44 sb2 *indp, ub2 *alen, ub2 *arcode,
45 sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip,
46 ub4 maxsiz, ub4 *cursiz,
47 OraText *fmt, sb4 fmtl, sword fmtt );
48sword obreak( struct cda_def *lda );
49sword ocan ( struct cda_def *cursor );
50sword oclose( struct cda_def *cursor );
51sword ocof ( struct cda_def *lda );
52sword ocom ( struct cda_def *lda );
53sword ocon ( struct cda_def *lda );
54
55
56/*
57 * Oci DEFINe (Piecewise or with Skips)
58 */
59sword odefinps( struct cda_def *cursor, ub1 opcode, sword pos,ub1 *bufctx,
60 sb4 bufl, sword ftype, sword scale,
61 sb2 *indp, OraText *fmt, sb4 fmtl, sword fmtt,
62 ub2 *rlen, ub2 *rcode,
63 sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip );
64sword odescr( struct cda_def *cursor, sword pos, sb4 *dbsize,
65 sb2 *dbtype, sb1 *cbuf, sb4 *cbufl, sb4 *dsize,
66 sb2 *prec, sb2 *scale, sb2 *nullok );
67sword odessp( struct cda_def *cursor, OraText *objnam, size_t onlen,
68 ub1 *rsv1, size_t rsv1ln, ub1 *rsv2, size_t rsv2ln,
69 ub2 *ovrld, ub2 *pos, ub2 *level, OraText **argnam,
70 ub2 *arnlen, ub2 *dtype, ub1 *defsup, ub1* mode,
71 ub4 *dtsiz, sb2 *prec, sb2 *scale, ub1 *radix,
72 ub4 *spare, ub4 *arrsiz );
73sword oerhms( struct cda_def *lda, sb2 rcode, OraText *buf,
74 sword bufsiz );
75sword oermsg( sb2 rcode, OraText *buf );
76sword oexec ( struct cda_def *cursor );
77sword oexfet( struct cda_def *cursor, ub4 nrows,
78 sword cancel, sword exact );
79sword oexn ( struct cda_def *cursor, sword iters, sword rowoff );
80sword ofen ( struct cda_def *cursor, sword nrows );
81sword ofetch( struct cda_def *cursor );
82sword oflng ( struct cda_def *cursor, sword pos, ub1 *buf,
83 sb4 bufl, sword dtype, ub4 *retl, sb4 offset );
84sword ogetpi( struct cda_def *cursor, ub1 *piecep, void **ctxpp,
85 ub4 *iterp, ub4 *indexp );
86sword opinit( ub4 mode );
87sword olog ( struct cda_def *lda, ub1 *hst,
88 OraText *uid, sword uidl,
89 OraText *psw, sword pswl,
90 OraText *conn, sword connl,
91 ub4 mode );
92sword ologof( struct cda_def *lda );
93sword oopen ( struct cda_def *cursor, struct cda_def *lda,
94 OraText *dbn, sword dbnl, sword arsize,
95 OraText *uid, sword uidl );
96sword oopt ( struct cda_def *cursor, sword rbopt, sword waitopt );
97sword oparse( struct cda_def *cursor, OraText *sqlstm, sb4 sqllen,
98 sword defflg, ub4 lngflg );
99sword orol ( struct cda_def *lda );
100sword osetpi( struct cda_def *cursor, ub1 piece, void *bufp,
101 ub4 *lenp );
102void sqlld2 ( struct cda_def *lda, OraText *cname, sb4 *cnlen );
103void sqllda ( struct cda_def *lda );
104
105/* non-blocking functions */
106sword onbset( struct cda_def *lda );
107sword onbtst( struct cda_def *lda );
108sword onbclr( struct cda_def *lda );
109sword ognfd ( struct cda_def *lda, void *fdp );
110
111
112
113/*
114 * OBSOLETE FUNCTIONS
115 */
116
117/*
118 * OBSOLETE BIND CALLS-- use obindps()
119 */
120sword obndra( struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
121 ub1 *progv, sword progvl, sword ftype, sword scale,
122 sb2 *indp, ub2 *alen, ub2 *arcode, ub4 maxsiz,
123 ub4 *cursiz, OraText *fmt, sword fmtl, sword fmtt );
124sword obndrn( struct cda_def *cursor, sword sqlvn, ub1 *progv,
125 sword progvl, sword ftype, sword scale, sb2 *indp,
126 OraText *fmt, sword fmtl, sword fmtt );
127sword obndrv( struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
128 ub1 *progv, sword progvl, sword ftype, sword scale,
129 sb2 *indp, OraText *fmt, sword fmtl, sword fmtt );
130
131/*
132 * OBSOLETE DEFINE CALLS-- use odefinps()
133 */
134sword odefin( struct cda_def *cursor, sword pos, ub1 *buf,
135 sword bufl, sword ftype, sword scale, sb2 *indp,
136 OraText *fmt, sword fmtl, sword fmtt, ub2 *rlen,
137 ub2 *rcode );
138
139
140/* older calls ; preferred equivalent calls above */
141sword odsc ( struct cda_def *cursor, sword pos, sb2 *dbsize,
142 sb2 *fsize, sb2 *rcode, sb2 *dtype, sb1 *buf,
143 sb2 *bufl, sb2 *dsize );
144sword oname ( struct cda_def *cursor, sword pos, sb1 *tbuf,
145 sb2 *tbufl, sb1 *buf, sb2 *bufl );
146sword olon ( struct cda_def *lda, OraText *uid, sword uidl,
147 OraText *pswd, sword pswdl, sword audit );
148sword orlon ( struct cda_def *lda, ub1 *hda, OraText *uid,
149 sword uidl, OraText *pswd, sword pswdl, sword audit );
150sword osql3 ( struct cda_def *cda, OraText *sqlstm, sword sqllen );
151
152
153
154
155
156
157
158#endif /* OCIKPR */
159
160
161
162
163
164
165