1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
28*cdf0e10cSrcweir #define _CONNECTIVITY_PROPERTYIDS_HXX_
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir // this define has to be set to split the names into different dll's or so's
31*cdf0e10cSrcweir // every dll has his own set of property names
32*cdf0e10cSrcweir #include <rtl/ustring.hxx>
33*cdf0e10cSrcweir #ifndef _MAP_
34*cdf0e10cSrcweir #include <map>
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir #include "connectivity/dbtoolsdllapi.hxx"
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir namespace dbtools
39*cdf0e10cSrcweir {
40*cdf0e10cSrcweir 	class OOO_DLLPUBLIC_DBTOOLS OPropertyMap
41*cdf0e10cSrcweir 	{
42*cdf0e10cSrcweir 		::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap;
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir 		::rtl::OUString fillValue(sal_Int32 _nIndex);
45*cdf0e10cSrcweir 	public:
46*cdf0e10cSrcweir 		OPropertyMap()
47*cdf0e10cSrcweir 		{
48*cdf0e10cSrcweir 		}
49*cdf0e10cSrcweir 		~OPropertyMap();
50*cdf0e10cSrcweir 		::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const;
51*cdf0e10cSrcweir 	};
52*cdf0e10cSrcweir }
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir namespace connectivity
55*cdf0e10cSrcweir {
56*cdf0e10cSrcweir 	namespace CONNECTIVITY_PROPERTY_NAME_SPACE
57*cdf0e10cSrcweir 	{
58*cdf0e10cSrcweir 		typedef const sal_Char* (*PVFN)();
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 		struct OOO_DLLPUBLIC_DBTOOLS UStringDescription
61*cdf0e10cSrcweir 		{
62*cdf0e10cSrcweir 			const sal_Char*	pZeroTerminatedName;
63*cdf0e10cSrcweir 			sal_Int32 nLength;
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir 			UStringDescription(PVFN _fCharFkt);
66*cdf0e10cSrcweir 			operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); }
67*cdf0e10cSrcweir 			~UStringDescription();
68*cdf0e10cSrcweir 		private:
69*cdf0e10cSrcweir 			UStringDescription();
70*cdf0e10cSrcweir 		};
71*cdf0e10cSrcweir 	}
72*cdf0e10cSrcweir }
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir //------------------------------------------------------------------------------
76*cdf0e10cSrcweir #define DECL_PROP1IMPL(varname, type) \
77*cdf0e10cSrcweir pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getCppuType(reinterpret_cast< type*>(NULL)),
78*cdf0e10cSrcweir //------------------------------------------------------------------------------
79*cdf0e10cSrcweir #define DECL_PROP0(varname, type)	\
80*cdf0e10cSrcweir 	DECL_PROP1IMPL(varname, type) 0)
81*cdf0e10cSrcweir //------------------------------------------------------------------------------
82*cdf0e10cSrcweir #define DECL_BOOL_PROP1IMPL(varname) \
83*cdf0e10cSrcweir         pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
84*cdf0e10cSrcweir //------------------------------------------------------------------------------
85*cdf0e10cSrcweir #define DECL_BOOL_PROP0(varname)	\
86*cdf0e10cSrcweir 	DECL_BOOL_PROP1IMPL(varname) 0)
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir #define PROPERTY_ID_QUERYTIMEOUT					1
90*cdf0e10cSrcweir #define PROPERTY_ID_MAXFIELDSIZE					2
91*cdf0e10cSrcweir #define PROPERTY_ID_MAXROWS							3
92*cdf0e10cSrcweir #define PROPERTY_ID_CURSORNAME						4
93*cdf0e10cSrcweir #define PROPERTY_ID_RESULTSETCONCURRENCY			5
94*cdf0e10cSrcweir #define PROPERTY_ID_RESULTSETTYPE					6
95*cdf0e10cSrcweir #define PROPERTY_ID_FETCHDIRECTION					7
96*cdf0e10cSrcweir #define PROPERTY_ID_FETCHSIZE						8
97*cdf0e10cSrcweir #define PROPERTY_ID_ESCAPEPROCESSING				9
98*cdf0e10cSrcweir #define PROPERTY_ID_USEBOOKMARKS					10
99*cdf0e10cSrcweir // Column
100*cdf0e10cSrcweir #define PROPERTY_ID_NAME							11
101*cdf0e10cSrcweir #define PROPERTY_ID_TYPE							12
102*cdf0e10cSrcweir #define PROPERTY_ID_TYPENAME						13
103*cdf0e10cSrcweir #define PROPERTY_ID_PRECISION						14
104*cdf0e10cSrcweir #define PROPERTY_ID_SCALE							15
105*cdf0e10cSrcweir #define PROPERTY_ID_ISNULLABLE						16
106*cdf0e10cSrcweir #define PROPERTY_ID_ISAUTOINCREMENT					17
107*cdf0e10cSrcweir #define PROPERTY_ID_ISROWVERSION					18
108*cdf0e10cSrcweir #define PROPERTY_ID_DESCRIPTION						19
109*cdf0e10cSrcweir #define PROPERTY_ID_DEFAULTVALUE					20
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir #define PROPERTY_ID_REFERENCEDTABLE					21
112*cdf0e10cSrcweir #define PROPERTY_ID_UPDATERULE						22
113*cdf0e10cSrcweir #define PROPERTY_ID_DELETERULE						23
114*cdf0e10cSrcweir #define PROPERTY_ID_CATALOG							24
115*cdf0e10cSrcweir #define PROPERTY_ID_ISUNIQUE						25
116*cdf0e10cSrcweir #define PROPERTY_ID_ISPRIMARYKEYINDEX				26
117*cdf0e10cSrcweir #define PROPERTY_ID_ISCLUSTERED						27
118*cdf0e10cSrcweir #define PROPERTY_ID_ISASCENDING						28
119*cdf0e10cSrcweir #define PROPERTY_ID_SCHEMANAME						29
120*cdf0e10cSrcweir #define PROPERTY_ID_CATALOGNAME						30
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir #define PROPERTY_ID_COMMAND							31
123*cdf0e10cSrcweir #define PROPERTY_ID_CHECKOPTION						32
124*cdf0e10cSrcweir #define PROPERTY_ID_PASSWORD						33
125*cdf0e10cSrcweir #define PROPERTY_ID_RELATEDCOLUMN					34
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir #define PROPERTY_ID_FUNCTION           				35
128*cdf0e10cSrcweir #define PROPERTY_ID_TABLENAME          				36
129*cdf0e10cSrcweir #define PROPERTY_ID_REALNAME           				37
130*cdf0e10cSrcweir #define PROPERTY_ID_DBASEPRECISIONCHANGED			38
131*cdf0e10cSrcweir #define PROPERTY_ID_ISCURRENCY						39
132*cdf0e10cSrcweir #define PROPERTY_ID_ISBOOKMARKABLE					40
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir #define PROPERTY_ID_INVALID_INDEX					41
135*cdf0e10cSrcweir #define PROPERTY_ID_HY010							43
136*cdf0e10cSrcweir #define PROPERTY_ID_LABEL                           44
137*cdf0e10cSrcweir #define PROPERTY_ID_DELIMITER						45
138*cdf0e10cSrcweir #define PROPERTY_ID_FORMATKEY						46
139*cdf0e10cSrcweir #define PROPERTY_ID_LOCALE							47
140*cdf0e10cSrcweir #define PROPERTY_ID_IM001							48
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir #define PROPERTY_ID_AUTOINCREMENTCREATION			49
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir #define PROPERTY_ID_PRIVILEGES						50
145*cdf0e10cSrcweir #define PROPERTY_ID_HAVINGCLAUSE					51
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir #define PROPERTY_ID_ISSIGNED						52
148*cdf0e10cSrcweir #define PROPERTY_ID_AGGREGATEFUNCTION				53
149*cdf0e10cSrcweir #define PROPERTY_ID_ISSEARCHABLE				    54
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir #define PROPERTY_ID_APPLYFILTER 				    55
152*cdf0e10cSrcweir #define PROPERTY_ID_FILTER				            56
153*cdf0e10cSrcweir #define PROPERTY_ID_MASTERFIELDS			        57
154*cdf0e10cSrcweir #define PROPERTY_ID_DETAILFIELDS			        58
155*cdf0e10cSrcweir #define PROPERTY_ID_FIELDTYPE			            59
156*cdf0e10cSrcweir #define PROPERTY_ID_VALUE       			        60
157*cdf0e10cSrcweir #define PROPERTY_ID_ACTIVE_CONNECTION               61
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir #endif // _CONNECTIVITY_PROPERTYIDS_HXX_
160