~ubuntu-branches/ubuntu/karmic/firebird2.1/karmic

« back to all changes in this revision

Viewing changes to src/jrd/ibase.h

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2008-05-26 23:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20080526235925-2pnqj6nxpppoeaer
Tags: upstream-2.1.0.17798-0.ds2
ImportĀ upstreamĀ versionĀ 2.1.0.17798-0.ds2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *      MODULE:         ibase.h
 
3
 *      DESCRIPTION:    OSRI entrypoints and defines
 
4
 *
 
5
 * The contents of this file are subject to the Interbase Public
 
6
 * License Version 1.0 (the "License"); you may not use this file
 
7
 * except in compliance with the License. You may obtain a copy
 
8
 * of the License at http://www.Inprise.com/IPL.html
 
9
 *
 
10
 * Software distributed under the License is distributed on an
 
11
 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
 
12
 * or implied. See the License for the specific language governing
 
13
 * rights and limitations under the License.
 
14
 *
 
15
 * The Original Code was created by Inprise Corporation
 
16
 * and its predecessors. Portions created by Inprise Corporation are
 
17
 * Copyright (C) Inprise Corporation.
 
18
 *
 
19
 * All Rights Reserved.
 
20
 * Contributor(s): ______________________________________.
 
21
 *
 
22
 * 2001.07.28: John Bellardo:  Added blr_skip
 
23
 * 2001.09.18: Ann Harrison:   New info codes
 
24
 * 17-Oct-2001 Mike Nordell: CPU affinity
 
25
 * 2001-04-16 Paul Beach: ISC_TIME_SECONDS_PRECISION_SCALE modified for HP10
 
26
 * Compiler Compatibility
 
27
 * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
 
28
 *                          - EPSON, XENIX, MAC (MAC_AUX), Cray and OS/2
 
29
 * 2002.10.29 Nickolay Samofatov: Added support for savepoints
 
30
 *
 
31
 * 2002.10.29 Sean Leyne - Removed support for obsolete IPX/SPX Protocol
 
32
 *
 
33
 * 2006.09.06 Steve Boyd - Added various prototypes required by Cobol ESQL
 
34
 *                         isc_embed_dsql_length
 
35
 *                         isc_event_block_a
 
36
 *                         isc_sqlcode_s
 
37
 *                         isc_embed_dsql_fetch_a
 
38
 *                         isc_event_block_s
 
39
 *                         isc_baddress
 
40
 *                         isc_baddress_s
 
41
 *
 
42
 */
 
43
 
 
44
#ifndef JRD_IBASE_H
 
45
#define JRD_IBASE_H
 
46
 
 
47
#define FB_API_VER 20
 
48
#define isc_version4
 
49
 
 
50
#define  ISC_TRUE       1
 
51
#define  ISC_FALSE      0
 
52
#if !(defined __cplusplus)
 
53
#define  ISC__TRUE      ISC_TRUE
 
54
#define  ISC__FALSE     ISC_FALSE
 
55
#endif
 
56
 
 
57
#define ISC_FAR
 
58
 
 
59
#if defined _MSC_VER && _MSC_VER >= 1300
 
60
#define FB_API_DEPRECATED __declspec(deprecated)
 
61
#elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
 
62
#define FB_API_DEPRECATED __attribute__((__deprecated__))
 
63
#else
 
64
#define FB_API_DEPRECATED
 
65
#endif
 
66
 
 
67
#include "types_pub.h"
 
68
 
 
69
/********************************/
 
70
/* Firebird Handle Definitions */
 
71
/********************************/
 
72
 
 
73
typedef FB_API_HANDLE isc_att_handle;
 
74
typedef FB_API_HANDLE isc_blob_handle;
 
75
typedef FB_API_HANDLE isc_db_handle;
 
76
typedef FB_API_HANDLE isc_req_handle;
 
77
typedef FB_API_HANDLE isc_stmt_handle;
 
78
typedef FB_API_HANDLE isc_svc_handle;
 
79
typedef FB_API_HANDLE isc_tr_handle;
 
80
typedef void (* isc_callback) ();
 
81
typedef ISC_LONG isc_resv_handle;
 
82
 
 
83
typedef void (*ISC_PRINT_CALLBACK) (void*, ISC_SHORT, const char*);
 
84
typedef void (*ISC_VERSION_CALLBACK)(void*, const char*);
 
85
typedef void (*ISC_EVENT_CALLBACK)(void*, ISC_USHORT, const ISC_UCHAR*);
 
86
 
 
87
/*******************************************************************/
 
88
/* Blob id structure                                               */
 
89
/*******************************************************************/
 
90
 
 
91
#if !(defined __cplusplus)
 
92
typedef GDS_QUAD GDS__QUAD;
 
93
#endif /* !(defined __cplusplus) */
 
94
 
 
95
typedef struct
 
96
{
 
97
        short array_bound_lower;
 
98
        short array_bound_upper;
 
99
} ISC_ARRAY_BOUND;
 
100
 
 
101
typedef struct
 
102
{
 
103
        ISC_UCHAR       array_desc_dtype;
 
104
        ISC_SCHAR                       array_desc_scale;
 
105
        unsigned short  array_desc_length;
 
106
        ISC_SCHAR                       array_desc_field_name[32];
 
107
        ISC_SCHAR                       array_desc_relation_name[32];
 
108
        short                   array_desc_dimensions;
 
109
        short                   array_desc_flags;
 
110
        ISC_ARRAY_BOUND array_desc_bounds[16];
 
111
} ISC_ARRAY_DESC;
 
112
 
 
113
typedef struct
 
114
{
 
115
        short                   blob_desc_subtype;
 
116
        short                   blob_desc_charset;
 
117
        short                   blob_desc_segment_size;
 
118
        ISC_UCHAR       blob_desc_field_name[32];
 
119
        ISC_UCHAR       blob_desc_relation_name[32];
 
120
} ISC_BLOB_DESC;
 
121
 
 
122
/***************************/
 
123
/* Blob control structure  */
 
124
/***************************/
 
125
 
 
126
typedef struct isc_blob_ctl
 
127
{
 
128
        ISC_STATUS      (* ctl_source)();       /* Source filter */
 
129
        struct isc_blob_ctl*    ctl_source_handle;      /* Argument to pass to source filter */
 
130
        short                                   ctl_to_sub_type;                /* Target type */
 
131
        short                                   ctl_from_sub_type;              /* Source type */
 
132
        unsigned short                  ctl_buffer_length;              /* Length of buffer */
 
133
        unsigned short                  ctl_segment_length;             /* Length of current segment */
 
134
        unsigned short                  ctl_bpb_length;                 /* Length of blob parameter  block */
 
135
        /* Internally, this is const UCHAR*, but this public struct probably can't change. */
 
136
        ISC_SCHAR*                                      ctl_bpb;                                /* Address of blob parameter block */
 
137
        ISC_UCHAR*                      ctl_buffer;                             /* Address of segment buffer */
 
138
        ISC_LONG                                ctl_max_segment;                /* Length of longest segment */
 
139
        ISC_LONG                                ctl_number_segments;    /* Total number of segments */
 
140
        ISC_LONG                                ctl_total_length;               /* Total length of blob */
 
141
        ISC_STATUS*                             ctl_status;                             /* Address of status vector */
 
142
        long                                    ctl_data[8];                    /* Application specific data */
 
143
} * ISC_BLOB_CTL;
 
144
 
 
145
/***************************/
 
146
/* Blob stream definitions */
 
147
/***************************/
 
148
 
 
149
typedef struct bstream
 
150
{
 
151
        isc_blob_handle bstr_blob;              /* Blob handle */
 
152
        ISC_SCHAR *                     bstr_buffer;    /* Address of buffer */
 
153
        ISC_SCHAR *                     bstr_ptr;               /* Next character */
 
154
        short                   bstr_length;    /* Length of buffer */
 
155
        short                   bstr_cnt;               /* Characters in buffer */
 
156
        char                    bstr_mode;              /* (mode) ? OUTPUT : INPUT */
 
157
} BSTREAM;
 
158
 
 
159
/* Three ugly macros, one even using octal radix... sigh... */
 
160
#define getb(p) (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p))
 
161
#define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))
 
162
#define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))
 
163
 
 
164
/********************************************************************/
 
165
/* CVC: Public blob interface definition held in val.h.             */
 
166
/* For some unknown reason, it was only documented in langRef       */
 
167
/* and being the structure passed by the engine to UDFs it never    */
 
168
/* made its way into this public definitions file.                  */
 
169
/* Being its original name "blob", I renamed it blobcallback here.  */
 
170
/* I did the full definition with the proper parameters instead of  */
 
171
/* the weak C declaration with any number and type of parameters.   */
 
172
/* Since the first parameter -BLB- is unknown outside the engine,   */
 
173
/* it's more accurate to use void* than int* as the blob pointer    */
 
174
/********************************************************************/
 
175
 
 
176
#if !defined(JRD_VAL_H) && !defined(REQUESTER)
 
177
/* Blob passing structure */
 
178
 
 
179
/* This enum applies to parameter "mode" in blob_lseek */
 
180
enum blob_lseek_mode {blb_seek_relative = 1, blb_seek_from_tail = 2};
 
181
/* This enum applies to the value returned by blob_get_segment */
 
182
enum blob_get_result {blb_got_fragment = -1, blb_got_eof = 0, blb_got_full_segment = 1};
 
183
 
 
184
typedef struct blobcallback {
 
185
    short (*blob_get_segment)
 
186
                (void* hnd, ISC_UCHAR* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len);
 
187
    void*               blob_handle;
 
188
    ISC_LONG    blob_number_segments;
 
189
    ISC_LONG    blob_max_segment;
 
190
    ISC_LONG    blob_total_length;
 
191
    void (*blob_put_segment)
 
192
                (void* hnd, const ISC_UCHAR* buffer, ISC_USHORT buf_size);
 
193
    ISC_LONG (*blob_lseek)
 
194
                (void* hnd, ISC_USHORT mode, ISC_LONG offset);
 
195
}  *BLOBCALLBACK;
 
196
#endif /* !defined(JRD_VAL_H) && !defined(REQUESTER) */
 
197
 
 
198
 
 
199
/********************************************************************/
 
200
/* CVC: Public descriptor interface held in dsc2.h.                  */
 
201
/* We need it documented to be able to recognize NULL in UDFs.      */
 
202
/* Being its original name "dsc", I renamed it paramdsc here.       */
 
203
/* Notice that I adjust to the original definition: contrary to     */
 
204
/* other cases, the typedef is the same struct not the pointer.     */
 
205
/* I included the enumeration of dsc_dtype possible values.         */
 
206
/* Ultimately, dsc2.h should be part of the public interface.        */
 
207
/********************************************************************/
 
208
 
 
209
#if !defined(JRD_DSC_H)
 
210
/* This is the famous internal descriptor that UDFs can use, too. */
 
211
typedef struct paramdsc {
 
212
    ISC_UCHAR   dsc_dtype;
 
213
    signed char         dsc_scale;
 
214
    ISC_USHORT          dsc_length;
 
215
    short               dsc_sub_type;
 
216
    ISC_USHORT          dsc_flags;
 
217
    ISC_UCHAR   *dsc_address;
 
218
} PARAMDSC;
 
219
 
 
220
#if !defined(JRD_VAL_H)
 
221
/* This is a helper struct to work with varchars. */
 
222
typedef struct paramvary {
 
223
    ISC_USHORT          vary_length;
 
224
    ISC_UCHAR           vary_string[1];
 
225
} PARAMVARY;
 
226
#endif /* !defined(JRD_VAL_H) */
 
227
 
 
228
#include "../jrd/dsc_pub.h"
 
229
 
 
230
#endif /* !defined(JRD_DSC_H) */
 
231
 
 
232
/***************************/
 
233
/* Dynamic SQL definitions */
 
234
/***************************/
 
235
 
 
236
#include "../dsql/sqlda_pub.h"
 
237
 
 
238
/***************************/
 
239
/* OSRI database functions */
 
240
/***************************/
 
241
 
 
242
#ifdef __cplusplus
 
243
extern "C" {
 
244
#endif
 
245
 
 
246
ISC_STATUS ISC_EXPORT isc_attach_database(ISC_STATUS*,
 
247
                                                                                  short,
 
248
                                                                                  const ISC_SCHAR*,
 
249
                                                                                  isc_db_handle*,
 
250
                                                                                  short,
 
251
                                                                                  const ISC_SCHAR*);
 
252
 
 
253
ISC_STATUS ISC_EXPORT isc_array_gen_sdl(ISC_STATUS*,
 
254
                                                                                const ISC_ARRAY_DESC*,
 
255
                                                                                ISC_SHORT*,
 
256
                                                                                ISC_UCHAR*,
 
257
                                                                                ISC_SHORT*);
 
258
 
 
259
ISC_STATUS ISC_EXPORT isc_array_get_slice(ISC_STATUS*,
 
260
                                                                                  isc_db_handle*,
 
261
                                                                                  isc_tr_handle*,
 
262
                                                                                  ISC_QUAD*,
 
263
                                                                                  const ISC_ARRAY_DESC*,
 
264
                                                                                  void*,
 
265
                                                                                  ISC_LONG*);
 
266
 
 
267
ISC_STATUS ISC_EXPORT isc_array_lookup_bounds(ISC_STATUS*,
 
268
                                                                                          isc_db_handle*,
 
269
                                                                                          isc_tr_handle*,
 
270
                                                                                          const ISC_SCHAR*,
 
271
                                                                                          const ISC_SCHAR*,
 
272
                                                                                          ISC_ARRAY_DESC*);
 
273
 
 
274
ISC_STATUS ISC_EXPORT isc_array_lookup_desc(ISC_STATUS*,
 
275
                                                                                        isc_db_handle*,
 
276
                                                                                        isc_tr_handle*,
 
277
                                                                                        const ISC_SCHAR*,
 
278
                                                                                        const ISC_SCHAR*,
 
279
                                                                                        ISC_ARRAY_DESC*);
 
280
 
 
281
ISC_STATUS ISC_EXPORT isc_array_set_desc(ISC_STATUS*,
 
282
                                                                                 const ISC_SCHAR*,
 
283
                                                                                 const ISC_SCHAR*,
 
284
                                                                                 const short*,
 
285
                                                                                 const short*,
 
286
                                                                                 const short*,
 
287
                                                                                 ISC_ARRAY_DESC*);
 
288
 
 
289
ISC_STATUS ISC_EXPORT isc_array_put_slice(ISC_STATUS*,
 
290
                                                                                  isc_db_handle*,
 
291
                                                                                  isc_tr_handle*,
 
292
                                                                                  ISC_QUAD*,
 
293
                                                                                  const ISC_ARRAY_DESC*,
 
294
                                                                                  void*,
 
295
                                                                                  ISC_LONG *);
 
296
 
 
297
void ISC_EXPORT isc_blob_default_desc(ISC_BLOB_DESC*,
 
298
                                                                          const ISC_UCHAR*,
 
299
                                                                          const ISC_UCHAR*);
 
300
 
 
301
ISC_STATUS ISC_EXPORT isc_blob_gen_bpb(ISC_STATUS*,
 
302
                                                                           const ISC_BLOB_DESC*,
 
303
                                                                           const ISC_BLOB_DESC*,
 
304
                                                                           unsigned short,
 
305
                                                                           ISC_UCHAR*,
 
306
                                                                           unsigned short*);
 
307
 
 
308
ISC_STATUS ISC_EXPORT isc_blob_info(ISC_STATUS*,
 
309
                                                                        isc_blob_handle*,
 
310
                                                                        short,
 
311
                                                                        const ISC_SCHAR*,
 
312
                                                                        short,
 
313
                                                                        ISC_SCHAR*);
 
314
 
 
315
ISC_STATUS ISC_EXPORT isc_blob_lookup_desc(ISC_STATUS*,
 
316
                                                                                   isc_db_handle*,
 
317
                                                                                   isc_tr_handle*,
 
318
                                                                                   const ISC_UCHAR*,
 
319
                                                                                   const ISC_UCHAR*,
 
320
                                                                                   ISC_BLOB_DESC*,
 
321
                                                                                   ISC_UCHAR*);
 
322
 
 
323
ISC_STATUS ISC_EXPORT isc_blob_set_desc(ISC_STATUS*,
 
324
                                                                                const ISC_UCHAR*,
 
325
                                                                                const ISC_UCHAR*,
 
326
                                                                                short,
 
327
                                                                                short,
 
328
                                                                                short,
 
329
                                                                                ISC_BLOB_DESC*);
 
330
 
 
331
ISC_STATUS ISC_EXPORT isc_cancel_blob(ISC_STATUS *,
 
332
                                                                          isc_blob_handle *);
 
333
 
 
334
ISC_STATUS ISC_EXPORT isc_cancel_events(ISC_STATUS *,
 
335
                                                                                isc_db_handle *,
 
336
                                                                                ISC_LONG *);
 
337
 
 
338
ISC_STATUS ISC_EXPORT isc_close_blob(ISC_STATUS *,
 
339
                                                                         isc_blob_handle *);
 
340
 
 
341
ISC_STATUS ISC_EXPORT isc_commit_retaining(ISC_STATUS *,
 
342
                                                                                   isc_tr_handle *);
 
343
 
 
344
ISC_STATUS ISC_EXPORT isc_commit_transaction(ISC_STATUS *,
 
345
                                                                                         isc_tr_handle *);
 
346
 
 
347
ISC_STATUS ISC_EXPORT isc_create_blob(ISC_STATUS*,
 
348
                                                                          isc_db_handle*,
 
349
                                                                          isc_tr_handle*,
 
350
                                                                          isc_blob_handle*,
 
351
                                                                          ISC_QUAD*);
 
352
 
 
353
ISC_STATUS ISC_EXPORT isc_create_blob2(ISC_STATUS*,
 
354
                                                                           isc_db_handle*,
 
355
                                                                           isc_tr_handle*,
 
356
                                                                           isc_blob_handle*,
 
357
                                                                           ISC_QUAD*,
 
358
                                                                           short,
 
359
                                                                           const ISC_SCHAR*);
 
360
 
 
361
ISC_STATUS ISC_EXPORT isc_create_database(ISC_STATUS*,
 
362
                                                                                  short,
 
363
                                                                                  const ISC_SCHAR*,
 
364
                                                                                  isc_db_handle*,
 
365
                                                                                  short,
 
366
                                                                                  const ISC_SCHAR*,
 
367
                                                                                  short);
 
368
 
 
369
ISC_STATUS ISC_EXPORT isc_database_info(ISC_STATUS*,
 
370
                                                                                isc_db_handle*,
 
371
                                                                                short,
 
372
                                                                                const ISC_SCHAR*,
 
373
                                                                                short,
 
374
                                                                                ISC_SCHAR*);
 
375
 
 
376
void ISC_EXPORT isc_decode_date(const ISC_QUAD*,
 
377
                                                                void*);
 
378
 
 
379
void ISC_EXPORT isc_decode_sql_date(const ISC_DATE*,
 
380
                                                                        void*);
 
381
 
 
382
void ISC_EXPORT isc_decode_sql_time(const ISC_TIME*,
 
383
                                                                        void*);
 
384
 
 
385
void ISC_EXPORT isc_decode_timestamp(const ISC_TIMESTAMP*,
 
386
                                                                         void*);
 
387
 
 
388
ISC_STATUS ISC_EXPORT isc_detach_database(ISC_STATUS *,
 
389
                                                                                  isc_db_handle *);
 
390
 
 
391
ISC_STATUS ISC_EXPORT isc_drop_database(ISC_STATUS *,
 
392
                                                                                isc_db_handle *);
 
393
 
 
394
ISC_STATUS ISC_EXPORT isc_dsql_allocate_statement(ISC_STATUS *,
 
395
                                                                                                  isc_db_handle *,
 
396
                                                                                                  isc_stmt_handle *);
 
397
 
 
398
ISC_STATUS ISC_EXPORT isc_dsql_alloc_statement2(ISC_STATUS *,
 
399
                                                                                                isc_db_handle *,
 
400
                                                                                                isc_stmt_handle *);
 
401
 
 
402
ISC_STATUS ISC_EXPORT isc_dsql_describe(ISC_STATUS *,
 
403
                                                                                isc_stmt_handle *,
 
404
                                                                                unsigned short,
 
405
                                                                                XSQLDA *);
 
406
 
 
407
ISC_STATUS ISC_EXPORT isc_dsql_describe_bind(ISC_STATUS *,
 
408
                                                                                         isc_stmt_handle *,
 
409
                                                                                         unsigned short,
 
410
                                                                                         XSQLDA *);
 
411
 
 
412
ISC_STATUS ISC_EXPORT isc_dsql_exec_immed2(ISC_STATUS*,
 
413
                                                                                   isc_db_handle*,
 
414
                                                                                   isc_tr_handle*,
 
415
                                                                                   unsigned short,
 
416
                                                                                   const ISC_SCHAR*,
 
417
                                                                                   unsigned short,
 
418
                                                                                   XSQLDA*,
 
419
                                                                                   XSQLDA*);
 
420
 
 
421
ISC_STATUS ISC_EXPORT isc_dsql_execute(ISC_STATUS*,
 
422
                                                                           isc_tr_handle*,
 
423
                                                                           isc_stmt_handle*,
 
424
                                                                           unsigned short,
 
425
                                                                           XSQLDA*);
 
426
 
 
427
ISC_STATUS ISC_EXPORT isc_dsql_execute2(ISC_STATUS*,
 
428
                                                                                isc_tr_handle*,
 
429
                                                                                isc_stmt_handle*,
 
430
                                                                                unsigned short,
 
431
                                                                                XSQLDA*,
 
432
                                                                                XSQLDA*);
 
433
 
 
434
ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate(ISC_STATUS*,
 
435
                                                                                                 isc_db_handle*,
 
436
                                                                                                 isc_tr_handle*,
 
437
                                                                                                 unsigned short,
 
438
                                                                                                 const ISC_SCHAR*,
 
439
                                                                                                 unsigned short,
 
440
                                                                                                 XSQLDA*);
 
441
 
 
442
ISC_STATUS ISC_EXPORT isc_dsql_fetch(ISC_STATUS *,
 
443
                                                                         isc_stmt_handle *,
 
444
                                                                         unsigned short,
 
445
                                                                         XSQLDA *);
 
446
 
 
447
ISC_STATUS ISC_EXPORT isc_dsql_finish(isc_db_handle *);
 
448
 
 
449
ISC_STATUS ISC_EXPORT isc_dsql_free_statement(ISC_STATUS *,
 
450
                                                                                          isc_stmt_handle *,
 
451
                                                                                          unsigned short);
 
452
 
 
453
ISC_STATUS ISC_EXPORT isc_dsql_insert(ISC_STATUS*,
 
454
                                                                          isc_stmt_handle*,
 
455
                                                                          unsigned short,
 
456
                                                                          XSQLDA*);
 
457
 
 
458
ISC_STATUS ISC_EXPORT isc_dsql_prepare(ISC_STATUS*,
 
459
                                                                           isc_tr_handle*,
 
460
                                                                           isc_stmt_handle*,
 
461
                                                                           unsigned short,
 
462
                                                                           const ISC_SCHAR*,
 
463
                                                                           unsigned short,
 
464
                                                                           XSQLDA*);
 
465
 
 
466
ISC_STATUS ISC_EXPORT isc_dsql_set_cursor_name(ISC_STATUS*,
 
467
                                                                                           isc_stmt_handle*,
 
468
                                                                                           const ISC_SCHAR*,
 
469
                                                                                           unsigned short);
 
470
 
 
471
ISC_STATUS ISC_EXPORT isc_dsql_sql_info(ISC_STATUS*,
 
472
                                                                                isc_stmt_handle*,
 
473
                                                                                short,
 
474
                                                                                const ISC_SCHAR*,
 
475
                                                                                short,
 
476
                                                                                ISC_SCHAR*);
 
477
 
 
478
void ISC_EXPORT isc_encode_date(const void*,
 
479
                                                                ISC_QUAD*);
 
480
 
 
481
void ISC_EXPORT isc_encode_sql_date(const void*,
 
482
                                                                        ISC_DATE*);
 
483
 
 
484
void ISC_EXPORT isc_encode_sql_time(const void*,
 
485
                                                                        ISC_TIME*);
 
486
 
 
487
void ISC_EXPORT isc_encode_timestamp(const void*,
 
488
                                                                         ISC_TIMESTAMP*);
 
489
 
 
490
ISC_LONG ISC_EXPORT_VARARG isc_event_block(ISC_UCHAR**,
 
491
                                                                                   ISC_UCHAR**,
 
492
                                                                                   ISC_USHORT, ...);
 
493
 
 
494
ISC_USHORT ISC_EXPORT isc_event_block_a(ISC_SCHAR**,
 
495
                                                                                ISC_SCHAR**,
 
496
                                                                                ISC_USHORT, 
 
497
                                                                                ISC_SCHAR**);
 
498
 
 
499
void ISC_EXPORT isc_event_block_s(ISC_SCHAR**,
 
500
                                                                  ISC_SCHAR**,
 
501
                                                                  ISC_USHORT,
 
502
                                                                  ISC_SCHAR**,
 
503
                                                                  ISC_USHORT*);
 
504
 
 
505
void ISC_EXPORT isc_event_counts(ISC_ULONG*,
 
506
                                                                 short,
 
507
                                                                 ISC_UCHAR*,
 
508
                                                                 const ISC_UCHAR *);
 
509
 
 
510
/* 17 May 2001 - isc_expand_dpb is DEPRECATED */
 
511
void FB_API_DEPRECATED ISC_EXPORT_VARARG isc_expand_dpb(ISC_SCHAR**,
 
512
                                                                                                                short*, ...);
 
513
 
 
514
int ISC_EXPORT isc_modify_dpb(ISC_SCHAR**,
 
515
                                                          short*,
 
516
                                                          unsigned short,
 
517
                                                          const ISC_SCHAR*,
 
518
                                                          short);
 
519
 
 
520
ISC_LONG ISC_EXPORT isc_free(ISC_SCHAR *);
 
521
 
 
522
ISC_STATUS ISC_EXPORT isc_get_segment(ISC_STATUS *,
 
523
                                                                          isc_blob_handle *,
 
524
                                                                          unsigned short *,
 
525
                                                                          unsigned short,
 
526
                                                                          ISC_SCHAR *);
 
527
 
 
528
ISC_STATUS ISC_EXPORT isc_get_slice(ISC_STATUS*,
 
529
                                                                        isc_db_handle*,
 
530
                                                                        isc_tr_handle*,
 
531
                                                                        ISC_QUAD*,
 
532
                                                                        short,
 
533
                                                                        const ISC_SCHAR*,
 
534
                                                                        short,
 
535
                                                                        const ISC_LONG*,
 
536
                                                                        ISC_LONG,
 
537
                                                                        void*,
 
538
                                                                        ISC_LONG*);
 
539
 
 
540
/* CVC: This non-const signature is needed for compatibility, see gds.cpp. */
 
541
ISC_LONG FB_API_DEPRECATED ISC_EXPORT isc_interprete(ISC_SCHAR*,
 
542
                                                                         ISC_STATUS**);
 
543
 
 
544
/* This const params version used in the engine and other places. */
 
545
ISC_LONG ISC_EXPORT fb_interpret(ISC_SCHAR*,
 
546
                                                                 unsigned int,
 
547
                                                                 const ISC_STATUS**);
 
548
 
 
549
ISC_STATUS ISC_EXPORT isc_open_blob(ISC_STATUS*,
 
550
                                                                        isc_db_handle*,
 
551
                                                                        isc_tr_handle*,
 
552
                                                                        isc_blob_handle*,
 
553
                                                                        ISC_QUAD*);
 
554
 
 
555
ISC_STATUS ISC_EXPORT isc_open_blob2(ISC_STATUS*,
 
556
                                                                         isc_db_handle*,
 
557
                                                                         isc_tr_handle*,
 
558
                                                                         isc_blob_handle*,
 
559
                                                                         ISC_QUAD*,
 
560
                                                                         ISC_USHORT,
 
561
                                                                         const ISC_UCHAR*);
 
562
 
 
563
ISC_STATUS ISC_EXPORT isc_prepare_transaction2(ISC_STATUS*,
 
564
                                                                                           isc_tr_handle*,
 
565
                                                                                           ISC_USHORT,
 
566
                                                                                           const ISC_UCHAR*);
 
567
 
 
568
void ISC_EXPORT isc_print_sqlerror(ISC_SHORT,
 
569
                                                                   const ISC_STATUS*);
 
570
 
 
571
ISC_STATUS ISC_EXPORT isc_print_status(const ISC_STATUS*);
 
572
 
 
573
ISC_STATUS ISC_EXPORT isc_put_segment(ISC_STATUS*,
 
574
                                                                          isc_blob_handle*,
 
575
                                                                          unsigned short,
 
576
                                                                          const ISC_SCHAR*);
 
577
 
 
578
ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS*,
 
579
                                                                        isc_db_handle*,
 
580
                                                                        isc_tr_handle*,
 
581
                                                                        ISC_QUAD*,
 
582
                                                                        short,
 
583
                                                                        const ISC_SCHAR*,
 
584
                                                                        short,
 
585
                                                                        const ISC_LONG*,
 
586
                                                                        ISC_LONG,
 
587
                                                                        void*);
 
588
 
 
589
ISC_STATUS ISC_EXPORT isc_que_events(ISC_STATUS*,
 
590
                                                                         isc_db_handle*,
 
591
                                                                         ISC_LONG*,
 
592
                                                                         short,
 
593
                                                                         const ISC_UCHAR*,
 
594
                                                                         ISC_EVENT_CALLBACK,
 
595
                                                                         void*);
 
596
 
 
597
ISC_STATUS ISC_EXPORT isc_rollback_retaining(ISC_STATUS *,
 
598
                                                                                         isc_tr_handle *);
 
599
 
 
600
ISC_STATUS ISC_EXPORT isc_rollback_transaction(ISC_STATUS *,
 
601
                                                                                           isc_tr_handle *);
 
602
 
 
603
ISC_STATUS ISC_EXPORT isc_start_multiple(ISC_STATUS *,
 
604
                                                                                 isc_tr_handle *,
 
605
                                                                                 short,
 
606
                                                                                 void *);
 
607
 
 
608
ISC_STATUS ISC_EXPORT_VARARG isc_start_transaction(ISC_STATUS *,
 
609
                                                                                                   isc_tr_handle *,
 
610
                                                                                                   short, ...);
 
611
 
 
612
ISC_LONG ISC_EXPORT isc_sqlcode(const ISC_STATUS*);
 
613
 
 
614
void ISC_EXPORT isc_sqlcode_s(const ISC_STATUS*,
 
615
                                                          ISC_ULONG*);
 
616
 
 
617
void ISC_EXPORT isc_sql_interprete(short,
 
618
                                                                   ISC_SCHAR*,
 
619
                                                                   short);
 
620
 
 
621
ISC_STATUS ISC_EXPORT isc_transaction_info(ISC_STATUS*,
 
622
                                                                                   isc_tr_handle*,
 
623
                                                                                   short,
 
624
                                                                                   const ISC_SCHAR*,
 
625
                                                                                   short,
 
626
                                                                                   ISC_SCHAR*);
 
627
 
 
628
ISC_STATUS ISC_EXPORT isc_transact_request(ISC_STATUS*,
 
629
                                                                                   isc_db_handle*,
 
630
                                                                                   isc_tr_handle*,
 
631
                                                                                   unsigned short,
 
632
                                                                                   const ISC_SCHAR*,
 
633
                                                                                   unsigned short,
 
634
                                                                                   ISC_SCHAR*,
 
635
                                                                                   unsigned short,
 
636
                                                                                   ISC_SCHAR*);
 
637
 
 
638
ISC_LONG ISC_EXPORT isc_vax_integer(const ISC_SCHAR*,
 
639
                                                                        short);
 
640
 
 
641
ISC_INT64 ISC_EXPORT isc_portable_integer(const ISC_UCHAR*,
 
642
                                                                                  short);
 
643
 
 
644
/*************************************/
 
645
/* Security Functions and structures */
 
646
/*************************************/
 
647
 
 
648
#define sec_uid_spec                0x01
 
649
#define sec_gid_spec                0x02
 
650
#define sec_server_spec             0x04
 
651
#define sec_password_spec           0x08
 
652
#define sec_group_name_spec         0x10
 
653
#define sec_first_name_spec         0x20
 
654
#define sec_middle_name_spec        0x40
 
655
#define sec_last_name_spec          0x80
 
656
#define sec_dba_user_name_spec      0x100
 
657
#define sec_dba_password_spec       0x200
 
658
 
 
659
#define sec_protocol_tcpip            1
 
660
#define sec_protocol_netbeui          2
 
661
#define sec_protocol_spx              3 /* -- Deprecated Protocol. Declaration retained for compatibility   */
 
662
#define sec_protocol_local            4
 
663
 
 
664
typedef struct {
 
665
        short sec_flags;                        /* which fields are specified */
 
666
        int uid;                                        /* the user's id */
 
667
        int gid;                                        /* the user's group id */
 
668
        int protocol;                           /* protocol to use for connection */
 
669
        ISC_SCHAR *server;                              /* server to administer */
 
670
        ISC_SCHAR *user_name;                   /* the user's name */
 
671
        ISC_SCHAR *password;                            /* the user's password */
 
672
        ISC_SCHAR *group_name;                  /* the group name */
 
673
        ISC_SCHAR *first_name;                  /* the user's first name */
 
674
        ISC_SCHAR *middle_name;                 /* the user's middle name */
 
675
        ISC_SCHAR *last_name;                   /* the user's last name */
 
676
        ISC_SCHAR *dba_user_name;               /* the dba user name */
 
677
        ISC_SCHAR *dba_password;                        /* the dba password */
 
678
} USER_SEC_DATA;
 
679
 
 
680
ISC_STATUS ISC_EXPORT isc_add_user(ISC_STATUS*, const USER_SEC_DATA*);
 
681
 
 
682
ISC_STATUS ISC_EXPORT isc_delete_user(ISC_STATUS*, const USER_SEC_DATA*);
 
683
 
 
684
ISC_STATUS ISC_EXPORT isc_modify_user(ISC_STATUS*, const USER_SEC_DATA*);
 
685
 
 
686
/**********************************/
 
687
/*  Other OSRI functions          */
 
688
/**********************************/
 
689
 
 
690
ISC_STATUS ISC_EXPORT isc_compile_request(ISC_STATUS*,
 
691
                                                                                  isc_db_handle*,
 
692
                                                                                  isc_req_handle*,
 
693
                                                                                  short,
 
694
                                                                                  const ISC_SCHAR*);
 
695
 
 
696
ISC_STATUS ISC_EXPORT isc_compile_request2(ISC_STATUS*,
 
697
                                                                                   isc_db_handle*,
 
698
                                                                                   isc_req_handle*,
 
699
                                                                                   short,
 
700
                                                                                   const ISC_SCHAR*);
 
701
 
 
702
ISC_STATUS ISC_EXPORT isc_ddl(ISC_STATUS*,
 
703
                                                          isc_db_handle*,
 
704
                                                          isc_tr_handle*,
 
705
                                                          short,
 
706
                                                          const ISC_SCHAR*);
 
707
 
 
708
ISC_STATUS ISC_EXPORT isc_prepare_transaction(ISC_STATUS*,
 
709
                                                                                          isc_tr_handle*);
 
710
 
 
711
 
 
712
ISC_STATUS ISC_EXPORT isc_receive(ISC_STATUS*,
 
713
                                                                  isc_req_handle*,
 
714
                                                                  short,
 
715
                                                                  short,
 
716
                                                                  void*,
 
717
                                                                  short);
 
718
 
 
719
ISC_STATUS ISC_EXPORT isc_reconnect_transaction(ISC_STATUS*,
 
720
                                                                                                isc_db_handle*,
 
721
                                                                                                isc_tr_handle*,
 
722
                                                                                                short,
 
723
                                                                                                const ISC_SCHAR*);
 
724
 
 
725
ISC_STATUS ISC_EXPORT isc_release_request(ISC_STATUS*,
 
726
                                                                                  isc_req_handle*);
 
727
 
 
728
ISC_STATUS ISC_EXPORT isc_request_info(ISC_STATUS*,
 
729
                                                                           isc_req_handle*,
 
730
                                                                           short,
 
731
                                                                           short,
 
732
                                                                           const ISC_SCHAR*,
 
733
                                                                           short,
 
734
                                                                           ISC_SCHAR*);
 
735
 
 
736
ISC_STATUS ISC_EXPORT isc_seek_blob(ISC_STATUS*,
 
737
                                                                        isc_blob_handle*,
 
738
                                                                        short,
 
739
                                                                        ISC_LONG,
 
740
                                                                        ISC_LONG*);
 
741
 
 
742
ISC_STATUS ISC_EXPORT isc_send(ISC_STATUS*,
 
743
                                                           isc_req_handle*,
 
744
                                                           short,
 
745
                                                           short,
 
746
                                                           const void*,
 
747
                                                           short);
 
748
 
 
749
ISC_STATUS ISC_EXPORT isc_start_and_send(ISC_STATUS*,
 
750
                                                                                 isc_req_handle*,
 
751
                                                                                 isc_tr_handle*,
 
752
                                                                                 short,
 
753
                                                                                 short,
 
754
                                                                                 const void*,
 
755
                                                                                 short);
 
756
 
 
757
ISC_STATUS ISC_EXPORT isc_start_request(ISC_STATUS *,
 
758
                                                                                isc_req_handle *,
 
759
                                                                                isc_tr_handle *,
 
760
                                                                                short);
 
761
 
 
762
ISC_STATUS ISC_EXPORT isc_unwind_request(ISC_STATUS *,
 
763
                                                                                 isc_tr_handle *,
 
764
                                                                                 short);
 
765
 
 
766
ISC_STATUS ISC_EXPORT isc_wait_for_event(ISC_STATUS*,
 
767
                                                                                 isc_db_handle*,
 
768
                                                                                 short,
 
769
                                                                                 const ISC_UCHAR*,
 
770
                                                                                 ISC_UCHAR*);
 
771
 
 
772
 
 
773
/*****************************/
 
774
/* Other Sql functions       */
 
775
/*****************************/
 
776
 
 
777
ISC_STATUS ISC_EXPORT isc_close(ISC_STATUS*,
 
778
                                                                const ISC_SCHAR*);
 
779
 
 
780
ISC_STATUS ISC_EXPORT isc_declare(ISC_STATUS*,
 
781
                                                                  const ISC_SCHAR*,
 
782
                                                                  const ISC_SCHAR*);
 
783
 
 
784
ISC_STATUS ISC_EXPORT isc_describe(ISC_STATUS*,
 
785
                                                                   const ISC_SCHAR*,
 
786
                                                                   XSQLDA *);
 
787
 
 
788
ISC_STATUS ISC_EXPORT isc_describe_bind(ISC_STATUS*,
 
789
                                                                                const ISC_SCHAR*,
 
790
                                                                                XSQLDA*);
 
791
 
 
792
ISC_STATUS ISC_EXPORT isc_execute(ISC_STATUS*,
 
793
                                                                  isc_tr_handle*,
 
794
                                                                  const ISC_SCHAR*,
 
795
                                                                  XSQLDA*);
 
796
 
 
797
ISC_STATUS ISC_EXPORT isc_execute_immediate(ISC_STATUS*,
 
798
                                                                                        isc_db_handle*,
 
799
                                                                                        isc_tr_handle*,
 
800
                                                                                        short*,
 
801
                                                                                        const ISC_SCHAR*);
 
802
 
 
803
ISC_STATUS ISC_EXPORT isc_fetch(ISC_STATUS*,
 
804
                                                                const ISC_SCHAR*,
 
805
                                                                XSQLDA*);
 
806
 
 
807
ISC_STATUS ISC_EXPORT isc_open(ISC_STATUS*,
 
808
                                                           isc_tr_handle*,
 
809
                                                           const ISC_SCHAR*,
 
810
                                                           XSQLDA*);
 
811
 
 
812
ISC_STATUS ISC_EXPORT isc_prepare(ISC_STATUS*,
 
813
                                                                  isc_db_handle*,
 
814
                                                                  isc_tr_handle*,
 
815
                                                                  const ISC_SCHAR*,
 
816
                                                                  short*,
 
817
                                                                  const ISC_SCHAR*,
 
818
                                                                  XSQLDA*);
 
819
 
 
820
 
 
821
/*************************************/
 
822
/* Other Dynamic sql functions       */
 
823
/*************************************/
 
824
 
 
825
ISC_STATUS ISC_EXPORT isc_dsql_execute_m(ISC_STATUS*,
 
826
                                                                                 isc_tr_handle*,
 
827
                                                                                 isc_stmt_handle*,
 
828
                                                                                 unsigned short,
 
829
                                                                                 const ISC_SCHAR*,
 
830
                                                                                 unsigned short,
 
831
                                                                                 unsigned short,
 
832
                                                                                 ISC_SCHAR*);
 
833
 
 
834
ISC_STATUS ISC_EXPORT isc_dsql_execute2_m(ISC_STATUS*,
 
835
                                                                                  isc_tr_handle*,
 
836
                                                                                  isc_stmt_handle*,
 
837
                                                                                  unsigned short,
 
838
                                                                                  const ISC_SCHAR*,
 
839
                                                                                  unsigned short,
 
840
                                                                                  unsigned short,
 
841
                                                                                  const ISC_SCHAR*,
 
842
                                                                                  unsigned short,
 
843
                                                                                  ISC_SCHAR*,
 
844
                                                                                  unsigned short,
 
845
                                                                                  unsigned short,
 
846
                                                                                  ISC_SCHAR*);
 
847
 
 
848
ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate_m(ISC_STATUS*,
 
849
                                                                                                   isc_db_handle*,
 
850
                                                                                                   isc_tr_handle*,
 
851
                                                                                                   unsigned short,
 
852
                                                                                                   const ISC_SCHAR*,
 
853
                                                                                                   unsigned short,
 
854
                                                                                                   unsigned short,
 
855
                                                                                                   const ISC_SCHAR*,
 
856
                                                                                                   unsigned short,
 
857
                                                                                                   unsigned short,
 
858
                                                                                                   ISC_SCHAR*);
 
859
 
 
860
ISC_STATUS ISC_EXPORT isc_dsql_exec_immed3_m(ISC_STATUS*,
 
861
                                                                                         isc_db_handle*,
 
862
                                                                                         isc_tr_handle*,
 
863
                                                                                         unsigned short,
 
864
                                                                                         const ISC_SCHAR*,
 
865
                                                                                         unsigned short,
 
866
                                                                                         unsigned short,
 
867
                                                                                         const ISC_SCHAR*,
 
868
                                                                                         unsigned short,
 
869
                                                                                         unsigned short,
 
870
                                                                                         ISC_SCHAR*,
 
871
                                                                                         unsigned short,
 
872
                                                                                         ISC_SCHAR*,
 
873
                                                                                         unsigned short,
 
874
                                                                                         unsigned short,
 
875
                                                                                         ISC_SCHAR*);
 
876
 
 
877
ISC_STATUS ISC_EXPORT isc_dsql_fetch_m(ISC_STATUS*,
 
878
                                                                           isc_stmt_handle*,
 
879
                                                                           unsigned short,
 
880
                                                                           const ISC_SCHAR*,
 
881
                                                                           unsigned short,
 
882
                                                                           unsigned short,
 
883
                                                                           ISC_SCHAR*);
 
884
 
 
885
ISC_STATUS ISC_EXPORT isc_dsql_insert_m(ISC_STATUS*,
 
886
                                                                                isc_stmt_handle*,
 
887
                                                                                unsigned short,
 
888
                                                                                const ISC_SCHAR*,
 
889
                                                                                unsigned short,
 
890
                                                                                unsigned short,
 
891
                                                                                const ISC_SCHAR*);
 
892
 
 
893
ISC_STATUS ISC_EXPORT isc_dsql_prepare_m(ISC_STATUS*,
 
894
                                                                                 isc_tr_handle*,
 
895
                                                                                 isc_stmt_handle*,
 
896
                                                                                 unsigned short,
 
897
                                                                                 const ISC_SCHAR*,
 
898
                                                                                 unsigned short,
 
899
                                                                                 unsigned short,
 
900
                                                                                 const ISC_SCHAR*,
 
901
                                                                                 unsigned short,
 
902
                                                                                 ISC_SCHAR*);
 
903
 
 
904
ISC_STATUS ISC_EXPORT isc_dsql_release(ISC_STATUS*,
 
905
                                                                           const ISC_SCHAR*);
 
906
 
 
907
ISC_STATUS ISC_EXPORT isc_embed_dsql_close(ISC_STATUS*,
 
908
                                                                                   const ISC_SCHAR*);
 
909
 
 
910
ISC_STATUS ISC_EXPORT isc_embed_dsql_declare(ISC_STATUS*,
 
911
                                                                                         const ISC_SCHAR*,
 
912
                                                                                         const ISC_SCHAR*);
 
913
 
 
914
ISC_STATUS ISC_EXPORT isc_embed_dsql_describe(ISC_STATUS*,
 
915
                                                                                          const ISC_SCHAR*,
 
916
                                                                                          unsigned short,
 
917
                                                                                          XSQLDA*);
 
918
 
 
919
ISC_STATUS ISC_EXPORT isc_embed_dsql_describe_bind(ISC_STATUS*,
 
920
                                                                                                   const ISC_SCHAR*,
 
921
                                                                                                   unsigned short,
 
922
                                                                                                   XSQLDA*);
 
923
 
 
924
ISC_STATUS ISC_EXPORT isc_embed_dsql_execute(ISC_STATUS*,
 
925
                                                                                         isc_tr_handle*,
 
926
                                                                                         const ISC_SCHAR*,
 
927
                                                                                         unsigned short,
 
928
                                                                                         XSQLDA*);
 
929
 
 
930
ISC_STATUS ISC_EXPORT isc_embed_dsql_execute2(ISC_STATUS*,
 
931
                                                                                          isc_tr_handle*,
 
932
                                                                                          const ISC_SCHAR*,
 
933
                                                                                          unsigned short,
 
934
                                                                                          XSQLDA*,
 
935
                                                                                          XSQLDA*);
 
936
 
 
937
ISC_STATUS ISC_EXPORT isc_embed_dsql_execute_immed(ISC_STATUS*,
 
938
                                                                                                   isc_db_handle*,
 
939
                                                                                                   isc_tr_handle*,
 
940
                                                                                                   unsigned short,
 
941
                                                                                                   const ISC_SCHAR*,
 
942
                                                                                                   unsigned short,
 
943
                                                                                                   XSQLDA*);
 
944
 
 
945
ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch(ISC_STATUS*,
 
946
                                                                                   const ISC_SCHAR*,
 
947
                                                                                   unsigned short,
 
948
                                                                                   XSQLDA*);
 
949
 
 
950
ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch_a(ISC_STATUS*,
 
951
                                                                                         int*,
 
952
                                                                                         const ISC_SCHAR*,
 
953
                                                                                         ISC_USHORT,
 
954
                                                                                         XSQLDA*);
 
955
 
 
956
void ISC_EXPORT isc_embed_dsql_length(const ISC_UCHAR*,
 
957
                                                                          ISC_USHORT*);
 
958
 
 
959
ISC_STATUS ISC_EXPORT isc_embed_dsql_open(ISC_STATUS*,
 
960
                                                                                  isc_tr_handle*,
 
961
                                                                                  const ISC_SCHAR*,
 
962
                                                                                  unsigned short,
 
963
                                                                                  XSQLDA*);
 
964
 
 
965
ISC_STATUS ISC_EXPORT isc_embed_dsql_open2(ISC_STATUS*,
 
966
                                                                                   isc_tr_handle*,
 
967
                                                                                   const ISC_SCHAR*,
 
968
                                                                                   unsigned short,
 
969
                                                                                   XSQLDA*,
 
970
                                                                                   XSQLDA*);
 
971
 
 
972
ISC_STATUS ISC_EXPORT isc_embed_dsql_insert(ISC_STATUS*,
 
973
                                                                                        const ISC_SCHAR*,
 
974
                                                                                        unsigned short,
 
975
                                                                                        XSQLDA*);
 
976
 
 
977
ISC_STATUS ISC_EXPORT isc_embed_dsql_prepare(ISC_STATUS*,
 
978
                                                                                         isc_db_handle*,
 
979
                                                                                         isc_tr_handle*,
 
980
                                                                                         const ISC_SCHAR*,
 
981
                                                                                         unsigned short,
 
982
                                                                                         const ISC_SCHAR*,
 
983
                                                                                         unsigned short,
 
984
                                                                                         XSQLDA*);
 
985
 
 
986
ISC_STATUS ISC_EXPORT isc_embed_dsql_release(ISC_STATUS*,
 
987
                                                                                         const ISC_SCHAR*);
 
988
 
 
989
 
 
990
/******************************/
 
991
/* Other Blob functions       */
 
992
/******************************/
 
993
 
 
994
BSTREAM* ISC_EXPORT BLOB_open(isc_blob_handle,
 
995
                                                                          ISC_SCHAR*,
 
996
                                                                          int);
 
997
 
 
998
int ISC_EXPORT BLOB_put(ISC_SCHAR,
 
999
                                                BSTREAM*);
 
1000
 
 
1001
int ISC_EXPORT BLOB_close(BSTREAM*);
 
1002
 
 
1003
int ISC_EXPORT BLOB_get(BSTREAM*);
 
1004
 
 
1005
int ISC_EXPORT BLOB_display(ISC_QUAD*,
 
1006
                                                        isc_db_handle,
 
1007
                                                        isc_tr_handle,
 
1008
                                                        const ISC_SCHAR*);
 
1009
 
 
1010
int ISC_EXPORT BLOB_dump(ISC_QUAD*,
 
1011
                                                 isc_db_handle,
 
1012
                                                 isc_tr_handle,
 
1013
                                                 const ISC_SCHAR*);
 
1014
 
 
1015
int ISC_EXPORT BLOB_edit(ISC_QUAD*,
 
1016
                                                 isc_db_handle,
 
1017
                                                 isc_tr_handle,
 
1018
                                                 const ISC_SCHAR*);
 
1019
 
 
1020
int ISC_EXPORT BLOB_load(ISC_QUAD*,
 
1021
                                                 isc_db_handle,
 
1022
                                                 isc_tr_handle,
 
1023
                                                 const ISC_SCHAR*);
 
1024
 
 
1025
int ISC_EXPORT BLOB_text_dump(ISC_QUAD*,
 
1026
                                                          isc_db_handle,
 
1027
                                                          isc_tr_handle,
 
1028
                                                          const ISC_SCHAR*);
 
1029
 
 
1030
int ISC_EXPORT BLOB_text_load(ISC_QUAD*,
 
1031
                                                          isc_db_handle,
 
1032
                                                          isc_tr_handle,
 
1033
                                                          const ISC_SCHAR*);
 
1034
 
 
1035
BSTREAM* ISC_EXPORT Bopen(ISC_QUAD*,
 
1036
                                                                  isc_db_handle,
 
1037
                                                                  isc_tr_handle,
 
1038
                                                                  const ISC_SCHAR*);
 
1039
 
 
1040
/* Disabled, not found anywhere.
 
1041
BSTREAM* ISC_EXPORT Bopen2(ISC_QUAD*,
 
1042
                                                                   isc_db_handle,
 
1043
                                                                   isc_tr_handle,
 
1044
                                                                   const ISC_SCHAR*,
 
1045
                                                                   unsigned short);
 
1046
*/
 
1047
 
 
1048
 
 
1049
/******************************/
 
1050
/* Other Misc functions       */
 
1051
/******************************/
 
1052
 
 
1053
ISC_LONG ISC_EXPORT isc_ftof(const ISC_SCHAR*,
 
1054
                                                         const unsigned short,
 
1055
                                                         ISC_SCHAR*,
 
1056
                                                         const unsigned short);
 
1057
 
 
1058
ISC_STATUS ISC_EXPORT isc_print_blr(const ISC_SCHAR*,
 
1059
                                                                        ISC_PRINT_CALLBACK,
 
1060
                                                                        void*,
 
1061
                                                                        short);
 
1062
 
 
1063
void ISC_EXPORT isc_set_debug(int);
 
1064
 
 
1065
void ISC_EXPORT isc_qtoq(const ISC_QUAD*,
 
1066
                                                 ISC_QUAD*);
 
1067
 
 
1068
void ISC_EXPORT isc_vtof(const ISC_SCHAR*,
 
1069
                                                 ISC_SCHAR*,
 
1070
                                                 unsigned short);
 
1071
 
 
1072
void ISC_EXPORT isc_vtov(const ISC_SCHAR*,
 
1073
                                                 ISC_SCHAR*,
 
1074
                                                 short);
 
1075
 
 
1076
int ISC_EXPORT isc_version(isc_db_handle*,
 
1077
                                                   ISC_VERSION_CALLBACK,
 
1078
                                                   void*);
 
1079
 
 
1080
ISC_LONG ISC_EXPORT isc_reset_fpe(ISC_USHORT);
 
1081
 
 
1082
uintptr_t       ISC_EXPORT isc_baddress(ISC_SCHAR*);
 
1083
void            ISC_EXPORT isc_baddress_s(const ISC_SCHAR*,
 
1084
                                                                  uintptr_t*);
 
1085
 
 
1086
/*****************************************/
 
1087
/* Service manager functions             */
 
1088
/*****************************************/
 
1089
 
 
1090
#define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); \
 
1091
                                         *(p)++ = (length) >> 8;}
 
1092
 
 
1093
#define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (ISC_SCHAR) (data); \
 
1094
                                         *(p)++ = (ISC_SCHAR) ((data) >> 8); \
 
1095
                                         *(p)++ = (ISC_SCHAR) ((data) >> 16); \
 
1096
                                         *(p)++ = (ISC_SCHAR) ((data) >> 24);}
 
1097
 
 
1098
ISC_STATUS ISC_EXPORT isc_service_attach(ISC_STATUS*,
 
1099
                                                                                 unsigned short,
 
1100
                                                                                 const ISC_SCHAR*,
 
1101
                                                                                 isc_svc_handle*,
 
1102
                                                                                 unsigned short,
 
1103
                                                                                 const ISC_SCHAR*);
 
1104
 
 
1105
ISC_STATUS ISC_EXPORT isc_service_detach(ISC_STATUS *,
 
1106
                                                                                 isc_svc_handle *);
 
1107
 
 
1108
ISC_STATUS ISC_EXPORT isc_service_query(ISC_STATUS*,
 
1109
                                                                                isc_svc_handle*,
 
1110
                                                                                isc_resv_handle*,
 
1111
                                                                                unsigned short,
 
1112
                                                                                const ISC_SCHAR*,
 
1113
                                                                                unsigned short,
 
1114
                                                                                const ISC_SCHAR*,
 
1115
                                                                                unsigned short,
 
1116
                                                                                ISC_SCHAR*);
 
1117
 
 
1118
ISC_STATUS ISC_EXPORT isc_service_start(ISC_STATUS*,
 
1119
                                                                                isc_svc_handle*,
 
1120
                                                                                isc_resv_handle*,
 
1121
                                                                                unsigned short,
 
1122
                                                                                const ISC_SCHAR*);
 
1123
 
 
1124
 
 
1125
/********************************/
 
1126
/* Client information functions */
 
1127
/********************************/
 
1128
 
 
1129
void ISC_EXPORT isc_get_client_version ( ISC_SCHAR  *);
 
1130
int  ISC_EXPORT isc_get_client_major_version ();
 
1131
int  ISC_EXPORT isc_get_client_minor_version ();
 
1132
 
 
1133
#ifdef __cplusplus
 
1134
}       /* extern "C" */
 
1135
#endif
 
1136
 
 
1137
 
 
1138
/***************************************************/
 
1139
/* Actions to pass to the blob filter (ctl_source) */
 
1140
/***************************************************/
 
1141
 
 
1142
#define isc_blob_filter_open             0
 
1143
#define isc_blob_filter_get_segment      1
 
1144
#define isc_blob_filter_close            2
 
1145
#define isc_blob_filter_create           3
 
1146
#define isc_blob_filter_put_segment      4
 
1147
#define isc_blob_filter_alloc            5
 
1148
#define isc_blob_filter_free             6
 
1149
#define isc_blob_filter_seek             7
 
1150
 
 
1151
/*******************/
 
1152
/* Blr definitions */
 
1153
/*******************/
 
1154
 
 
1155
#include "blr.h"
 
1156
 
 
1157
#include "consts_pub.h"
 
1158
 
 
1159
/*********************************/
 
1160
/* Information call declarations */
 
1161
/*********************************/
 
1162
 
 
1163
#include "../jrd/inf_pub.h"
 
1164
 
 
1165
#include "iberror.h"
 
1166
 
 
1167
#endif /* JRD_IBASE_H */
 
1168