1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _CONNECTIVITY_PROPERTYIDS_HXX_ 24 #define _CONNECTIVITY_PROPERTYIDS_HXX_ 25 26 // this define has to be set to split the names into different dll's or so's 27 // every dll has his own set of property names 28 #include <rtl/ustring.hxx> 29 #ifndef _MAP_ 30 #include <map> 31 #endif 32 #include "connectivity/dbtoolsdllapi.hxx" 33 34 namespace dbtools 35 { 36 class OOO_DLLPUBLIC_DBTOOLS OPropertyMap 37 { 38 ::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap; 39 40 ::rtl::OUString fillValue(sal_Int32 _nIndex); 41 public: 42 OPropertyMap() 43 { 44 } 45 ~OPropertyMap(); 46 ::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const; 47 }; 48 } 49 50 namespace connectivity 51 { 52 namespace CONNECTIVITY_PROPERTY_NAME_SPACE 53 { 54 typedef const sal_Char* (*PVFN)(); 55 56 struct OOO_DLLPUBLIC_DBTOOLS UStringDescription 57 { 58 const sal_Char* pZeroTerminatedName; 59 sal_Int32 nLength; 60 61 UStringDescription(PVFN _fCharFkt); 62 operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); } 63 ~UStringDescription(); 64 private: 65 UStringDescription(); 66 }; 67 } 68 } 69 70 71 //------------------------------------------------------------------------------ 72 #define DECL_PROP1IMPL(varname, type) \ 73 pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getCppuType(reinterpret_cast< type*>(NULL)), 74 //------------------------------------------------------------------------------ 75 #define DECL_PROP0(varname, type) \ 76 DECL_PROP1IMPL(varname, type) 0) 77 //------------------------------------------------------------------------------ 78 #define DECL_BOOL_PROP1IMPL(varname) \ 79 pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(), 80 //------------------------------------------------------------------------------ 81 #define DECL_BOOL_PROP0(varname) \ 82 DECL_BOOL_PROP1IMPL(varname) 0) 83 84 85 #define PROPERTY_ID_QUERYTIMEOUT 1 86 #define PROPERTY_ID_MAXFIELDSIZE 2 87 #define PROPERTY_ID_MAXROWS 3 88 #define PROPERTY_ID_CURSORNAME 4 89 #define PROPERTY_ID_RESULTSETCONCURRENCY 5 90 #define PROPERTY_ID_RESULTSETTYPE 6 91 #define PROPERTY_ID_FETCHDIRECTION 7 92 #define PROPERTY_ID_FETCHSIZE 8 93 #define PROPERTY_ID_ESCAPEPROCESSING 9 94 #define PROPERTY_ID_USEBOOKMARKS 10 95 // Column 96 #define PROPERTY_ID_NAME 11 97 #define PROPERTY_ID_TYPE 12 98 #define PROPERTY_ID_TYPENAME 13 99 #define PROPERTY_ID_PRECISION 14 100 #define PROPERTY_ID_SCALE 15 101 #define PROPERTY_ID_ISNULLABLE 16 102 #define PROPERTY_ID_ISAUTOINCREMENT 17 103 #define PROPERTY_ID_ISROWVERSION 18 104 #define PROPERTY_ID_DESCRIPTION 19 105 #define PROPERTY_ID_DEFAULTVALUE 20 106 107 #define PROPERTY_ID_REFERENCEDTABLE 21 108 #define PROPERTY_ID_UPDATERULE 22 109 #define PROPERTY_ID_DELETERULE 23 110 #define PROPERTY_ID_CATALOG 24 111 #define PROPERTY_ID_ISUNIQUE 25 112 #define PROPERTY_ID_ISPRIMARYKEYINDEX 26 113 #define PROPERTY_ID_ISCLUSTERED 27 114 #define PROPERTY_ID_ISASCENDING 28 115 #define PROPERTY_ID_SCHEMANAME 29 116 #define PROPERTY_ID_CATALOGNAME 30 117 118 #define PROPERTY_ID_COMMAND 31 119 #define PROPERTY_ID_CHECKOPTION 32 120 #define PROPERTY_ID_PASSWORD 33 121 #define PROPERTY_ID_RELATEDCOLUMN 34 122 123 #define PROPERTY_ID_FUNCTION 35 124 #define PROPERTY_ID_TABLENAME 36 125 #define PROPERTY_ID_REALNAME 37 126 #define PROPERTY_ID_DBASEPRECISIONCHANGED 38 127 #define PROPERTY_ID_ISCURRENCY 39 128 #define PROPERTY_ID_ISBOOKMARKABLE 40 129 130 #define PROPERTY_ID_INVALID_INDEX 41 131 #define PROPERTY_ID_HY010 43 132 #define PROPERTY_ID_LABEL 44 133 #define PROPERTY_ID_DELIMITER 45 134 #define PROPERTY_ID_FORMATKEY 46 135 #define PROPERTY_ID_LOCALE 47 136 #define PROPERTY_ID_IM001 48 137 138 #define PROPERTY_ID_AUTOINCREMENTCREATION 49 139 140 #define PROPERTY_ID_PRIVILEGES 50 141 #define PROPERTY_ID_HAVINGCLAUSE 51 142 143 #define PROPERTY_ID_ISSIGNED 52 144 #define PROPERTY_ID_AGGREGATEFUNCTION 53 145 #define PROPERTY_ID_ISSEARCHABLE 54 146 147 #define PROPERTY_ID_APPLYFILTER 55 148 #define PROPERTY_ID_FILTER 56 149 #define PROPERTY_ID_MASTERFIELDS 57 150 #define PROPERTY_ID_DETAILFIELDS 58 151 #define PROPERTY_ID_FIELDTYPE 59 152 #define PROPERTY_ID_VALUE 60 153 #define PROPERTY_ID_ACTIVE_CONNECTION 61 154 155 #endif // _CONNECTIVITY_PROPERTYIDS_HXX_ 156