1*08d9396cSAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*08d9396cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*08d9396cSAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*08d9396cSAndrew Rist * distributed with this work for additional information
6*08d9396cSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*08d9396cSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*08d9396cSAndrew Rist * "License"); you may not use this file except in compliance
9*08d9396cSAndrew Rist * with the License.  You may obtain a copy of the License at
10*08d9396cSAndrew Rist *
11*08d9396cSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*08d9396cSAndrew Rist *
13*08d9396cSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*08d9396cSAndrew Rist * software distributed under the License is distributed on an
15*08d9396cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*08d9396cSAndrew Rist * KIND, either express or implied.  See the License for the
17*08d9396cSAndrew Rist * specific language governing permissions and limitations
18*08d9396cSAndrew Rist * under the License.
19*08d9396cSAndrew Rist *
20*08d9396cSAndrew Rist *************************************************************/
21*08d9396cSAndrew Rist
22*08d9396cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef ADABASUI_STRINGCONSTANTS_HRC_
25cdf0e10cSrcweir#define ADABASUI_STRINGCONSTANTS_HRC_
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef STRINGCONSTANTS_INCLUDED_INDIRECT
28cdf0e10cSrcweir#error "don't include this file directly! use adabasuistrings.hrc instead!"
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef _SAL_TYPES_H_
32cdf0e10cSrcweir#include <sal/types.h>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir#ifndef _RTL_USTRING_HXX_
35cdf0e10cSrcweir#include <rtl/ustring.hxx>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir//============================================================
39cdf0e10cSrcweir//= a helper for static ascii pseudo-unicode strings
40cdf0e10cSrcweir//============================================================
41cdf0e10cSrcweir// string constants
42cdf0e10cSrcweirstruct _ConstAsciiString_
43cdf0e10cSrcweir{
44cdf0e10cSrcweir	sal_Int32 length;
45cdf0e10cSrcweir	sal_Char  const* str;
46cdf0e10cSrcweir
47cdf0e10cSrcweir	operator ::rtl::OUString () const { return ::rtl::OUString(str, length, RTL_TEXTENCODING_ASCII_US); }
48cdf0e10cSrcweir	operator const sal_Char* () const { return str; }
49cdf0e10cSrcweir};
50cdf0e10cSrcweir
51cdf0e10cSrcweir#define DECLARE_CONSTASCII_USTRING( name ) \
52cdf0e10cSrcweir	extern _ConstAsciiString_ const name
53cdf0e10cSrcweir
54cdf0e10cSrcweir#define IMPLEMENT_CONSTASCII_USTRING( name, string ) \
55cdf0e10cSrcweir	_ConstAsciiString_ const name = { sizeof(string)-1, string }
56cdf0e10cSrcweir
57cdf0e10cSrcweir//============================================================
58cdf0e10cSrcweir//= property ids
59cdf0e10cSrcweir//============================================================
60cdf0e10cSrcweir
61cdf0e10cSrcweir#define PROPERTY_ID_CREATECATALOG			3
62cdf0e10cSrcweir#define PROPERTY_ID_DATABASENAME			4
63cdf0e10cSrcweir#define PROPERTY_ID_CONTROL_USER			5
64cdf0e10cSrcweir#define PROPERTY_ID_CONTROL_PASSWORD		6
65cdf0e10cSrcweir#define PROPERTY_ID_USER					7
66cdf0e10cSrcweir#define PROPERTY_ID_PASSWORD				8
67cdf0e10cSrcweir#define PROPERTY_ID_CACHESIZE				9
68cdf0e10cSrcweir
69cdf0e10cSrcweir//============================================================
70cdf0e10cSrcweir//= property names
71cdf0e10cSrcweir//============================================================
72cdf0e10cSrcweir
73cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_CREATECATALOG);
74cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_DATABASENAME);
75cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_USER);
76cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_USER);
77cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD);
78cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE);
79cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG);
80cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE);
81cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_BACKUPNAME);
82cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_PASSWORD);
83cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE);
84cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT);
85cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE);
86cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD);
87cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE);
88cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE);
89cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(PROPERTY_SHUTDOWN);
90cdf0e10cSrcweir
91cdf0e10cSrcweir//============================================================
92cdf0e10cSrcweir//= SQLSTATE
93cdf0e10cSrcweir//============================================================
94cdf0e10cSrcweirDECLARE_CONSTASCII_USTRING(SQLSTATE_GENERAL);
95cdf0e10cSrcweir
96cdf0e10cSrcweir
97cdf0e10cSrcweir#endif // ADABASUI_STRINGCONSTANTS_HRC_
98cdf0e10cSrcweir
99cdf0e10cSrcweir
100