1 /******************************************************************************* 2 * Copyright 2011 See AUTHORS file. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16 17 package com.badlogic.gdx.jnigen; 18 19 import java.util.zip.ZipFile; 20 21 /** Interface used for overriding the way of finding a name of a shared library, for a specific platform. 22 * @author Rob Bogie <bogie.rob (at) gmail.com> */ 23 public interface SharedLibraryFinder { 24 /** @param sharedLibName The name of the shared lib that is asked to be loaded. 25 * @param is64Bit Whether the platform is 64 bit 26 * @param nativesJar A ZipFile object, which gives the ability to walk through the containing files, and allows for pattern 27 * matching. May be null if no zipfile is used. 28 * @return The name of the shared file, or null if none available */ 29 String getSharedLibraryNameWindows (String sharedLibName, boolean is64Bit, ZipFile nativesJar); 30 31 /** @param sharedLibName The name of the shared lib that is asked to be loaded. 32 * @param is64Bit Whether the platform is 64 bit 33 * @param isArm Whether the platform has the ARM architecture 34 * @param nativesJar A ZipFile object, which gives the ability to walk through the containing files, and allows for pattern 35 * matching. May be null if no zipfile is used. 36 * @return The name of the shared file, or null if none available */ 37 String getSharedLibraryNameLinux (String sharedLibName, boolean is64Bit, boolean isArm, ZipFile nativesJar); 38 39 /** @param sharedLibName The name of the shared lib that is asked to be loaded. 40 * @param is64Bit 41 * @param nativesJar A ZipFile object, which gives the ability to walk through the containing files, and allows for pattern 42 * matching. May be null if no zipfile is used. 43 * @return The name of the shared file, or null if none available */ 44 String getSharedLibraryNameMac (String sharedLibName, boolean is64Bit, ZipFile nativesJar); 45 46 /** @param sharedLibName The name of the shared lib that is asked to be loaded. 47 * @param nativesJar A ZipFile object, which gives the ability to walk through the containing files, and allows for pattern 48 * matching. May be null if no zipfile is used. 49 * @return The name of the shared file, or null if none available */ 50 String getSharedLibraryNameAndroid (String sharedLibName, ZipFile nativesJar); 51 } 52