123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- /***************************************************************************
- *
- * INFORMIX SOFTWARE, INC.
- *
- * PROPRIETARY DATA
- *
- * THIS DOCUMENT CONTAINS TRADE SECRET DATA WHICH IS THE PROPERTY OF
- * INFORMIX SOFTWARE, INC. THIS DOCUMENT IS SUBMITTED TO RECIPIENT IN
- * CONFIDENCE. INFORMATION CONTAINED HEREIN MAY NOT BE USED, COPIED OR
- * DISCLOSED IN WHOLE OR IN PART EXCEPT AS PERMITTED BY WRITTEN AGREEMENT
- * SIGNED BY AN OFFICER OF INFORMIX SOFTWARE, INC.
- *
- * THIS MATERIAL IS ALSO COPYRIGHTED AS AN UNPUBLISHED WORK UNDER
- * SECTIONS 104 AND 408 OF TITLE 17 OF THE UNITED STATES CODE.
- * UNAUTHORIZED USE, COPYING OR OTHER REPRODUCTION IS PROHIBITED BY LAW.
- *
- *
- * Title: lldsapi.h
- * CCid: %W% %E% %U%
- * Author: Craig Freedman
- * Created: Wed Jul 31 1996
- * Description: External include file for the server API interface
- * of the LOB Locator DataBlade
- *
- ***************************************************************************/
- #ifndef IXIlldsapi_h
- #define IXIlldsapi_h
- #include <mi.h>
- /* values for the type field of lld_lob_t */
- #define LLD_BLOB 0
- #define LLD_CLOB 1
- /* values for the lld_open flags argument */
- #define LLD_RDONLY 1 /* open LOB for read-only access */
- #define LLD_WRONLY 2 /* open LOB for write-only access */
- #define LLD_RDWR 4 /* open LOB for read-write access */
- #define LLD_TRUNC 8 /* truncate LOB to zero length */
- #define LLD_APPEND 16 /* open LOB for appending (seek to end) */
- #define LLD_SEQ 32 /* open LOB for sequential access only */
- #define LLD_NOBUFFER 64 /* open LOB for lite io */
- #define LLD_DEFERRED 128 /* Open the LOB only when needed to conserve FDs */
- /* In deferred open mode an lld is opened only when the functions lld_read,
- * lld_write or lld_seek need it. The file or blob opened in deferred mode
- * is actually opened transparently to the caller except that lld_read etc may
- * fail (and return the error code) where lld_open would have failed.
- */
- /* values for the lld_seek whence argument */
- #define LLD_SEEK_CUR MI_LO_SEEK_CUR /* seek relative to current position */
- #define LLD_SEEK_SET MI_LO_SEEK_SET /* seek relative to beginning of LOB */
- #define LLD_SEEK_END MI_LO_SEEK_END /* seek relative to end of LOB */
- /* LLD_Locator field sizes */
- #define LLD_PROTOCOL_LEN 18
- /* error codes */
- #define LLD_E_OK 0 /* no error */
- #define LLD_E_EXCEPTION -1 /* MI_Exception handled (DataBlade API only) */
- #define LLD_E_INTERNAL -2 /* internal LLD error */
- #define LLD_E_ERRNO -3 /* OS error */
- #define LLD_E_ROW -4 /* invalid MI_ROW type */
- #define LLD_E_PROTOCOL -5 /* invalid lo_protocol value */
- #define LLD_E_LOCATION -6 /* invalid lo_location value */
- #define LLD_E_EXISTS -7 /* attempt to (re)create an existing LOB */
- #define LLD_E_NOTEXIST -8 /* attempt to open a non-existing LOB */
- #define LLD_E_FLAGS -9 /* invalid open flags combination */
- #define LLD_E_LLDIO -10 /* corrupted LLD_IO structure */
- #define LLD_E_RDONLY -11 /* attempt to write a read-only LOB */
- #define LLD_E_WRONLY -12 /* attempt to read a write-only LOB */
- #define LLD_E_SEQ -13 /* attempt to seek a sequential-only LOB */
- #define LLD_E_WHENCE -14 /* invalid whence (seek) value */
- #define LLD_E_OFFSET -15 /* attempt to seek to an invalid offset */
- /* IFXLOB user defined base type */
- typedef struct
- {
- MI_LO_HANDLE lo; /* smartblob pointer */
- mi_integer type; /* LLD_BLOB or LLD_CLOB */
- } lld_lob_t;
- /* the LLD_IO structure is opaque */
- typedef struct LLD_IO LLD_IO;
- /* function prototypes */
- /* LLD_Locator */ MI_ROW* lld_create (MI_CONNECTION* conn,
- /* LLD_Locator */ MI_ROW* lob,
- mi_integer* error);
- mi_integer lld_create_client (MI_CONNECTION* conn,
- mi_string* path,
- mi_integer* error);
- LLD_IO* lld_open (MI_CONNECTION* conn,
- /* LLD_Locator */ MI_ROW* lob,
- mi_integer flags,
- mi_integer* error);
- LLD_IO* lld_open_client (MI_CONNECTION* conn,
- mi_string* path,
- mi_integer flags,
- mi_integer* error);
- mi_integer lld_read (MI_CONNECTION* conn,
- LLD_IO* io,
- void* buffer,
- mi_integer bytes,
- mi_integer* error);
- mi_integer lld_write (MI_CONNECTION* conn,
- LLD_IO* io,
- void* buffer,
- mi_integer bytes,
- mi_integer* error);
- mi_integer lld_seek (MI_CONNECTION* conn,
- LLD_IO* io,
- mi_int8* offset,
- mi_integer whence,
- mi_int8* new_offset,
- mi_integer* error);
- mi_integer lld_tell (MI_CONNECTION* conn,
- LLD_IO* io,
- mi_int8* new_offset,
- mi_integer* error);
- mi_integer lld_close (MI_CONNECTION* conn,
- LLD_IO* io,
- mi_integer* error);
- mi_integer lld_delete (MI_CONNECTION* conn,
- /* LLD_Locator */ MI_ROW* lob,
- mi_integer* error);
- mi_integer lld_delete_client (MI_CONNECTION* conn,
- mi_string* path,
- mi_integer* error);
- /* LLD_Locator */ MI_ROW* lld_copy (MI_CONNECTION* conn,
- /* LLD_Locator */ MI_ROW* src,
- /* LLD_Locator */ MI_ROW* dest,
- mi_integer* error);
- /* LLD_Locator */ MI_ROW* lld_from_client (MI_CONNECTION* conn,
- mi_string* src,
- /* LLD_Locator */ MI_ROW* dest,
- mi_integer* error);
- mi_integer lld_to_client (MI_CONNECTION* conn,
- /* LLD_Locator */ MI_ROW* src,
- mi_string* dest,
- mi_integer* error);
- mi_string* lld_sqlstate (mi_integer error);
- mi_integer lld_error_raise (MI_CONNECTION* conn,
- mi_integer error);
- #endif
|