Tang Cheng | 37650ea | 2014-10-20 16:14:41 +0800 | [diff] [blame^] | 1 | /* Copyright (c) 1991, 2005, Oracle. All rights reserved. */ |
| 2 | /* |
| 3 | NAME |
| 4 | ociapr.h |
| 5 | MODIFIED (MM/DD/YY) |
| 6 | mbastawa 09/16/05 - dbhygiene |
| 7 | dmukhin 06/29/05 - ANSI prototypes; miscellaneous cleanup |
| 8 | dsaha 05/19/00 - Fix lint |
| 9 | sgollapu 05/19/98 - Change text to OraText |
| 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 to agree with ocidef.h |
| 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 | * Declare the OCI functions. |
| 26 | * Prototype information is included. |
| 27 | * Use this header for ANSI C compilers. |
| 28 | */ |
| 29 | |
| 30 | #ifndef OCIAPR |
| 31 | #define OCIAPR |
| 32 | |
| 33 | #ifndef ORATYPES |
| 34 | #include <oratypes.h> |
| 35 | #endif |
| 36 | |
| 37 | #ifndef OCIDFN |
| 38 | #include <ocidfn.h> |
| 39 | #endif |
| 40 | |
| 41 | /* |
| 42 | * Oci BIND (Piecewise or with Skips) |
| 43 | */ |
| 44 | sword obindps(struct cda_def *cursor, ub1 opcode, OraText *sqlvar, |
| 45 | sb4 sqlvl, ub1 *pvctx, sb4 progvl, |
| 46 | sword ftype, sword scale, |
| 47 | sb2 *indp, ub2 *alen, ub2 *arcode, |
| 48 | sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip, |
| 49 | ub4 maxsiz, ub4 *cursiz, |
| 50 | OraText *fmt, sb4 fmtl, sword fmtt); |
| 51 | sword obreak(struct cda_def *lda); |
| 52 | sword ocan (struct cda_def *cursor); |
| 53 | sword oclose(struct cda_def *cursor); |
| 54 | sword ocof (struct cda_def *lda); |
| 55 | sword ocom (struct cda_def *lda); |
| 56 | sword ocon (struct cda_def *lda); |
| 57 | |
| 58 | |
| 59 | /* |
| 60 | * Oci DEFINe (Piecewise or with Skips) |
| 61 | */ |
| 62 | sword odefinps(struct cda_def *cursor, ub1 opcode, sword pos,ub1 *bufctx, |
| 63 | sb4 bufl, sword ftype, sword scale, |
| 64 | sb2 *indp, OraText *fmt, sb4 fmtl, sword fmtt, |
| 65 | ub2 *rlen, ub2 *rcode, |
| 66 | sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip); |
| 67 | sword 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); |
| 73 | sword odescr(struct cda_def *cursor, sword pos, sb4 *dbsize, |
| 74 | sb2 *dbtype, sb1 *cbuf, sb4 *cbufl, sb4 *dsize, |
| 75 | sb2 *prec, sb2 *scale, sb2 *nullok); |
| 76 | sword oerhms (struct cda_def *lda, sb2 rcode, OraText *buf, |
| 77 | sword bufsiz); |
| 78 | sword oermsg (sb2 rcode, OraText *buf); |
| 79 | sword oexec (struct cda_def *cursor); |
| 80 | sword oexfet (struct cda_def *cursor, ub4 nrows, |
| 81 | sword cancel, sword exact); |
| 82 | sword oexn (struct cda_def *cursor, sword iters, sword rowoff); |
| 83 | sword ofen (struct cda_def *cursor, sword nrows); |
| 84 | sword ofetch (struct cda_def *cursor); |
| 85 | sword oflng (struct cda_def *cursor, sword pos, ub1 *buf, |
| 86 | sb4 bufl, sword dtype, ub4 *retl, sb4 offset); |
| 87 | sword ogetpi (struct cda_def *cursor, ub1 *piecep, void **ctxpp, |
| 88 | ub4 *iterp, ub4 *indexp); |
| 89 | sword oopt (struct cda_def *cursor, sword rbopt, sword waitopt); |
| 90 | sword opinit (ub4 mode); |
| 91 | sword olog (struct cda_def *lda, ub1* hda, |
| 92 | OraText *uid, sword uidl, |
| 93 | OraText *pswd, sword pswdl, |
| 94 | OraText *conn, sword connl, |
| 95 | ub4 mode); |
| 96 | sword ologof (struct cda_def *lda); |
| 97 | sword oopen (struct cda_def *cursor, struct cda_def *lda, |
| 98 | OraText *dbn, sword dbnl, sword arsize, |
| 99 | OraText *uid, sword uidl); |
| 100 | sword oparse (struct cda_def *cursor, OraText *sqlstm, sb4 sqllen, |
| 101 | sword defflg, ub4 lngflg); |
| 102 | sword orol (struct cda_def *lda); |
| 103 | sword osetpi (struct cda_def *cursor, ub1 piece, void *bufp, ub4 *lenp); |
| 104 | |
| 105 | void sqlld2 (struct cda_def *lda, OraText *cname, sb4 *cnlen); |
| 106 | void sqllda (struct cda_def *lda); |
| 107 | |
| 108 | /* non-blocking functions */ |
| 109 | sword onbset (struct cda_def *lda ); |
| 110 | sword onbtst (struct cda_def *lda ); |
| 111 | sword onbclr (struct cda_def *lda ); |
| 112 | sword ognfd (struct cda_def *lda, void *fdp); |
| 113 | |
| 114 | |
| 115 | /* |
| 116 | * OBSOLETE CALLS |
| 117 | */ |
| 118 | |
| 119 | /* |
| 120 | * OBSOLETE BIND CALLS |
| 121 | */ |
| 122 | sword obndra(struct cda_def *cursor, OraText *sqlvar, sword sqlvl, |
| 123 | ub1 *progv, sword progvl, sword ftype, sword scale, |
| 124 | sb2 *indp, ub2 *alen, ub2 *arcode, ub4 maxsiz, |
| 125 | ub4 *cursiz, OraText *fmt, sword fmtl, sword fmtt); |
| 126 | sword obndrn(struct cda_def *cursor, sword sqlvn, ub1 *progv, |
| 127 | sword progvl, sword ftype, sword scale, sb2 *indp, |
| 128 | OraText *fmt, sword fmtl, sword fmtt); |
| 129 | sword obndrv(struct cda_def *cursor, OraText *sqlvar, sword sqlvl, |
| 130 | ub1 *progv, sword progvl, sword ftype, sword scale, |
| 131 | sb2 *indp, OraText *fmt, sword fmtl, sword fmtt); |
| 132 | |
| 133 | /* |
| 134 | * OBSOLETE DEFINE CALLS |
| 135 | */ |
| 136 | sword odefin(struct cda_def *cursor, sword pos, ub1 *buf, |
| 137 | sword bufl, sword ftype, sword scale, sb2 *indp, |
| 138 | OraText *fmt, sword fmtl, sword fmtt, ub2 *rlen, ub2 *rcode); |
| 139 | |
| 140 | /* older calls ; preferred equivalent calls above */ |
| 141 | |
| 142 | sword oname (struct cda_def *cursor, sword pos, sb1 *tbuf, |
| 143 | sb2 *tbufl, sb1 *buf, sb2 *bufl); |
| 144 | sword orlon (struct cda_def *lda, ub1 *hda, |
| 145 | OraText *uid, sword uidl, |
| 146 | OraText *pswd, sword pswdl, |
| 147 | sword audit); |
| 148 | sword olon (struct cda_def *lda, OraText *uid, sword uidl, |
| 149 | OraText *pswd, sword pswdl, sword audit); |
| 150 | sword osql3 (struct cda_def *cda, OraText *sqlstm, sword sqllen); |
| 151 | sword odsc (struct cda_def *cursor, sword pos, sb2 *dbsize, |
| 152 | sb2 *fsize, sb2 *rcode, sb2 *dtype, sb1 *buf, |
| 153 | sb2 *bufl, sb2 *dsize); |
| 154 | |
| 155 | #endif /* OCIAPR */ |