1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
21 #define _CONNECTIVITY_PROPERTYIDS_HXX_
23 // this define has to be set to split the names into different dll's or so's
24 // every dll has his own set of property names
26 #include <rtl/ustring.hxx>
32 namespace connectivity
38 ::std::map
<sal_Int32
, rtl_uString
*> m_aPropertyMap
;
40 ::rtl::OUString
fillValue(sal_Int32 _nIndex
);
46 ::rtl::OUString
getNameByIndex(sal_Int32 _nIndex
) const;
48 static OPropertyMap
& getPropMap()
50 static OPropertyMap s_aPropMap
;
56 typedef const sal_Char
* (*PVFN
)();
58 struct UStringDescription
60 const sal_Char
* pZeroTerminatedName
;
63 UStringDescription(PVFN _fCharFkt
);
64 operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName
,nLength
,RTL_TEXTENCODING_ASCII_US
); }
65 ~UStringDescription();
73 PROPERTY_ID_FIRST
= 0,
74 PROPERTY_ID_QUERYTIMEOUT
,
75 PROPERTY_ID_MAXFIELDSIZE
,
77 PROPERTY_ID_CURSORNAME
,
78 PROPERTY_ID_RESULTSETCONCURRENCY
,
79 PROPERTY_ID_RESULTSETTYPE
,
80 PROPERTY_ID_FETCHDIRECTION
,
81 PROPERTY_ID_FETCHSIZE
,
82 PROPERTY_ID_ESCAPEPROCESSING
,
83 PROPERTY_ID_USEBOOKMARKS
,
88 PROPERTY_ID_PRECISION
,
90 PROPERTY_ID_ISNULLABLE
,
91 PROPERTY_ID_ISAUTOINCREMENT
,
92 PROPERTY_ID_ISROWVERSION
,
93 PROPERTY_ID_DESCRIPTION
,
94 PROPERTY_ID_DEFAULTVALUE
,
96 PROPERTY_ID_REFERENCEDTABLE
,
97 PROPERTY_ID_UPDATERULE
,
98 PROPERTY_ID_DELETERULE
,
100 PROPERTY_ID_ISUNIQUE
,
101 PROPERTY_ID_ISPRIMARYKEYINDEX
,
102 PROPERTY_ID_ISCLUSTERED
,
103 PROPERTY_ID_ISASCENDING
,
104 PROPERTY_ID_SCHEMANAME
,
105 PROPERTY_ID_CATALOGNAME
,
108 PROPERTY_ID_CHECKOPTION
,
109 PROPERTY_ID_PASSWORD
,
110 PROPERTY_ID_RELATEDCOLUMN
,
112 PROPERTY_ID_FUNCTION
,
113 PROPERTY_ID_TABLENAME
,
114 PROPERTY_ID_REALNAME
,
115 PROPERTY_ID_DBASEPRECISIONCHANGED
,
116 PROPERTY_ID_ISCURRENCY
,
117 PROPERTY_ID_ISBOOKMARKABLE
,
119 PROPERTY_ID_INVALID_INDEX
,
120 PROPERTY_ID_ERRORMSG_SEQUENCE
,
123 PROPERTY_ID_DELIMITER
,
124 PROPERTY_ID_FORMATKEY
,
128 PROPERTY_ID_AUTOINCREMENTCREATION
,
130 PROPERTY_ID_PRIVILEGES
,
137 //------------------------------------------------------------------------------
138 #define DECL_PROP1IMPL(varname, type) \
139 pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getCppuType(static_cast< type*>(0)),
140 //------------------------------------------------------------------------------
141 #define DECL_PROP0(varname, type) \
142 DECL_PROP1IMPL(varname, type) 0)
143 //------------------------------------------------------------------------------
144 #define DECL_BOOL_PROP1IMPL(varname) \
145 pProperties[nPos++] = Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
146 //------------------------------------------------------------------------------
147 #define DECL_BOOL_PROP0(varname) \
148 DECL_BOOL_PROP1IMPL(varname) 0)
152 #endif // _CONNECTIVITY_PROPERTYIDS_HXX_
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */