Permalink
Browse files

Rudimentary binding for wbxml_conv_wbxml2xml_run

  • Loading branch information...
1 parent 60aef62 commit 6c38a535146277c8f6bc5565c9ad3445c884b3fa @samstokes samstokes committed May 23, 2012
Showing with 31 additions and 0 deletions.
  1. +1 −0 .classpath
  2. +8 −0 pom.xml
  3. +22 −0 src/main/java/com/rapportive/jawbone/JawboneBinding.java
View
@@ -4,5 +4,6 @@
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
View
@@ -12,6 +12,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId>
+ <version>3.4.0</version>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<!-- Compile to Java 1.6 -->
@@ -0,0 +1,22 @@
+package com.rapportive.jawbone;
+
+import com.sun.jna.Library;
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+
+import com.sun.jna.ptr.LongByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+public interface JawboneBinding extends Library {
+ JawboneBinding INSTANCE = (JawboneBinding) Native.loadLibrary("wbxml2", JawboneBinding.class);
+
+ int wbxml_conv_wbxml2xml_create(PointerByReference jawbonePtr);
+
+ void wbxml_conv_wbxml2xml_set_gen_type(Pointer jawbone, int genType);
+ void wbxml_conv_wbxml2xml_set_language(Pointer jawbone, int language);
+ void wbxml_conv_wbxml2xml_set_charset(Pointer jawbone, int charset);
+ void wbxml_conv_wbxml2xml_set_indent(Pointer jawbone, int indent);
+ void wbxml_conv_wbxml2xml_enable_preserve_whitespaces(Pointer jawbone);
+
+ int wbxml_conv_wbxml2xml_run(Pointer jawbone, byte[] wbxml, long wbxmlLength, PointerByReference xmlPtr, LongByReference xmlLength);
+}

0 comments on commit 6c38a53

Please sign in to comment.