1*f3cac8d6SAndrew Rist /************************************************************** 2*f3cac8d6SAndrew Rist * 3*f3cac8d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f3cac8d6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f3cac8d6SAndrew Rist * distributed with this work for additional information 6*f3cac8d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f3cac8d6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f3cac8d6SAndrew Rist * "License"); you may not use this file except in compliance 9*f3cac8d6SAndrew Rist * with the License. You may obtain a copy of the License at 10*f3cac8d6SAndrew Rist * 11*f3cac8d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f3cac8d6SAndrew Rist * 13*f3cac8d6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f3cac8d6SAndrew Rist * software distributed under the License is distributed on an 15*f3cac8d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f3cac8d6SAndrew Rist * KIND, either express or implied. See the License for the 17*f3cac8d6SAndrew Rist * specific language governing permissions and limitations 18*f3cac8d6SAndrew Rist * under the License. 19*f3cac8d6SAndrew Rist * 20*f3cac8d6SAndrew Rist *************************************************************/ 21*f3cac8d6SAndrew Rist 22cdf0e10cSrcweir #include "samplelib.hxx" 23cdf0e10cSrcweir #include <sal/types.h> 24cdf0e10cSrcweir /* 25cdf0e10cSrcweir 26cdf0e10cSrcweir 27cdf0e10cSrcweir */ 28cdf0e10cSrcweir 29cdf0e10cSrcweir extern "C" initSampleLibApi(void)30cdf0e10cSrcweirSampleLib_Api* SAL_CALL initSampleLibApi(void) 31cdf0e10cSrcweir { 32cdf0e10cSrcweir static SampleLib_Api aApi= {0,0}; 33cdf0e10cSrcweir if (!aApi.funcA) 34cdf0e10cSrcweir { 35cdf0e10cSrcweir aApi.funcA= &funcA; 36cdf0e10cSrcweir aApi.funcB= &funcB; 37cdf0e10cSrcweir return (&aApi); 38cdf0e10cSrcweir } 39cdf0e10cSrcweir else 40cdf0e10cSrcweir { 41cdf0e10cSrcweir return (&aApi); 42cdf0e10cSrcweir } 43cdf0e10cSrcweir 44cdf0e10cSrcweir } 45cdf0e10cSrcweir 46cdf0e10cSrcweir funcA(sal_Int32 a)47cdf0e10cSrcweirsal_Int32 SAL_CALL funcA( sal_Int32 a) 48cdf0e10cSrcweir { 49cdf0e10cSrcweir return a; 50cdf0e10cSrcweir } 51cdf0e10cSrcweir 52cdf0e10cSrcweir funcB(double a)53cdf0e10cSrcweirdouble SAL_CALL funcB( double a) 54cdf0e10cSrcweir { 55cdf0e10cSrcweir return a; 56cdf0e10cSrcweir } 57cdf0e10cSrcweir 58cdf0e10cSrcweir 59