Tang Cheng | 03c0b0a | 2015-01-12 11:19:45 +0800 | [diff] [blame^] | 1 | |
| 2 | /* Copyright (c) 1997, 2005, Oracle. All rights reserved. */ |
| 3 | |
| 4 | /* NOTE: See 'header_template.doc' in the 'doc' dve under the 'forms' |
| 5 | directory for the header file template that includes instructions. |
| 6 | */ |
| 7 | |
| 8 | /* |
| 9 | NAME |
| 10 | oci1.h - Cartridge Service definitions |
| 11 | |
| 12 | DESCRIPTION |
| 13 | <short description of component this file declares/defines> |
| 14 | |
| 15 | RELATED DOCUMENTS |
| 16 | |
| 17 | INSPECTION STATUS |
| 18 | Inspection date: |
| 19 | Inspection status: |
| 20 | Estimated increasing cost defects per page: |
| 21 | Rule sets: |
| 22 | |
| 23 | ACCEPTANCE REVIEW STATUS |
| 24 | Review date: |
| 25 | Review status: |
| 26 | Reviewers: |
| 27 | |
| 28 | PUBLIC FUNCTION(S) |
| 29 | <list of external functions declared/defined - with one-line descriptions> |
| 30 | |
| 31 | PRIVATE FUNCTION(S) |
| 32 | <list of static functions defined in .c file - with one-line descriptions> |
| 33 | |
| 34 | EXAMPLES |
| 35 | |
| 36 | NOTES |
| 37 | <other useful comments, qualifications, etc.> |
| 38 | |
| 39 | MODIFIED (MM/DD/YY) |
| 40 | mbastawa 09/16/05 - dbhygiene |
| 41 | dmukhin 06/29/05 - ANSI prototypes; miscellaneous cleanup |
| 42 | nramakri 01/16/98 - remove #ifdef NEVER clause |
| 43 | ewaugh 12/18/97 - Turn type wrappers into functions. |
| 44 | skabraha 12/02/97 - Adding data structures & constants for OCIFile |
| 45 | rhwu 12/02/97 - OCI Thread |
| 46 | nramakri 12/15/97 - move to core4 |
| 47 | ewaugh 12/11/97 - add OCIFormat package constants |
| 48 | ssamu 12/10/97 - do not include s.h |
| 49 | nramakri 11/19/97 - add OCIExtract definitions |
| 50 | ssamu 11/14/97 - creation |
| 51 | |
| 52 | */ |
| 53 | |
| 54 | |
| 55 | #ifndef OCI1_ORACLE |
| 56 | # define OCI1_ORACLE |
| 57 | |
| 58 | # ifndef ORATYPES |
| 59 | # include <oratypes.h> |
| 60 | # endif |
| 61 | |
| 62 | |
| 63 | /*--------------------------------------------------------------------------- |
| 64 | PUBLIC TYPES AND CONSTANTS |
| 65 | ---------------------------------------------------------------------------*/ |
| 66 | |
| 67 | /* Constants required by the OCIFormat package. */ |
| 68 | |
| 69 | #define OCIFormatUb1(variable) OCIFormatTUb1(), &(variable) |
| 70 | #define OCIFormatUb2(variable) OCIFormatTUb2(), &(variable) |
| 71 | #define OCIFormatUb4(variable) OCIFormatTUb4(), &(variable) |
| 72 | #define OCIFormatUword(variable) OCIFormatTUword(), &(variable) |
| 73 | #define OCIFormatUbig_ora(variable) OCIFormatTUbig_ora(), &(variable) |
| 74 | #define OCIFormatSb1(variable) OCIFormatTSb1(), &(variable) |
| 75 | #define OCIFormatSb2(variable) OCIFormatTSb2(), &(variable) |
| 76 | #define OCIFormatSb4(variable) OCIFormatTSb4(), &(variable) |
| 77 | #define OCIFormatSword(variable) OCIFormatTSword(), &(variable) |
| 78 | #define OCIFormatSbig_ora(variable) OCIFormatTSbig_ora(), &(variable) |
| 79 | #define OCIFormatEb1(variable) OCIFormatTEb1(), &(variable) |
| 80 | #define OCIFormatEb2(variable) OCIFormatTEb2(), &(variable) |
| 81 | #define OCIFormatEb4(variable) OCIFormatTEb4(), &(variable) |
| 82 | #define OCIFormatEword(variable) OCIFormatTEword(), &(variable) |
| 83 | #define OCIFormatChar(variable) OCIFormatTChar(), &(variable) |
| 84 | #define OCIFormatText(variable) OCIFormatTText(), (variable) |
| 85 | #define OCIFormatDouble(variable) OCIFormatTDouble(), &(variable) |
| 86 | #define OCIFormatDvoid(variable) OCIFormatTDvoid(), (variable) |
| 87 | #define OCIFormatEnd OCIFormatTEnd() |
| 88 | |
| 89 | #define OCIFormatDP 6 |
| 90 | |
| 91 | |
| 92 | /*----------------- Public Constants for OCIFile -------------------------*/ |
| 93 | |
| 94 | /* flags for open.*/ |
| 95 | /* flags for mode */ |
| 96 | #define OCI_FILE_READ_ONLY 1 /* open for read only */ |
| 97 | #define OCI_FILE_WRITE_ONLY 2 /* open for write only */ |
| 98 | #define OCI_FILE_READ_WRITE 3 /* open for read & write */ |
| 99 | /* flags for create */ |
| 100 | #define OCI_FILE_EXIST 0 /* the file should exist */ |
| 101 | #define OCI_FILE_CREATE 1 /* create if the file doesn't exist */ |
| 102 | #define OCI_FILE_EXCL 2 /* the file should not exist */ |
| 103 | #define OCI_FILE_TRUNCATE 4 /* create if the file doesn't exist, |
| 104 | else truncate file the file to 0 */ |
| 105 | #define OCI_FILE_APPEND 8 /* open the file in append mode */ |
| 106 | |
| 107 | /* flags for seek */ |
| 108 | #define OCI_FILE_SEEK_BEGINNING 1 /* seek from the beginning of the file */ |
| 109 | #define OCI_FILE_SEEK_CURRENT 2 /* seek from the current position */ |
| 110 | #define OCI_FILE_SEEK_END 3 /* seek from the end of the file */ |
| 111 | |
| 112 | #define OCI_FILE_FORWARD 1 /* seek forward */ |
| 113 | #define OCI_FILE_BACKWARD 2 /* seek backward */ |
| 114 | |
| 115 | /* file type */ |
| 116 | #define OCI_FILE_BIN 0 /* binary file */ |
| 117 | #define OCI_FILE_TEXT 1 /* text file */ |
| 118 | #define OCI_FILE_STDIN 2 /* standard i/p */ |
| 119 | #define OCI_FILE_STDOUT 3 /* standard o/p */ |
| 120 | #define OCI_FILE_STDERR 4 /* standard error */ |
| 121 | |
| 122 | /* Represents an open file */ |
| 123 | typedef struct OCIFileObject OCIFileObject; |
| 124 | |
| 125 | |
| 126 | /*--------------------- OCI Thread Object Definitions------------------------*/ |
| 127 | |
| 128 | /* OCIThread Context */ |
| 129 | typedef struct OCIThreadContext OCIThreadContext; |
| 130 | |
| 131 | /* OCIThread Mutual Exclusion Lock */ |
| 132 | typedef struct OCIThreadMutex OCIThreadMutex; |
| 133 | |
| 134 | /* OCIThread Key for Thread-Specific Data */ |
| 135 | typedef struct OCIThreadKey OCIThreadKey; |
| 136 | |
| 137 | /* OCIThread Thread ID */ |
| 138 | typedef struct OCIThreadId OCIThreadId; |
| 139 | |
| 140 | /* OCIThread Thread Handle */ |
| 141 | typedef struct OCIThreadHandle OCIThreadHandle; |
| 142 | |
| 143 | |
| 144 | /*-------------------- OCI Thread Callback Function Pointers ----------------*/ |
| 145 | |
| 146 | /* OCIThread Key Destructor Function Type */ |
| 147 | typedef void (*OCIThreadKeyDestFunc)( void * ); |
| 148 | |
| 149 | |
| 150 | /* Flags passed into OCIExtractFromXXX routines to direct processing */ |
| 151 | #define OCI_EXTRACT_CASE_SENSITIVE 0x1 /* matching is case sensitive */ |
| 152 | #define OCI_EXTRACT_UNIQUE_ABBREVS 0x2 /* unique abbreviations for keys |
| 153 | are allowed */ |
| 154 | #define OCI_EXTRACT_APPEND_VALUES 0x4 /* if multiple values for a key |
| 155 | exist, this determines if the |
| 156 | new value should be appended |
| 157 | to (or replace) the current |
| 158 | list of values */ |
| 159 | |
| 160 | /* Constants passed into OCIExtractSetKey routine */ |
| 161 | #define OCI_EXTRACT_MULTIPLE 0x8 /* key can accept multiple values */ |
| 162 | #define OCI_EXTRACT_TYPE_BOOLEAN 1 /* key type is boolean */ |
| 163 | #define OCI_EXTRACT_TYPE_STRING 2 /* key type is string */ |
| 164 | #define OCI_EXTRACT_TYPE_INTEGER 3 /* key type is integer */ |
| 165 | #define OCI_EXTRACT_TYPE_OCINUM 4 /* key type is ocinum */ |
| 166 | |
| 167 | /*--------------------------------------------------------------------------- |
| 168 | PRIVATE TYPES AND CONSTANTS |
| 169 | ---------------------------------------------------------------------------*/ |
| 170 | |
| 171 | |
| 172 | /*--------------------------------------------------------------------------- |
| 173 | PUBLIC FUNCTIONS |
| 174 | ---------------------------------------------------------------------------*/ |
| 175 | |
| 176 | |
| 177 | /*--------------------------------------------------------------------------- |
| 178 | PRIVATE FUNCTIONS |
| 179 | ---------------------------------------------------------------------------*/ |
| 180 | |
| 181 | |
| 182 | #endif /* OCI1_ORACLE */ |