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 24 #ifndef _CONNECTIVITY_PROPERTYIDS_HXX_ 25 #define _CONNECTIVITY_PROPERTYIDS_HXX_ 26 27 // this define has to be set to split the names into different dll's or so's 28 // every dll has his own set of property names 29 #include <rtl/ustring.hxx> 30 #ifndef _MAP_ 31 #include <map> 32 #endif 33 34 namespace connectivity 35 { 36 namespace skeleton 37 { 38 class OPropertyMap 39 { 40 ::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap; 41 42 ::rtl::OUString fillValue(sal_Int32 _nIndex); 43 public: OPropertyMap()44 OPropertyMap() 45 { 46 } 47 ~OPropertyMap(); 48 ::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const; 49 getPropMap()50 static OPropertyMap& getPropMap() 51 { 52 static OPropertyMap s_aPropMap; 53 return s_aPropMap; 54 } 55 }; 56 57 58 59 typedef const sal_Char* (*PVFN)(); 60 61 struct UStringDescription 62 { 63 const sal_Char* pZeroTerminatedName; 64 sal_Int32 nLength; 65 66 UStringDescription(PVFN _fCharFkt); operator ::rtl::OUStringconnectivity::skeleton::UStringDescription67 operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); } 68 ~UStringDescription(); 69 private: 70 UStringDescription(); 71 }; 72 } 73 } 74 75 76 //------------------------------------------------------------------------------ 77 #define DECL_PROP1IMPL(varname, type) \ 78 pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::cppu::UnoType< type >::get(), 79 //------------------------------------------------------------------------------ 80 #define DECL_PROP0(varname, type) \ 81 DECL_PROP1IMPL(varname, type) 0) 82 //------------------------------------------------------------------------------ 83 #define DECL_BOOL_PROP1IMPL(varname) \ 84 pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(), 85 //------------------------------------------------------------------------------ 86 #define DECL_BOOL_PROP0(varname) \ 87 DECL_BOOL_PROP1IMPL(varname) 0) 88 89 90 #define PROPERTY_ID_QUERYTIMEOUT 1 91 #define PROPERTY_ID_MAXFIELDSIZE 2 92 #define PROPERTY_ID_MAXROWS 3 93 #define PROPERTY_ID_CURSORNAME 4 94 #define PROPERTY_ID_RESULTSETCONCURRENCY 5 95 #define PROPERTY_ID_RESULTSETTYPE 6 96 #define PROPERTY_ID_FETCHDIRECTION 7 97 #define PROPERTY_ID_FETCHSIZE 8 98 #define PROPERTY_ID_ESCAPEPROCESSING 9 99 #define PROPERTY_ID_USEBOOKMARKS 10 100 // Column 101 #define PROPERTY_ID_NAME 11 102 #define PROPERTY_ID_TYPE 12 103 #define PROPERTY_ID_TYPENAME 13 104 #define PROPERTY_ID_PRECISION 14 105 #define PROPERTY_ID_SCALE 15 106 #define PROPERTY_ID_ISNULLABLE 16 107 #define PROPERTY_ID_ISAUTOINCREMENT 17 108 #define PROPERTY_ID_ISROWVERSION 18 109 #define PROPERTY_ID_DESCRIPTION 19 110 #define PROPERTY_ID_DEFAULTVALUE 20 111 112 #define PROPERTY_ID_REFERENCEDTABLE 21 113 #define PROPERTY_ID_UPDATERULE 22 114 #define PROPERTY_ID_DELETERULE 23 115 #define PROPERTY_ID_CATALOG 24 116 #define PROPERTY_ID_ISUNIQUE 25 117 #define PROPERTY_ID_ISPRIMARYKEYINDEX 26 118 #define PROPERTY_ID_ISCLUSTERED 27 119 #define PROPERTY_ID_ISASCENDING 28 120 #define PROPERTY_ID_SCHEMANAME 29 121 #define PROPERTY_ID_CATALOGNAME 30 122 123 #define PROPERTY_ID_COMMAND 31 124 #define PROPERTY_ID_CHECKOPTION 32 125 #define PROPERTY_ID_PASSWORD 33 126 #define PROPERTY_ID_RELATEDCOLUMN 34 127 128 #define PROPERTY_ID_FUNCTION 35 129 #define PROPERTY_ID_TABLENAME 36 130 #define PROPERTY_ID_REALNAME 37 131 #define PROPERTY_ID_DBASEPRECISIONCHANGED 38 132 #define PROPERTY_ID_ISCURRENCY 39 133 #define PROPERTY_ID_ISBOOKMARKABLE 40 134 135 #define PROPERTY_ID_INVALID_INDEX 41 136 #define PROPERTY_ID_ERRORMSG_SEQUENCE 42 137 #define PROPERTY_ID_HY010 43 138 #define PROPERTY_ID_HY0000 44 139 #define PROPERTY_ID_DELIMITER 45 140 #define PROPERTY_ID_FORMATKEY 46 141 #define PROPERTY_ID_LOCALE 47 142 #define PROPERTY_ID_IM001 48 143 144 #define PROPERTY_ID_AUTOINCREMENTCREATION 49 145 146 #define PROPERTY_ID_PRIVILEGES 50 147 148 #endif // _CONNECTIVITY_PROPERTYIDS_HXX_ 149 150 151