xref: /trunk/main/jvmfwk/source/elements.hxx (revision 870c3792)
15ac42e1fSAndrew Rist /**************************************************************
2*870c3792Smseidel  *
35ac42e1fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
45ac42e1fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
55ac42e1fSAndrew Rist  * distributed with this work for additional information
65ac42e1fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
75ac42e1fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
85ac42e1fSAndrew Rist  * "License"); you may not use this file except in compliance
95ac42e1fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*870c3792Smseidel  *
115ac42e1fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*870c3792Smseidel  *
135ac42e1fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
145ac42e1fSAndrew Rist  * software distributed under the License is distributed on an
155ac42e1fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165ac42e1fSAndrew Rist  * KIND, either express or implied.  See the License for the
175ac42e1fSAndrew Rist  * specific language governing permissions and limitations
185ac42e1fSAndrew Rist  * under the License.
19*870c3792Smseidel  *
205ac42e1fSAndrew Rist  *************************************************************/
215ac42e1fSAndrew Rist 
22cdf0e10cSrcweir #if !defined INCLUDED_JVMFWK_ELEMENTS_HXX
23cdf0e10cSrcweir #define INCLUDED_JVMFWK_ELEMENTS_HXX
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <vector>
26cdf0e10cSrcweir #include "jvmfwk/framework.h"
27cdf0e10cSrcweir #include "fwkutil.hxx"
28cdf0e10cSrcweir #include "rtl/ustring.hxx"
29cdf0e10cSrcweir #include "rtl/byteseq.hxx"
30cdf0e10cSrcweir #include "libxml/parser.h"
31cdf0e10cSrcweir #include "boost/optional.hpp"
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0"
34cdf0e10cSrcweir #define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance"
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace jfw
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 
39cdf0e10cSrcweir /** gets the value of the updated element from the javavendors.xml.
40cdf0e10cSrcweir  */
41cdf0e10cSrcweir rtl::OString getElementUpdated();
42cdf0e10cSrcweir 
43cdf0e10cSrcweir /** create the child elements within the root structure for each platform.
44cdf0e10cSrcweir 
45cdf0e10cSrcweir     @param bNeedsSave
46cdf0e10cSrcweir     [out]If true then the respective structure of elements was added and the
47cdf0e10cSrcweir     document needs to be saved.
48cdf0e10cSrcweir  */
49cdf0e10cSrcweir void createSettingsStructure(
50cdf0e10cSrcweir     xmlDoc * document, bool * bNeedsSave);
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 
53cdf0e10cSrcweir /** represents the settings saved in the /java/javaInfo element.
54cdf0e10cSrcweir     It is used within class NodeJava which determines the settings
55cdf0e10cSrcweir     file.
56cdf0e10cSrcweir */
57cdf0e10cSrcweir class CNodeJavaInfo
58cdf0e10cSrcweir {
59cdf0e10cSrcweir public:
60cdf0e10cSrcweir     CNodeJavaInfo();
61cdf0e10cSrcweir     ~CNodeJavaInfo();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     /** if true, then javaInfo is empty. When writeToNode is called
64cdf0e10cSrcweir         then all child elements are deleted.
65cdf0e10cSrcweir      */
66cdf0e10cSrcweir     bool m_bEmptyNode;
67cdf0e10cSrcweir     /** Contains the value of the <updated> element of
68cdf0e10cSrcweir         the javavendors.xml after loadFromNode was called.
69cdf0e10cSrcweir         It is not used, when the javaInfo node is written.
70cdf0e10cSrcweir         see writeToNode
71cdf0e10cSrcweir      */
72cdf0e10cSrcweir     ::rtl::OString sAttrVendorUpdate;
73cdf0e10cSrcweir     /** contains the nil value of the /java/javaInfo@xsi:nil attribute.
74cdf0e10cSrcweir         Default is true;
75cdf0e10cSrcweir      */
76cdf0e10cSrcweir     bool bNil;
77cdf0e10cSrcweir     /** contains the value of the /java/javaInfo@autoSelect attribute.
78cdf0e10cSrcweir         Default is true. If it is false then the user has modified the JRE
79cdf0e10cSrcweir         selection by actively choosing a JRE from the options dialog. That is,
80cdf0e10cSrcweir         the function jfw_setSelectedJRE was called. Contrary, the function
81cdf0e10cSrcweir         jfw_findAndSelectJRE sets the attribute to true.
82cdf0e10cSrcweir      */
83cdf0e10cSrcweir     bool bAutoSelect;
84cdf0e10cSrcweir     ::rtl::OUString sVendor;
85cdf0e10cSrcweir     ::rtl::OUString sLocation;
86cdf0e10cSrcweir     ::rtl::OUString sVersion;
87cdf0e10cSrcweir     sal_uInt64 nFeatures;
88cdf0e10cSrcweir     sal_uInt64 nRequirements;
89cdf0e10cSrcweir     ::rtl::ByteSequence arVendorData;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     /** reads the node /java/javaInfo.
92cdf0e10cSrcweir         If javaInfo@xsi:nil = true then member bNil is set to true
93cdf0e10cSrcweir         an no further elements are read.
94cdf0e10cSrcweir      */
95cdf0e10cSrcweir     void loadFromNode(xmlDoc * pDoc,xmlNode * pJavaInfo);
96*870c3792Smseidel     /** The attribute nil will be set to false. The function gets the value
97cdf0e10cSrcweir         javaSettings/updated from the javavendors.xml and writes it to
98cdf0e10cSrcweir         javaInfo@vendorUpdate in javasettings.xml
99cdf0e10cSrcweir      */
100cdf0e10cSrcweir     void writeToNode(xmlDoc * pDoc, xmlNode * pJavaInfo) const;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir     /** returns NULL if javaInfo is nil.
103cdf0e10cSrcweir      */
104cdf0e10cSrcweir     JavaInfo * makeJavaInfo() const;
105cdf0e10cSrcweir };
106cdf0e10cSrcweir 
107cdf0e10cSrcweir /** this class represents the java settings  based on a particular
108cdf0e10cSrcweir     settings file.
109cdf0e10cSrcweir 
110cdf0e10cSrcweir     Which settings file is used is determined by the value passed into the
111cdf0e10cSrcweir     constructo and the values of the bootstrap parameters UNO_JAVA_JFW_USER_DATA,
112cdf0e10cSrcweir     UNO_JAVA_JFW_SHARED_DATA,_JAVA_JFW_INSTALL_DATA.
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     If the value is USER_OR_INSTALL then it depends of the bootstrap parameter
115cdf0e10cSrcweir     UNO_JAVA_JFW_INSTALL_DATA. If it has as value then it is used. Otherwise the
116cdf0e10cSrcweir     value from UNO_JAVA_JFW_USER_DATA is used.
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     The method load reads the data from the settings file.
119cdf0e10cSrcweir     The method write stores the data into the settings file.
120cdf0e10cSrcweir  */
121cdf0e10cSrcweir class NodeJava
122cdf0e10cSrcweir {
123cdf0e10cSrcweir public:
124cdf0e10cSrcweir     enum Layer { USER_OR_INSTALL, USER, SHARED, INSTALL };
125cdf0e10cSrcweir private:
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     /** creates settings file and fills it with default values.
128cdf0e10cSrcweir 
129cdf0e10cSrcweir         When this function is called then it creates the
130a893be29SPedro Giffuni         settings file at the position determined by the bootstrap parameters
131cdf0e10cSrcweir         (UNO_JAVA_JFW_USER_DATA, UNO_JAVA_JFW_SHARED_DATA,
132cdf0e10cSrcweir         UNO_JAVA_JFW_INSTALL_DATA) and m_layer, unless the file already exists
133cdf0e10cSrcweir         (see createSettingsDocument).
134*870c3792Smseidel 
135cdf0e10cSrcweir         @return
136cdf0e10cSrcweir         JFW_E_CONFIG_READWRITE
137cdf0e10cSrcweir     */
138cdf0e10cSrcweir     void prepareSettingsDocument() const;
139cdf0e10cSrcweir 
140cdf0e10cSrcweir     /** helper function for prepareSettingsDocument.
141cdf0e10cSrcweir     */
142cdf0e10cSrcweir     void createSettingsDocument() const;
143*870c3792Smseidel 
144cdf0e10cSrcweir     /** returns the system path to the data file which is to be used. The value
1457950f2afSmseidel         depends on the member m_layer and the bootstrap parameters UNO_JAVA_JFW_USER_DATA,
146cdf0e10cSrcweir         UNO_JAVA_JFW_SHARED_DATA and UNO_JAVA_JFW_INSTALL_DATA which this may be.
147cdf0e10cSrcweir     */
148cdf0e10cSrcweir     ::rtl::OString getSettingsPath() const;
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     /** returns the file URL to the data file which is to be used. See getSettingsPath.
151*870c3792Smseidel     */
152cdf0e10cSrcweir     ::rtl::OUString getSettingsURL() const;
153cdf0e10cSrcweir 
154cdf0e10cSrcweir     /** Verifies if the respective settings file exist. In case UNO_JAVA_JFW_INSTALL_DATA
155cdf0e10cSrcweir         is used, the age is checked. If the file is too old then we assume that it does not
156cdf0e10cSrcweir         exist and wipe its contents. Then still FILE_DOES_NOT_EXIST is returned.
157cdf0e10cSrcweir      */
158cdf0e10cSrcweir     jfw::FileStatus checkSettingsFileStatus() const;
159*870c3792Smseidel 
160cdf0e10cSrcweir     /** Determines the layer for which the instance the loads and writes the
161cdf0e10cSrcweir         data.
162cdf0e10cSrcweir     */
163cdf0e10cSrcweir     Layer m_layer;
164cdf0e10cSrcweir 
165cdf0e10cSrcweir     /** User configurable option.  /java/enabled
166cdf0e10cSrcweir         If /java/enabled@xsi:nil == true then the value will be uninitialized
167cdf0e10cSrcweir         after a call to load().
168cdf0e10cSrcweir     */
169cdf0e10cSrcweir     boost::optional<sal_Bool> m_enabled;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir     /** User configurable option. /java/userClassPath
172cdf0e10cSrcweir         If /java/userClassPath@xsi:nil == true then the value is uninitialized
173cdf0e10cSrcweir         after a call to load().
174cdf0e10cSrcweir     */
175cdf0e10cSrcweir     boost::optional< ::rtl::OUString> m_userClassPath;
176cdf0e10cSrcweir     /** User configurable option.  /java/javaInfo
177cdf0e10cSrcweir         If /java/javaInfo@xsi:nil == true then the value is uninitialized
178cdf0e10cSrcweir         after a call to load.
179cdf0e10cSrcweir      */
180cdf0e10cSrcweir     boost::optional<CNodeJavaInfo> m_javaInfo;
181cdf0e10cSrcweir     /** User configurable option. /java/vmParameters
182cdf0e10cSrcweir         If /java/vmParameters@xsi:nil == true then the value is uninitialized
183cdf0e10cSrcweir         after a call to load.
184cdf0e10cSrcweir     */
185cdf0e10cSrcweir     boost::optional< ::std::vector< ::rtl::OUString> > m_vmParameters;
186cdf0e10cSrcweir     /** User configurable option. /java/jreLocations
187cdf0e10cSrcweir         If /java/jreLocaltions@xsi:nil == true then the value is uninitialized
188cdf0e10cSrcweir         after a call to load.
189cdf0e10cSrcweir     */
190cdf0e10cSrcweir     boost::optional< ::std::vector< ::rtl::OUString> > m_JRELocations;
191cdf0e10cSrcweir 
192cdf0e10cSrcweir     /** Only in INSTALL mode. Then NodeJava.write writes a <modified> element
193cdf0e10cSrcweir         which contains the seconds value of the TimeValue (osl/time.h), obtained
194cdf0e10cSrcweir         with osl_getSystemTime.
195cdf0e10cSrcweir         It returns 0 if the value cannot be obtained.
196cdf0e10cSrcweir         This is used to fix the problem that the modified time of the settings
197cdf0e10cSrcweir         file is incorrect because it resides on an NFS volume where the NFS
198cdf0e10cSrcweir         server and NFS client do not have the same system time. For example if
199cdf0e10cSrcweir         the server time is ahead of the client time then checkSettingsFileStatus
200cdf0e10cSrcweir         deleted the settings. So even if javaldx determined a Java
201cdf0e10cSrcweir         (jfw_findAndSelectJRE) then jfw_startVM returned a JFW_E_NO_SELECT. Then
202cdf0e10cSrcweir         it looked again for a java by calling jfw_findAndSelectJRE, which
203cdf0e10cSrcweir         returned a JFW_E_NONE. But the following jfw_startVM returned again
204cdf0e10cSrcweir         JFW_E_NO_SELECT. So it looped. (see issue i114509)
205cdf0e10cSrcweir 
206cdf0e10cSrcweir         NFS server and NFS client should have the same time. It is common
207*870c3792Smseidel         practice to enforce this in networks. We actually should not work
208cdf0e10cSrcweir         around a malconfigured network. We must however, make sure that we do
209cdf0e10cSrcweir         not loop. Maybe a better approach is, that:
210cdf0e10cSrcweir         - assume that mtime and system time are reliable
211cdf0e10cSrcweir         - checkSettingsFile uses system time and mtime of the settings file,
212cdf0e10cSrcweir         instset of using getModifiedTime.
213cdf0e10cSrcweir         - allow a small error margin
214cdf0e10cSrcweir         - jfw_startVM must return a JFW_E_EXPIRED_SETTINGS
215cdf0e10cSrcweir         - XJavaVM::startVM should prevent the loop by processing the new return+        value
216cdf0e10cSrcweir 
217cdf0e10cSrcweir     */
218cdf0e10cSrcweir     sal_uInt32 getModifiedTime() const;
219cdf0e10cSrcweir 
220cdf0e10cSrcweir public:
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     NodeJava(Layer theLayer = USER_OR_INSTALL);
223cdf0e10cSrcweir 
224cdf0e10cSrcweir     /** sets m_enabled.
225cdf0e10cSrcweir         /java/enabled@xsi:nil will be set to false when write is called.
226cdf0e10cSrcweir      */
227cdf0e10cSrcweir     void setEnabled(sal_Bool bEnabled);
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     /** sets m_sUserClassPath. See setEnabled.
230cdf0e10cSrcweir      */
231cdf0e10cSrcweir     void setUserClassPath(const ::rtl::OUString & sClassPath);
232cdf0e10cSrcweir 
233cdf0e10cSrcweir     /** sets m_aInfo. See setEnabled.
234cdf0e10cSrcweir         @param bAutoSelect
235cdf0e10cSrcweir         true- called by jfw_setSelectedJRE
236cdf0e10cSrcweir         false called by jfw_findAndSelectJRE
237cdf0e10cSrcweir      */
238cdf0e10cSrcweir     void setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect);
239cdf0e10cSrcweir 
240cdf0e10cSrcweir     /** sets the /java/vmParameters/param elements.
241cdf0e10cSrcweir         When this method all previous values are removed and replaced
242cdf0e10cSrcweir         by those in arParameters.
243cdf0e10cSrcweir         /java/vmParameters@xsi:nil will be set to true when write() is
244cdf0e10cSrcweir         called.
245cdf0e10cSrcweir      */
246cdf0e10cSrcweir     void setVmParameters(rtl_uString  * * arParameters, sal_Int32 size);
247cdf0e10cSrcweir 
248cdf0e10cSrcweir     /** sets the /java/jreLocations/location elements.
249cdf0e10cSrcweir         When this method is called then all previous values are removed
250cdf0e10cSrcweir         and replaced by those in arParamters.
251cdf0e10cSrcweir         /java/jreLocations@xsi:nil will be set to true write() is called.
252cdf0e10cSrcweir      */
253cdf0e10cSrcweir     void setJRELocations(rtl_uString  * * arParameters, sal_Int32 size);
254cdf0e10cSrcweir 
255cdf0e10cSrcweir     /** adds a location to the already existing locations.
256cdf0e10cSrcweir         Note: call load() before, then add the location and then call write().
257cdf0e10cSrcweir     */
258cdf0e10cSrcweir     void addJRELocation(rtl_uString * sLocation);
259cdf0e10cSrcweir 
260cdf0e10cSrcweir     /** writes the data to user settings.
261cdf0e10cSrcweir      */
262cdf0e10cSrcweir     void write() const;
263cdf0e10cSrcweir 
264cdf0e10cSrcweir     /** load the values of the settings file.
265cdf0e10cSrcweir      */
266cdf0e10cSrcweir     void load();
267cdf0e10cSrcweir 
268cdf0e10cSrcweir     /** returns the value of the element /java/enabled
269cdf0e10cSrcweir      */
270cdf0e10cSrcweir     const boost::optional<sal_Bool> & getEnabled() const;
271cdf0e10cSrcweir     /** returns the value of the element /java/userClassPath.
272cdf0e10cSrcweir      */
273cdf0e10cSrcweir     const boost::optional< ::rtl::OUString> & getUserClassPath() const;
274cdf0e10cSrcweir 
275cdf0e10cSrcweir     /** returns the value of the element /java/javaInfo.
276cdf0e10cSrcweir      */
277cdf0e10cSrcweir     const boost::optional<CNodeJavaInfo> & getJavaInfo() const;
278cdf0e10cSrcweir 
279cdf0e10cSrcweir     /** returns the parameters from the element /java/vmParameters/param.
280cdf0e10cSrcweir      */
281cdf0e10cSrcweir     const boost::optional< ::std::vector< ::rtl::OUString> > & getVmParameters() const;
282cdf0e10cSrcweir 
283cdf0e10cSrcweir     /** returns the parameters from the element /java/jreLocations/location.
284cdf0e10cSrcweir      */
285cdf0e10cSrcweir     const boost::optional< ::std::vector< ::rtl::OUString> > & getJRELocations() const;
286cdf0e10cSrcweir };
287cdf0e10cSrcweir 
288cdf0e10cSrcweir /** merges the settings for shared, user and installation during construction.
289*870c3792Smseidel     The class uses a simple merge mechanism for the javasettings.xml files in share and
290*870c3792Smseidel     user. The following elements completely overwrite the corresponding elements
291cdf0e10cSrcweir     from share:
292cdf0e10cSrcweir     /java/enabled
293cdf0e10cSrcweir     /java/userClassPath
294cdf0e10cSrcweir     /java/vmParameters
295cdf0e10cSrcweir     /java/jreLocations
296cdf0e10cSrcweir     /java/javaInfo
297cdf0e10cSrcweir 
298cdf0e10cSrcweir     In case of an installation, the shared and user settings are completely
299cdf0e10cSrcweir     disregarded.
300cdf0e10cSrcweir 
301cdf0e10cSrcweir     The locations of the different settings files is obtained through the
302cdf0e10cSrcweir     bootstrap variables:
303cdf0e10cSrcweir     UNO_JAVA_JFW_USER_DATA
304cdf0e10cSrcweir     UNO_JAVA_JFW_SHARED_DATA
305cdf0e10cSrcweir     UNO_JAVA_JFW_INSTALL_DATA
306cdf0e10cSrcweir 
307cdf0e10cSrcweir     The class also determines useful default values for settings which have not been made.
308cdf0e10cSrcweir */
309cdf0e10cSrcweir class MergedSettings
310cdf0e10cSrcweir {
311cdf0e10cSrcweir private:
312cdf0e10cSrcweir     const MergedSettings& operator = (MergedSettings&);
313cdf0e10cSrcweir     MergedSettings(MergedSettings&);
314cdf0e10cSrcweir 
315cdf0e10cSrcweir     void merge(const NodeJava & share, const NodeJava & user);
316cdf0e10cSrcweir 
317cdf0e10cSrcweir     sal_Bool m_bEnabled;
318cdf0e10cSrcweir 
319cdf0e10cSrcweir     ::rtl::OUString m_sClassPath;
320cdf0e10cSrcweir 
321cdf0e10cSrcweir     ::std::vector< ::rtl::OUString> m_vmParams;
322cdf0e10cSrcweir 
323cdf0e10cSrcweir     ::std::vector< ::rtl::OUString> m_JRELocations;
324*870c3792Smseidel 
325cdf0e10cSrcweir     CNodeJavaInfo m_javaInfo;
326cdf0e10cSrcweir 
327cdf0e10cSrcweir public:
328cdf0e10cSrcweir     MergedSettings();
329cdf0e10cSrcweir     virtual ~MergedSettings();
330cdf0e10cSrcweir 
331cdf0e10cSrcweir     /** the default is true.
332cdf0e10cSrcweir      */
333cdf0e10cSrcweir     sal_Bool getEnabled() const;
334cdf0e10cSrcweir 
335cdf0e10cSrcweir     const ::rtl::OUString & getUserClassPath() const;
336cdf0e10cSrcweir 
337cdf0e10cSrcweir     ::std::vector< ::rtl::OString> getVmParametersUtf8() const;
338cdf0e10cSrcweir     /** returns a JavaInfo structure representing the node
339cdf0e10cSrcweir         /java/javaInfo. Every time a new JavaInfo structure is created
340cdf0e10cSrcweir         which needs to be freed by the caller.
341cdf0e10cSrcweir         If both, user and share settings are nil, then NULL is returned.
342cdf0e10cSrcweir     */
343cdf0e10cSrcweir     JavaInfo * createJavaInfo() const;
344cdf0e10cSrcweir 
345cdf0e10cSrcweir     /** returns the value of the attribute /java/javaInfo[@vendorUpdate].
346cdf0e10cSrcweir      */
347cdf0e10cSrcweir     ::rtl::OString const & getJavaInfoAttrVendorUpdate() const;
348cdf0e10cSrcweir 
349cdf0e10cSrcweir #ifdef WNT
350cdf0e10cSrcweir     /** returns the javaInfo@autoSelect attribute.
351cdf0e10cSrcweir         Before calling this function loadFromSettings must be called.
352cdf0e10cSrcweir         It uses the javaInfo@autoSelect attribute  to determine
353cdf0e10cSrcweir         the return value;
354cdf0e10cSrcweir      */
355cdf0e10cSrcweir     bool getJavaInfoAttrAutoSelect() const;
356cdf0e10cSrcweir #endif
357cdf0e10cSrcweir 
358cdf0e10cSrcweir     /** returns an array.
359cdf0e10cSrcweir         Caller must free the strings and the array.
360cdf0e10cSrcweir      */
361cdf0e10cSrcweir     void getVmParametersArray(rtl_uString *** parParameters, sal_Int32 * size) const;
362cdf0e10cSrcweir 
363cdf0e10cSrcweir     /** returns an array.
364cdf0e10cSrcweir         Caller must free the strings and the array.
365cdf0e10cSrcweir      */
366cdf0e10cSrcweir     void getJRELocations(rtl_uString *** parLocations, sal_Int32 * size) const;
367cdf0e10cSrcweir 
368cdf0e10cSrcweir     const ::std::vector< ::rtl::OUString> & getJRELocations() const;
369cdf0e10cSrcweir };
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 
372cdf0e10cSrcweir class VersionInfo
373cdf0e10cSrcweir {
374cdf0e10cSrcweir     ::std::vector< ::rtl::OUString> vecExcludeVersions;
375cdf0e10cSrcweir     rtl_uString ** arVersions;
376cdf0e10cSrcweir 
377cdf0e10cSrcweir public:
378cdf0e10cSrcweir     VersionInfo();
379cdf0e10cSrcweir     ~VersionInfo();
380cdf0e10cSrcweir 
381cdf0e10cSrcweir     void addExcludeVersion(const ::rtl::OUString& sVersion);
382*870c3792Smseidel 
383cdf0e10cSrcweir     ::rtl::OUString sMinVersion;
384cdf0e10cSrcweir     ::rtl::OUString sMaxVersion;
385cdf0e10cSrcweir 
386cdf0e10cSrcweir     /** The caller DOES NOT get ownership of the strings. That is he
387cdf0e10cSrcweir         does not need to release the strings.
388cdf0e10cSrcweir         The array exists as long as this object exists.
389cdf0e10cSrcweir     */
390*870c3792Smseidel 
391cdf0e10cSrcweir     rtl_uString** getExcludeVersions();
392cdf0e10cSrcweir     sal_Int32 getExcludeVersionSize();
393cdf0e10cSrcweir };
394cdf0e10cSrcweir 
395cdf0e10cSrcweir struct PluginLibrary
396cdf0e10cSrcweir {
PluginLibraryjfw::PluginLibrary397cdf0e10cSrcweir     PluginLibrary()
398cdf0e10cSrcweir     {
399cdf0e10cSrcweir     }
PluginLibraryjfw::PluginLibrary400cdf0e10cSrcweir     PluginLibrary(rtl::OUString vendor,::rtl::OUString path) :
401cdf0e10cSrcweir         sVendor(vendor), sPath(path)
402cdf0e10cSrcweir     {
403cdf0e10cSrcweir     }
404cdf0e10cSrcweir     /** contains the vendor string which is later userd in the xml API
405cdf0e10cSrcweir      */
406cdf0e10cSrcweir     ::rtl::OUString sVendor;
407cdf0e10cSrcweir     /** File URL the plug-in library
408cdf0e10cSrcweir      */
409cdf0e10cSrcweir     ::rtl::OUString sPath;
410cdf0e10cSrcweir };
411cdf0e10cSrcweir 
412cdf0e10cSrcweir } //end namespace
413cdf0e10cSrcweir #endif
414