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 #if !defined INCLUDED_JFW_PLUGIN_VENDORLIST_HXX
24 #define INCLUDED_JFW_PLUGIN_VENDORLIST_HXX
25 
26 #include "rtl/ref.hxx"
27 #include "vendorbase.hxx"
28 #include "com/sun/star/uno/Sequence.hxx"
29 
30 namespace jfw_plugin
31 {
32 
33 //extern VendorSupportMapEntry gVendorMap[];
34 
35 typedef char  const * const * (* getJavaExePaths_func)(int*);
36 typedef rtl::Reference<VendorBase> (* createInstance_func) ();
37 
38 // struct Blas
39 // {
40 //         char const * sVendorName;
41 //     getJavaExePaths_func getJavaFunc;
42 //     createInstance_func  createFunc;
43 // };
44 
45 struct VendorSupportMapEntry
46 {
47     char const * sVendorName;
48     getJavaExePaths_func getJavaFunc;
49     createInstance_func  createFunc;
50 };
51 
52 #define BEGIN_VENDOR_MAP() \
53 VendorSupportMapEntry gVendorMap[] ={
54 
55 #define VENDOR_MAP_ENTRY(x,y) \
56     {x, & y::getJavaExePaths, & y::createInstance},
57 
58 #define END_VENDOR_MAP() \
59     {NULL, NULL, NULL} };
60 
61 
62 com::sun::star::uno::Sequence<rtl::OUString> getVendorNames();
63 
64 /* Examines if the vendor supplied in parameter sVendor is part of the
65    list of supported vendors. That is the arry of VendorSupportMapEntry
66    is search for an respective entry.
67 */
68 bool isVendorSupported(const rtl::OUString & sVendor);
69 }
70 
71 #endif
72