diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KLibLoader.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KLibLoader.java | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KLibLoader.java b/kdejava/koala/org/kde/koala/KLibLoader.java new file mode 100644 index 00000000..75f6d4aa --- /dev/null +++ b/kdejava/koala/org/kde/koala/KLibLoader.java @@ -0,0 +1,166 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QObject; +import org.kde.qt.QObject; + +/** + + The KLibLoader allows you to load libraries dynamically at runtime. + Dependent libraries are loaded automatically. + KLibLoader follows the singleton pattern. You can not create multiple + instances. Use self() to get a pointer to the loader. + @author Torben Weis <weis@kde.org> + + @short The KLibLoader allows you to load libraries dynamically at runtime. + @see KLibrary + +*/ +public class KLibLoader extends QObject { + protected KLibLoader(Class dummy){super((Class) null);} + public native QMetaObject metaObject(); + public native String className(); + /** + Loads and initializes a library. Loading a library multiple times is + handled gracefully. + This is a convenience function that returns the factory immediately + @param libname This is the library name without extension. Usually that is something like + "libkspread". The function will then search for a file named + "libkspread.la" in the KDE library paths. + The .la files are created by libtool and contain + important information especially about the libraries dependencies + on other shared libs. Loading a "libfoo.so" could not solve the + dependencies problem. + You can, however, give a library name ending in ".so" + (or whatever is used on your platform), and the library + will be loaded without resolving dependencies. Use with caution. + @return the KLibFactory, or 0 if the library does not exist or it does + not have a factory + + @short Loads and initializes a library. + @see #library + */ + public native KLibFactory factory(String libname); + /** + Loads and initializes a library. Loading a library multiple times is + handled gracefully. + @param libname This is the library name without extension. Usually that is something like + "libkspread". The function will then search for a file named + "libkspread.la" in the KDE library paths. + The .la files are created by libtool and contain + important information especially about the libraries dependencies + on other shared libs. Loading a "libfoo.so" could not solve the + dependencies problem. + You can, however, give a library name ending in ".so" + (or whatever is used on your platform), and the library + will be loaded without resolving dependencies. Use with caution. + @return KLibrary is invalid (0) when the library couldn't be dlopened. in such + a case you can retrieve the error message by calling KLibLoader.lastErrorMessage() + + @short Loads and initializes a library. + @see #factory + */ + // KLibrary* library(const char* arg1); >>>> NOT CONVERTED + /** + Loads and initializes a library. Loading a library multiple times is + handled gracefully. The library is loaded such that the symbols are + globally accessible so libraries with dependencies can be loaded + sequentially. + @param name This is the library name without extension. Usually that is something like + "libkspread". The function will then search for a file named + "libkspread.la" in the KDE library paths. + The .la files are created by libtool and contain + important information especially about the libraries dependencies + on other shared libs. Loading a "libfoo.so" could not solve the + dependencies problem. + You can, however, give a library name ending in ".so" + (or whatever is used on your platform), and the library + will be loaded without resolving dependencies. Use with caution. + @return KLibrariy is invalid (0) when the library couldn't be dlopened. in such + a case you can retrieve the error message by calling KLibLoader.lastErrorMessage() + + @short Loads and initializes a library. + @see #factory + */ + // KLibrary* globalLibrary(const char* arg1); >>>> NOT CONVERTED + /** + Returns an error message that can be useful to debug the problem. + Returns null if the last call to library() was successful. + You can call this function more than once. The error message is only + reset by a new call to library(). + @return the last error message, or null if there was no error + + @short Returns an error message that can be useful to debug the problem. + */ + public native String lastErrorMessage(); + /** + Unloads the library with the given name. + @param libname This is the library name without extension. Usually that is something like + "libkspread". The function will then search for a file named + "libkspread.la" in the KDE library paths. + The .la files are created by libtool and contain + important information especially about the libraries dependencies + on other shared libs. Loading a "libfoo.so" could not solve the + dependencies problem. + You can, however, give a library name ending in ".so" + (or whatever is used on your platform), and the library + will be loaded without resolving dependencies. Use with caution. + @short Unloads the library with the given name. + */ + public native void unloadLibrary(String libname); + /** + Returns a pointer to the factory. Use this function to get an instance + of KLibLoader. + @return a pointer to the loader. If no loader exists until now + then one is created. + + @short Returns a pointer to the factory. + */ + public static native KLibLoader self(); + /** + Internal Method, called by the KApplication destructor. + Do not call it. + This is what makes it possible to rely on ~KLibFactory + being called in all cases, whether the library is unloaded + while the application is running or when exiting. + @short + */ + public static native void cleanUp(); + /** + Helper method which looks for a library in the standard paths + ("module" and "lib" resources). + Made public for code that doesn't use KLibLoader itself, but still + wants to open modules. + @param name of the library. If it is not a path, the function searches in + the "module" and "lib" resources. If there is no extension, + ".la" will be appended. + @param instance a KInstance used to get the standard paths + @short Helper method which looks for a library in the standard paths ("module" and "lib" resources). + */ + public static native String findLibrary(String name, KInstanceInterface instance); + public static native String findLibrary(String name); + public KLibLoader(QObject parent, String name) { + super((Class) null); + newKLibLoader(parent,name); + } + private native void newKLibLoader(QObject parent, String name); + public KLibLoader(QObject parent) { + super((Class) null); + newKLibLoader(parent); + } + private native void newKLibLoader(QObject parent); + public KLibLoader() { + super((Class) null); + newKLibLoader(); + } + private native void newKLibLoader(); + /** Deletes the wrapped C++ instance */ + protected native void finalize() throws InternalError; + /** Delete the wrapped C++ instance ahead of finalize() */ + public native void dispose(); + /** Has the wrapped C++ instance been deleted? */ + public native boolean isDisposed(); +} |