GlueGen: src/java/com/jogamp/common/os/DynamicLookupHelper.java Source File

GlueGen v2.6.0-rc-20250706 GlueGen, Native Binding Generator for Java™ (public API).

DynamicLookupHelper.java
Go to the documentation of this file.
1/*
2 * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * - Redistribution of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistribution in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * Neither the name of Sun Microsystems, Inc. or the names of
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * This software is provided "AS IS," without a warranty of any kind. ALL
20 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
21 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
23 * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
24 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
25 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
26 * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
27 * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
28 * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
29 * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
30 * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
31 *
32 * You acknowledge that this software is not designed or intended for use
33 * in the design, construction, operation or maintenance of any nuclear
34 * facility.
35 *
36 * Sun gratefully acknowledges that this software was originally authored
37 * and developed by Kenneth Bradley Russell and Christopher John Kline.
38 */
39
40package com.jogamp.common.os;
41
42import jogamp.common.Debug;
43
44/** Interface callers may use ProcAddressHelper's
45 * {@link com.jogamp.gluegen.runtime.ProcAddressTable#reset(com.jogamp.common.os.DynamicLookupHelper) reset}
46 * helper method to install function pointers into a
47 * ProcAddressTable. This must typically be written with native
48 * code. */
49 public interface DynamicLookupHelper {
50 public static final boolean DEBUG = Debug.debug("NativeLibrary");
51 public static final boolean DEBUG_LOOKUP = Debug.debug("NativeLibrary.Lookup");
52
53 /**
54 * @throws SecurityException if user is not granted access for the library set.
55 */
56 public void claimAllLinkPermission() throws SecurityException;
57 /**
58 * @throws SecurityException if user is not granted access for the library set.
59 */
60 public void releaseAllLinkPermission() throws SecurityException;
61
62 /** Returns true if library is loaded and open, otherwise false. */
63 public boolean isOpen();
64
65 /**
66 * Returns the function handle for function 'funcName'.
67 * @throws SecurityException if user is not granted access for the library set.
68 */
69 public long dynamicLookupFunction(String funcName) throws SecurityException;
70
71 /**
72 * Queries whether function 'funcName' is available.
73 * @throws SecurityException if user is not granted access for the library set.
74 */
75 public boolean isFunctionAvailable(String funcName) throws SecurityException;
76}
com.jogamp.common.os.DynamicLookupHelper
Interface callers may use ProcAddressHelper's reset helper method to install function pointers into a...
Definition: DynamicLookupHelper.java:49
com.jogamp.common.os.DynamicLookupHelper.releaseAllLinkPermission
void releaseAllLinkPermission()
com.jogamp.common.os.DynamicLookupHelper.dynamicLookupFunction
long dynamicLookupFunction(String funcName)
Returns the function handle for function 'funcName'.
com.jogamp.common.os.DynamicLookupHelper.claimAllLinkPermission
void claimAllLinkPermission()
com.jogamp.common.os.DynamicLookupHelper.DEBUG_LOOKUP
static final boolean DEBUG_LOOKUP
Definition: DynamicLookupHelper.java:51
com.jogamp.common.os.DynamicLookupHelper.isFunctionAvailable
boolean isFunctionAvailable(String funcName)
Queries whether function 'funcName' is available.
com.jogamp.common.os.DynamicLookupHelper.DEBUG
static final boolean DEBUG
Definition: DynamicLookupHelper.java:50
com.jogamp.common.os.DynamicLookupHelper.isOpen
boolean isOpen()
Returns true if library is loaded and open, otherwise false.