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