1*5ac42e1fSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*5ac42e1fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*5ac42e1fSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*5ac42e1fSAndrew Rist * distributed with this work for additional information 6*5ac42e1fSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*5ac42e1fSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*5ac42e1fSAndrew Rist * "License"); you may not use this file except in compliance 9*5ac42e1fSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*5ac42e1fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*5ac42e1fSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*5ac42e1fSAndrew Rist * software distributed under the License is distributed on an 15*5ac42e1fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*5ac42e1fSAndrew Rist * KIND, either express or implied. See the License for the 17*5ac42e1fSAndrew Rist * specific language governing permissions and limitations 18*5ac42e1fSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*5ac42e1fSAndrew Rist *************************************************************/ 21*5ac42e1fSAndrew Rist 22*5ac42e1fSAndrew Rist 23cdf0e10cSrcweir #if !defined INCLUDED_JFW_PLUGIN_VENDORLIST_HXX 24cdf0e10cSrcweir #define INCLUDED_JFW_PLUGIN_VENDORLIST_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "rtl/ref.hxx" 27cdf0e10cSrcweir #include "vendorbase.hxx" 28cdf0e10cSrcweir #include "com/sun/star/uno/Sequence.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir namespace jfw_plugin 31cdf0e10cSrcweir { 32cdf0e10cSrcweir 33cdf0e10cSrcweir //extern VendorSupportMapEntry gVendorMap[]; 34cdf0e10cSrcweir 35cdf0e10cSrcweir typedef char const * const * (* getJavaExePaths_func)(int*); 36cdf0e10cSrcweir typedef rtl::Reference<VendorBase> (* createInstance_func) (); 37cdf0e10cSrcweir 38cdf0e10cSrcweir // struct Blas 39cdf0e10cSrcweir // { 40cdf0e10cSrcweir // char const * sVendorName; 41cdf0e10cSrcweir // getJavaExePaths_func getJavaFunc; 42cdf0e10cSrcweir // createInstance_func createFunc; 43cdf0e10cSrcweir // }; 44cdf0e10cSrcweir 45cdf0e10cSrcweir struct VendorSupportMapEntry 46cdf0e10cSrcweir { 47cdf0e10cSrcweir char const * sVendorName; 48cdf0e10cSrcweir getJavaExePaths_func getJavaFunc; 49cdf0e10cSrcweir createInstance_func createFunc; 50cdf0e10cSrcweir }; 51cdf0e10cSrcweir 52cdf0e10cSrcweir #define BEGIN_VENDOR_MAP() \ 53cdf0e10cSrcweir VendorSupportMapEntry gVendorMap[] ={ 54cdf0e10cSrcweir 55cdf0e10cSrcweir #define VENDOR_MAP_ENTRY(x,y) \ 56cdf0e10cSrcweir {x, & y::getJavaExePaths, & y::createInstance}, 57cdf0e10cSrcweir 58cdf0e10cSrcweir #define END_VENDOR_MAP() \ 59cdf0e10cSrcweir {NULL, NULL, NULL} }; 60cdf0e10cSrcweir 61cdf0e10cSrcweir 62cdf0e10cSrcweir com::sun::star::uno::Sequence<rtl::OUString> getVendorNames(); 63cdf0e10cSrcweir 64cdf0e10cSrcweir /* Examines if the vendor supplied in parameter sVendor is part of the 65cdf0e10cSrcweir list of supported vendors. That is the arry of VendorSupportMapEntry 66cdf0e10cSrcweir is search for an respective entry. 67cdf0e10cSrcweir */ 68cdf0e10cSrcweir bool isVendorSupported(const rtl::OUString & sVendor); 69cdf0e10cSrcweir } 70cdf0e10cSrcweir 71cdf0e10cSrcweir #endif 72