1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef ADABASUI_STRINGCONSTANTS_HRC_
29#define ADABASUI_STRINGCONSTANTS_HRC_
30
31#ifndef STRINGCONSTANTS_INCLUDED_INDIRECT
32#error "don't include this file directly! use adabasuistrings.hrc instead!"
33#endif
34
35#ifndef _SAL_TYPES_H_
36#include <sal/types.h>
37#endif
38#ifndef _RTL_USTRING_HXX_
39#include <rtl/ustring.hxx>
40#endif
41
42//============================================================
43//= a helper for static ascii pseudo-unicode strings
44//============================================================
45// string constants
46struct _ConstAsciiString_
47{
48	sal_Int32 length;
49	sal_Char  const* str;
50
51	operator ::rtl::OUString () const { return ::rtl::OUString(str, length, RTL_TEXTENCODING_ASCII_US); }
52	operator const sal_Char* () const { return str; }
53};
54
55#define DECLARE_CONSTASCII_USTRING( name ) \
56	extern _ConstAsciiString_ const name
57
58#define IMPLEMENT_CONSTASCII_USTRING( name, string ) \
59	_ConstAsciiString_ const name = { sizeof(string)-1, string }
60
61//============================================================
62//= property ids
63//============================================================
64
65#define PROPERTY_ID_CREATECATALOG			3
66#define PROPERTY_ID_DATABASENAME			4
67#define PROPERTY_ID_CONTROL_USER			5
68#define PROPERTY_ID_CONTROL_PASSWORD		6
69#define PROPERTY_ID_USER					7
70#define PROPERTY_ID_PASSWORD				8
71#define PROPERTY_ID_CACHESIZE				9
72
73//============================================================
74//= property names
75//============================================================
76
77DECLARE_CONSTASCII_USTRING(PROPERTY_CREATECATALOG);
78DECLARE_CONSTASCII_USTRING(PROPERTY_DATABASENAME);
79DECLARE_CONSTASCII_USTRING(PROPERTY_USER);
80DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_USER);
81DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD);
82DECLARE_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE);
83DECLARE_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG);
84DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE);
85DECLARE_CONSTASCII_USTRING(PROPERTY_BACKUPNAME);
86DECLARE_CONSTASCII_USTRING(PROPERTY_PASSWORD);
87DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE);
88DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT);
89DECLARE_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE);
90DECLARE_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD);
91DECLARE_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE);
92DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE);
93DECLARE_CONSTASCII_USTRING(PROPERTY_SHUTDOWN);
94
95//============================================================
96//= SQLSTATE
97//============================================================
98DECLARE_CONSTASCII_USTRING(SQLSTATE_GENERAL);
99
100
101#endif // ADABASUI_STRINGCONSTANTS_HRC_
102
103
104