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 ADABASUI_STRINGCONSTANTS_HRC_
25#define ADABASUI_STRINGCONSTANTS_HRC_
26
27#ifndef STRINGCONSTANTS_INCLUDED_INDIRECT
28#error "don't include this file directly! use adabasuistrings.hrc instead!"
29#endif
30
31#ifndef _SAL_TYPES_H_
32#include <sal/types.h>
33#endif
34#ifndef _RTL_USTRING_HXX_
35#include <rtl/ustring.hxx>
36#endif
37
38//============================================================
39//= a helper for static ascii pseudo-unicode strings
40//============================================================
41// string constants
42struct _ConstAsciiString_
43{
44	sal_Int32 length;
45	sal_Char  const* str;
46
47	operator ::rtl::OUString () const { return ::rtl::OUString(str, length, RTL_TEXTENCODING_ASCII_US); }
48	operator const sal_Char* () const { return str; }
49};
50
51#define DECLARE_CONSTASCII_USTRING( name ) \
52	extern _ConstAsciiString_ const name
53
54#define IMPLEMENT_CONSTASCII_USTRING( name, string ) \
55	_ConstAsciiString_ const name = { sizeof(string)-1, string }
56
57//============================================================
58//= property ids
59//============================================================
60
61#define PROPERTY_ID_CREATECATALOG			3
62#define PROPERTY_ID_DATABASENAME			4
63#define PROPERTY_ID_CONTROL_USER			5
64#define PROPERTY_ID_CONTROL_PASSWORD		6
65#define PROPERTY_ID_USER					7
66#define PROPERTY_ID_PASSWORD				8
67#define PROPERTY_ID_CACHESIZE				9
68
69//============================================================
70//= property names
71//============================================================
72
73DECLARE_CONSTASCII_USTRING(PROPERTY_CREATECATALOG);
74DECLARE_CONSTASCII_USTRING(PROPERTY_DATABASENAME);
75DECLARE_CONSTASCII_USTRING(PROPERTY_USER);
76DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_USER);
77DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD);
78DECLARE_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE);
79DECLARE_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG);
80DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE);
81DECLARE_CONSTASCII_USTRING(PROPERTY_BACKUPNAME);
82DECLARE_CONSTASCII_USTRING(PROPERTY_PASSWORD);
83DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE);
84DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT);
85DECLARE_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE);
86DECLARE_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD);
87DECLARE_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE);
88DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE);
89DECLARE_CONSTASCII_USTRING(PROPERTY_SHUTDOWN);
90
91//============================================================
92//= SQLSTATE
93//============================================================
94DECLARE_CONSTASCII_USTRING(SQLSTATE_GENERAL);
95
96
97#endif // ADABASUI_STRINGCONSTANTS_HRC_
98
99
100