--- INSTALL | 33 ++++++++------------ README | 8 +---- build.xml | 14 ++++---- src/main/java/org/libvirt/ConnectAuthDefault.java | 2 +- .../java/org/libvirt/jna/ConnectionPointer.java | 4 ++ src/main/java/org/libvirt/jna/DomainPointer.java | 4 ++ src/main/java/org/libvirt/jna/Libvirt.java | 6 +++ src/main/java/org/libvirt/jna/NetworkPointer.java | 4 ++ .../java/org/libvirt/jna/StoragePoolPointer.java | 4 ++ .../java/org/libvirt/jna/StorageVolPointer.java | 4 ++ src/main/java/org/libvirt/jna/package.html | 10 ++++++ src/main/java/org/libvirt/jna/virConnectAuth.java | 3 ++ .../java/org/libvirt/jna/virConnectCredential.java | 3 ++ .../java/org/libvirt/jna/virDomainBlockStats.java | 3 ++ src/main/java/org/libvirt/jna/virDomainInfo.java | 3 ++ .../org/libvirt/jna/virDomainInterfaceStats.java | 3 ++ src/main/java/org/libvirt/jna/virError.java | 3 ++ src/main/java/org/libvirt/jna/virNodeInfo.java | 3 ++ .../java/org/libvirt/jna/virSchedParameter.java | 3 ++ .../org/libvirt/jna/virSchedParameterValue.java | 3 ++ .../java/org/libvirt/jna/virStoragePoolInfo.java | 3 ++ .../java/org/libvirt/jna/virStorageVolInfo.java | 3 ++ src/main/java/org/libvirt/jna/virVcpuInfo.java | 3 ++ src/main/java/org/libvirt/package.html | 10 ++++++ 24 files changed, 104 insertions(+), 35 deletions(-) create mode 100644 src/main/java/org/libvirt/jna/package.html create mode 100644 src/main/java/org/libvirt/package.html diff --git a/INSTALL b/INSTALL index 2da2921..3664da9 100644 --- a/INSTALL +++ b/INSTALL @@ -1,30 +1,23 @@ -The current build procedure is based on the -classic: - tar xvzf libvirt-java-xxx.tar.gz - cd libvirt-java - ./configure [--prefix=/usr] ; make ; make install +The current build procedure is based on ant. You can build +the code by + cd libvirt-java + ant build + +Type in ant -projecthelp to see all the tasks you can execute +with the build script. -You will need a Java Development Kit accepting the version 1.5 -of the language since the bindings use enums which were added -in that version. +You will need a Java Development Kit accepting the version 1.6 +of the language since the bindings use enums as well as the new +for loop syntax -You can select the Java Development Kit to use by providing -a --with-java-home=path_to_jdk_directory configure argument -or by using the JAVA_HOME environment variable. This can -be useful if you have multiple JDK installed or if it is -installed in a non standard path. +You can select the Java Development Kit by using the JAVA_HOME +environment variable. This can be useful if you have multiple +JDK installed or if it is installed in a non standard path. Please report any compatibility problem to the libvirt mailing list at: https://www.redhat.com/mailman/listinfo/libvir-list -Of course if provided, ant based XML config files or -Eclipse one will be integrated to the source distribution -but they are not yet available. - -When building from a CVS checkout you need instead to -run autogen.sh [--prefix=/usr] to build the configure, -since it's a generated file it's not commited in CVS. Daniel Veillard veillard@xxxxxxxxxx diff --git a/README b/README index 655090f..95c9ec6 100644 --- a/README +++ b/README @@ -1,17 +1,11 @@ This is the java binding to the libvirt library. To use it, your program needs to access both the java library (.jar file), -and the JNI library (.so file) +and the JNA library (.jar file) 1. You must have the libvirt.jar file in your classpath. By default the installs it to /usr/local/share/java/libvirt-0.2.1.jar -2. You must have the libvirt_jni.so accessible by the dynamic linker. -By default the RPM installs it to /usr/lib or /usr/lib64, so the linker will -find it automatically. If it's in a different location, you have to set -the LD_LIBRARY_PATH variable to the directory containing the libvirt_jni.so -file. - There is a rudimentary functional test program that the libvirt-java-devel installs put it into /usr/local/share/doc/libvirt-java-devel-0.2.1/test.java diff --git a/build.xml b/build.xml index e1ee51f..596b93a 100644 --- a/build.xml +++ b/build.xml @@ -26,11 +26,11 @@ <mkdir dir="target/testclasses"/> </target> - <target name="clean"> + <target name="clean" description="cleans up all created artifacts"> <delete dir="target"/> </target> - <target name="build" depends="init"> + <target name="build" depends="init" description="builds the code and jar files"> <javac srcdir="src/main/java" includes="**/*.java" classpathref="compile.classpath" @@ -43,14 +43,14 @@ basedir="target/classes"/> </target> - <target name="docs" depends="build"> + <target name="docs" depends="build" description="builds the javadoc"> <mkdir dir="target/javadoc"/> - <javadoc sourcepath="src" + <javadoc sourcepath="src/main/java" classpathref="compile.classpath" destdir="target/javadoc"/> </target> - <target name="src" depends="init"> + <target name="src" depends="init" description="creates a src tarball"> <mkdir dir="target/libvirt-java-${version}"/> <copy todir="target/libvirt-java-${version}"> <fileset dir="." excludes="target/**,.gitignore,.git/**,.*,.*/**"/> @@ -61,7 +61,7 @@ destfile="${src.file}"/> </target> - <target name="spec" depends="init"> + <target name="spec" depends="init" description="generates the spec file"> <copy file="libvirt-java.spec.in" tofile="${spec.file}" overwrite="true" @@ -70,7 +70,7 @@ </copy> </target> - <target name="package" depends="src,build,docs,spec"> + <target name="package" depends="src,build,docs,spec" description="builds the rpms"> <copy file="${src.file}" todir="${rpm.topdir}/SOURCES"/> <copy file="${spec.file}" todir="${rpm.topdir}/SPECS"/> <rpm specfile="${spec}" diff --git a/src/main/java/org/libvirt/ConnectAuthDefault.java b/src/main/java/org/libvirt/ConnectAuthDefault.java index 0f979e1..eacc1e3 100644 --- a/src/main/java/org/libvirt/ConnectAuthDefault.java +++ b/src/main/java/org/libvirt/ConnectAuthDefault.java @@ -4,9 +4,9 @@ import java.io.BufferedReader; import java.io.InputStreamReader; /** - * @author stoty * Implements virConnectAuthPtrDefault functionality from libvirt.c without the external method support * It's not officially a part of the libvirt API, but provided here for completeness, testing, and as an example + * @author stoty */ public final class ConnectAuthDefault extends ConnectAuth { diff --git a/src/main/java/org/libvirt/jna/ConnectionPointer.java b/src/main/java/org/libvirt/jna/ConnectionPointer.java index ab98489..33e904b 100644 --- a/src/main/java/org/libvirt/jna/ConnectionPointer.java +++ b/src/main/java/org/libvirt/jna/ConnectionPointer.java @@ -2,6 +2,10 @@ package org.libvirt.jna; import com.sun.jna.PointerType; +/** + * Pointer class to provide type safety to the + * jna interface. + */ public class ConnectionPointer extends PointerType { } diff --git a/src/main/java/org/libvirt/jna/DomainPointer.java b/src/main/java/org/libvirt/jna/DomainPointer.java index 8abb852..367d08b 100644 --- a/src/main/java/org/libvirt/jna/DomainPointer.java +++ b/src/main/java/org/libvirt/jna/DomainPointer.java @@ -2,6 +2,10 @@ package org.libvirt.jna; import com.sun.jna.PointerType; +/** + * Pointer class to provide type safety to the + * jna interface. + */ public class DomainPointer extends PointerType { } diff --git a/src/main/java/org/libvirt/jna/Libvirt.java b/src/main/java/org/libvirt/jna/Libvirt.java index 5ed9fad..b15ceb0 100644 --- a/src/main/java/org/libvirt/jna/Libvirt.java +++ b/src/main/java/org/libvirt/jna/Libvirt.java @@ -9,6 +9,9 @@ import com.sun.jna.Pointer; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.LongByReference; +/** + * The libvirt interface which is exposed via JNA. + */ public interface Libvirt extends Library { Libvirt INSTANCE = (Libvirt) Native.loadLibrary("libvirt", Libvirt.class) ; @@ -155,6 +158,9 @@ public interface Libvirt extends Library public int virDomainUndefine(DomainPointer virDomainPtr) ; // Callbacks + /** + * Callback interface for authorization + */ interface VirConnectAuthCallback extends Callback { public int authCallback(virConnectCredential cred, int ncred, Pointer cbdata) ; diff --git a/src/main/java/org/libvirt/jna/NetworkPointer.java b/src/main/java/org/libvirt/jna/NetworkPointer.java index 62b710c..4dba513 100644 --- a/src/main/java/org/libvirt/jna/NetworkPointer.java +++ b/src/main/java/org/libvirt/jna/NetworkPointer.java @@ -2,6 +2,10 @@ package org.libvirt.jna; import com.sun.jna.PointerType; +/** + * Pointer class to provide type safety to the + * jna interface. + */ public class NetworkPointer extends PointerType { } diff --git a/src/main/java/org/libvirt/jna/StoragePoolPointer.java b/src/main/java/org/libvirt/jna/StoragePoolPointer.java index e004ee8..51550ba 100644 --- a/src/main/java/org/libvirt/jna/StoragePoolPointer.java +++ b/src/main/java/org/libvirt/jna/StoragePoolPointer.java @@ -2,6 +2,10 @@ package org.libvirt.jna; import com.sun.jna.PointerType; +/** + * Pointer class to provide type safety to the + * jna interface. + */ public class StoragePoolPointer extends PointerType { } diff --git a/src/main/java/org/libvirt/jna/StorageVolPointer.java b/src/main/java/org/libvirt/jna/StorageVolPointer.java index e0a4acd..0d91447 100644 --- a/src/main/java/org/libvirt/jna/StorageVolPointer.java +++ b/src/main/java/org/libvirt/jna/StorageVolPointer.java @@ -2,6 +2,10 @@ package org.libvirt.jna; import com.sun.jna.PointerType; +/** + * Pointer class to provide type safety to the + * jna interface. + */ public class StorageVolPointer extends PointerType { } diff --git a/src/main/java/org/libvirt/jna/package.html b/src/main/java/org/libvirt/jna/package.html new file mode 100644 index 0000000..29e6c4a --- /dev/null +++ b/src/main/java/org/libvirt/jna/package.html @@ -0,0 +1,10 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<html> +<head> + +</head> +<body bgcolor="white"> +JNA mappings for the libvirt library. + +</body> +</html> diff --git a/src/main/java/org/libvirt/jna/virConnectAuth.java b/src/main/java/org/libvirt/jna/virConnectAuth.java index 8c94b6e..e31971d 100644 --- a/src/main/java/org/libvirt/jna/virConnectAuth.java +++ b/src/main/java/org/libvirt/jna/virConnectAuth.java @@ -3,6 +3,9 @@ package org.libvirt.jna; import com.sun.jna.Pointer; import com.sun.jna.Structure; +/** + * JNA mapping for the virConnectAuth structure + */ public class virConnectAuth extends Structure { public int[] credtype ; public int ncredtype ; diff --git a/src/main/java/org/libvirt/jna/virConnectCredential.java b/src/main/java/org/libvirt/jna/virConnectCredential.java index 1fbd5e7..862d933 100644 --- a/src/main/java/org/libvirt/jna/virConnectCredential.java +++ b/src/main/java/org/libvirt/jna/virConnectCredential.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virConnectCredential structure + */ public class virConnectCredential extends Structure { public int type ; public String prompt ; diff --git a/src/main/java/org/libvirt/jna/virDomainBlockStats.java b/src/main/java/org/libvirt/jna/virDomainBlockStats.java index 446e016..fa1f954 100644 --- a/src/main/java/org/libvirt/jna/virDomainBlockStats.java +++ b/src/main/java/org/libvirt/jna/virDomainBlockStats.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virDomainBlockStats structure + */ public class virDomainBlockStats extends Structure { public long rd_req ; diff --git a/src/main/java/org/libvirt/jna/virDomainInfo.java b/src/main/java/org/libvirt/jna/virDomainInfo.java index 15d4836..4107002 100644 --- a/src/main/java/org/libvirt/jna/virDomainInfo.java +++ b/src/main/java/org/libvirt/jna/virDomainInfo.java @@ -3,6 +3,9 @@ package org.libvirt.jna; import com.sun.jna.NativeLong; import com.sun.jna.Structure ; +/** + * JNA mapping for the virDomainInfo structure + */ public class virDomainInfo extends Structure { public int state ; diff --git a/src/main/java/org/libvirt/jna/virDomainInterfaceStats.java b/src/main/java/org/libvirt/jna/virDomainInterfaceStats.java index 3fda2dd..2dfb40d 100644 --- a/src/main/java/org/libvirt/jna/virDomainInterfaceStats.java +++ b/src/main/java/org/libvirt/jna/virDomainInterfaceStats.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virDomainInterfaceStats structure + */ public class virDomainInterfaceStats extends Structure { public long rx_bytes; diff --git a/src/main/java/org/libvirt/jna/virError.java b/src/main/java/org/libvirt/jna/virError.java index 10529fe..863625c 100644 --- a/src/main/java/org/libvirt/jna/virError.java +++ b/src/main/java/org/libvirt/jna/virError.java @@ -3,6 +3,9 @@ package org.libvirt.jna; import com.sun.jna.Pointer; import com.sun.jna.Structure ; +/** + * JNA mapping for the virError structure + */ public class virError extends Structure { public int code ; diff --git a/src/main/java/org/libvirt/jna/virNodeInfo.java b/src/main/java/org/libvirt/jna/virNodeInfo.java index 5a6449e..f83d073 100644 --- a/src/main/java/org/libvirt/jna/virNodeInfo.java +++ b/src/main/java/org/libvirt/jna/virNodeInfo.java @@ -3,6 +3,9 @@ package org.libvirt.jna; import com.sun.jna.NativeLong; import com.sun.jna.Structure; +/** + * JNA mapping for the virNodeInfo structure + */ public class virNodeInfo extends Structure { public class ByValue extends virNodeInfo implements Structure.ByValue {}; diff --git a/src/main/java/org/libvirt/jna/virSchedParameter.java b/src/main/java/org/libvirt/jna/virSchedParameter.java index f8440e1..b776171 100644 --- a/src/main/java/org/libvirt/jna/virSchedParameter.java +++ b/src/main/java/org/libvirt/jna/virSchedParameter.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virSchedParameter structure + */ public class virSchedParameter extends Structure { public byte field[] = new byte[Libvirt.VIR_DOMAIN_SCHED_FIELD_LENGTH] ; diff --git a/src/main/java/org/libvirt/jna/virSchedParameterValue.java b/src/main/java/org/libvirt/jna/virSchedParameterValue.java index ff2cdfc..4c06f92 100644 --- a/src/main/java/org/libvirt/jna/virSchedParameterValue.java +++ b/src/main/java/org/libvirt/jna/virSchedParameterValue.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virSchedParameterValue structure + */ public class virSchedParameterValue extends Structure { public int i; /* data for integer case */ diff --git a/src/main/java/org/libvirt/jna/virStoragePoolInfo.java b/src/main/java/org/libvirt/jna/virStoragePoolInfo.java index 78915ff..5490556 100644 --- a/src/main/java/org/libvirt/jna/virStoragePoolInfo.java +++ b/src/main/java/org/libvirt/jna/virStoragePoolInfo.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virStoragePoolInfo structure + */ public class virStoragePoolInfo extends Structure { public int state ; diff --git a/src/main/java/org/libvirt/jna/virStorageVolInfo.java b/src/main/java/org/libvirt/jna/virStorageVolInfo.java index 598f28a..21f8456 100644 --- a/src/main/java/org/libvirt/jna/virStorageVolInfo.java +++ b/src/main/java/org/libvirt/jna/virStorageVolInfo.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virStorageVolInfo structure + */ public class virStorageVolInfo extends Structure { public int type ; diff --git a/src/main/java/org/libvirt/jna/virVcpuInfo.java b/src/main/java/org/libvirt/jna/virVcpuInfo.java index ba72ce8..36ae2b3 100644 --- a/src/main/java/org/libvirt/jna/virVcpuInfo.java +++ b/src/main/java/org/libvirt/jna/virVcpuInfo.java @@ -2,6 +2,9 @@ package org.libvirt.jna; import com.sun.jna.Structure; +/** + * JNA mapping for the virVcpuInfo structure + */ public class virVcpuInfo extends Structure { public int number ; diff --git a/src/main/java/org/libvirt/package.html b/src/main/java/org/libvirt/package.html new file mode 100644 index 0000000..1b5fc89 --- /dev/null +++ b/src/main/java/org/libvirt/package.html @@ -0,0 +1,10 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<html> +<head> + +</head> +<body bgcolor="white"> +Public interface for the libvirt library. + +</body> +</html> -- 1.6.0.6 -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list