| /********************************************************************** |
| // @@@ START COPYRIGHT @@@ |
| // |
| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| // |
| // @@@ END COPYRIGHT @@@ |
| **********************************************************************/ |
| /**************************************************************************
|
| **************************************************************************/
|
| //
|
| // MODULE: TDM_COMMON.IDL
|
| //
|
| // PURPOSE: Describes common typedefs used by the ODBC
|
| // Krypton IDL specifications.
|
| //
|
| //// Modification History
|
| // 11Nov97 Changed to colHeadingNm to be of 60 characters in length
|
| // 09Sep97 Changed the parameter name autoCommitOn to autocommit and its type from
|
| // boolean to short in CONNECTION_CONTEXT_def
|
| //
|
| // 22Aug97 Changed some of the typedefs into basic types, since these typedefs
|
| // are declared elsewhere.
|
| // 1JAN98 Changes for Association Service integration
|
| #ifndef _COMMON_DEFINED
|
| #define _COMMON_DEFINED
|
|
|
| typedef string UUID_def;
|
|
|
| #define common_uuid ((UUID_def) "d1894a72-0326-11d1-a54a-0060b01ad6ae")
|
|
|
| #define MAX_TEXT_SID_LEN 186 // check the comment in SecDrvr.cpp
|
| // When you change this, Make sure you change in DrvrSrvr.h
|
|
|
| #define MAX_COMPUTERNAME_LENGTH 15 // defined in WINBASE.H
|
| #define SQL_MAX_SESSIONNAME_LEN 25 // 24 + 1 for the null terminator
|
|
|
| #define MAX_PROCESS_NAME_LEN 128
|
|
|
| typedef long DIALOGUE_ID_def;
|
| typedef string<512> SQL_IDENTIFIER_def;
|
| typedef string<512> STMT_NAME_def;
|
| typedef long SQL_DATATYPE_def;
|
| typedef string<5> SQLSTATE_def;
|
| typedef string ERROR_STR_def;
|
| typedef sequence<octet> SQL_DataValue_def;
|
| typedef short SQL_INDICATOR_def;
|
| typedef long long INTERVAL_NUM_def;
|
| typedef string<30> TIMESTAMP_STR_def;
|
| typedef sequence<octet> USER_SID_def;
|
| typedef sequence<octet> USER_PASSWORD_def;
|
| typedef sequence<octet> USER_NAME_def;
|
| typedef long TIME_def; // This should be in sync with time_t declaration
|
|
|
| typedef short GEN_PARAM_TOKEN_def;
|
| typedef short GEN_PARAM_OPERATION_def;
|
| typedef sequence<octet> GEN_PARAM_VALUE_def;
|
|
|
| typedef string<32> VPROC_def;
|
|
|
| typedef string<128+1> APLICATION_def;
|
| typedef string<128+1> COMPUTER_def;
|
| typedef string<128+1> NAME_def;
|
|
|
|
|
| typedef struct ERROR_DESC_t {
|
| long rowId; // 0 indicates all
|
| long errorDiagnosticId;
|
| long sqlcode;
|
| SQLSTATE_def sqlstate;
|
| ERROR_STR_def errorText;
|
| long operationAbortId;
|
| long errorCodeType;
|
| string Param1;
|
| string Param2;
|
| string Param3;
|
| string Param4;
|
| string Param5;
|
| string Param6;
|
| string Param7;
|
| } ERROR_DESC_def;
|
|
|
| typedef sequence<ERROR_DESC_def> ERROR_DESC_LIST_def;
|
|
|
| typedef struct SQLItemDesc_t {
|
| long version;
|
| SQL_DATATYPE_def dataType;
|
| long datetimeCode;
|
| long maxLen;
|
| short precision;
|
| short scale;
|
| boolean nullInfo;
|
| string<512+1> colHeadingNm;
|
| boolean signType;
|
| long ODBCDataType;
|
| short ODBCPrecision;
|
| long SQLCharset;
|
| long ODBCCharset;
|
| string<512+1> TableName;
|
| string<512+1> CatalogName;
|
| string<512+1> SchemaName;
|
| string<512+1> Heading;
|
| long intLeadPrec;
|
| long paramMode;
|
| } SQLItemDesc_def;
|
|
|
| typedef sequence<SQLItemDesc_def> SQLItemDescList_def;
|
|
|
| typedef struct SQLValue_t {
|
| SQL_DATATYPE_def dataType;
|
| SQL_INDICATOR_def dataInd;
|
| SQL_DataValue_def dataValue;
|
| long dataCharset;
|
| } SQLValue_def;
|
|
|
| typedef sequence<SQLValue_def> SQLValueList_def;
|
|
|
| typedef enum USER_DESC_TYPE_t {
|
| SID_TYPE,
|
| AUTHENTICATED_USER_TYPE,
|
| UNAUTHENTICATED_USER_TYPE,
|
| PASSWORD_ENCRYPTED_USER_TYPE,
|
| SID_ENCRYPTED_USER_TYPE,
|
| WIN95_USER_TYPE
|
| } USER_DESC_TYPE_def;
|
|
|
| typedef struct USER_DESC_t
|
| {
|
| USER_DESC_TYPE_def userDescType;
|
| USER_SID_def userSid;
|
| string domainName;
|
| string userName;
|
| USER_PASSWORD_def password;
|
| } USER_DESC_def;
|
|
|
| // Note: This output context has to be kept to a minimum since all context
|
| // cannot be retrieved at the connection time (to speed up
|
| // the connection process, we reply to the driver before we are
|
| // done with the connection process on the server side).
|
| // If more information is needed, then a different approach has to be taken.
|
| typedef struct VERSION_t {
|
| short componentId;
|
| short majorVersion;
|
| short minorVersion;
|
| unsigned long buildId;
|
| } VERSION_def;
|
|
|
| typedef sequence<VERSION_def> VERSION_LIST_def;
|
|
|
| typedef struct CONNECTION_CONTEXT_t {
|
| SQL_IDENTIFIER_def datasource;
|
| SQL_IDENTIFIER_def catalog;
|
| SQL_IDENTIFIER_def schema;
|
| SQL_IDENTIFIER_def location;
|
| SQL_IDENTIFIER_def userRole;
|
| short accessMode;
|
| short autoCommit;
|
| unsigned long queryTimeoutSec;
|
| unsigned long idleTimeoutSec;
|
| unsigned long loginTimeoutSec;
|
| short txnIsolationLevel;
|
| short rowSetSize;
|
| long diagnosticFlag;
|
| unsigned long processId;
|
| char computerName[MAX_COMPUTERNAME_LENGTH*4+1];
|
| string windowText;
|
| // locale sensitive data (for language and code pages)
|
| unsigned long ctxACP;
|
| unsigned long ctxDataLang;
|
| unsigned long ctxErrorLang;
|
| short ctxCtrlInferNCHAR;
|
| short cpuToUse; // CPU to use or if cpuToUseEnd is not -1 the start of the range of CPU's to use
|
| short cpuToUseEnd;
|
| char clientVproc[100+1]; // Driver vproc String
|
| string connectOptions; // General name/value options pair for future use
|
| VERSION_LIST_def clientVersionList;
|
| unsigned long inContextOptions1;
|
| unsigned long inContextOptions2;
|
| char sessionName[SQL_MAX_SESSIONNAME_LEN*4+1];
|
| string clientUserName;
|
| } CONNECTION_CONTEXT_def;
|
|
|
|
|
| typedef struct OUT_CONNECTION_CONTEXT_t {
|
| VERSION_LIST_def versionList;
|
| short nodeId;
|
| unsigned long processId;
|
| char computerName[MAX_COMPUTERNAME_LENGTH*4+1];
|
| SQL_IDENTIFIER_def catalog;
|
| SQL_IDENTIFIER_def schema;
|
| unsigned long outContextOptions1;
|
| unsigned long outContextOptions2;
|
| unsigned long outContextOptionStringLen;
|
| string outContextOptionString;
|
| } OUT_CONNECTION_CONTEXT_def;
|
|
|
| //
|
| // Object reference
|
| //
|
| typedef char IDL_OBJECT_def[128];
|
|
|
| typedef struct GEN_Param_t {
|
| GEN_PARAM_TOKEN_def paramToken;
|
| GEN_PARAM_OPERATION_def paramOperation;
|
| GEN_PARAM_VALUE_def paramValue;
|
| } GEN_Param_def;
|
|
|
| typedef sequence<GEN_Param_def> GEN_ParamList_def;
|
|
|
| typedef struct RES_DESC_t {
|
| SQL_IDENTIFIER_def AttrNm;
|
| long long Limit;
|
| string Action;
|
| long Settable;
|
| } RES_DESC_def;
|
|
|
|
|
| typedef sequence<RES_DESC_def> RES_DESC_LIST_def;
|
|
|
| typedef struct ENV_DESC_t {
|
| long VarSeq;
|
| long VarType;
|
| string VarVal;
|
| } ENV_DESC_def;
|
|
|
| typedef sequence<ENV_DESC_def> ENV_DESC_LIST_def;
|
|
|
| typedef struct SRVR_CONTEXT_t
|
| {
|
| INTERVAL_NUM_def srvrIdleTimeout;
|
| INTERVAL_NUM_def connIdleTimeout;
|
| RES_DESC_LIST_def resDescList;
|
| ENV_DESC_LIST_def envDescList;
|
| } SRVR_CONTEXT_def;
|
|
|
| // Process Handle List
|
| //
|
| typedef short PROCESS_HANDLE_def[10];
|
|
|
| typedef sequence<PROCESS_HANDLE_def> PROCESS_HANDLE_List_def;
|
| //
|
| // Performance
|
| //
|
|
|
| #endif
|