]> sigrok.org Git - libsigrok.git/blobdiff - bindings/java/org/sigrok/core/classes/classes.i
Rename libsigrokxx to the more common libsigrokcxx.
[libsigrok.git] / bindings / java / org / sigrok / core / classes / classes.i
index 4fe326d158c77c4c8e90fe92b7f80117a994118b..9979a61828c680be0091e5082003c71fe0738f8d 100644 (file)
@@ -16,7 +16,7 @@
  * ------------
  * 
  * The sigrok-java API provides an object-oriented Java interface to the
- * functionality in libsigrok. It is built on top of the sigrok++ C++ API.
+ * functionality in libsigrok. It is built on top of the libsigrokcxx C++ API.
  * 
  * Getting started
  * ---------------
@@ -137,6 +137,11 @@ VECTOR(std::shared_ptr<sigrok::HardwareDevice>, HardwareDevice)
 
 MAP_COMMON(std::string, std::string, String, String)
 
+%typemap(jni) std::map<std::string, std::string>
+  "jobject"
+%typemap(jtype) std::map<std::string, std::string>
+  "java.util.Map<String,String>"
+
 %typemap(out) std::map<std::string, std::string> {
   jclass HashMap = jenv->FindClass("java/util/HashMap");
   jmethodID init = jenv->GetMethodID(HashMap, "<init>", "()V");
@@ -377,4 +382,20 @@ typedef jobject jsourcecallback;
 }
 
 %include "doc.i"
+
+%define %attributevector(Class, Type, Name, Get)
+%attributeval(sigrok::Class, Type, Name, Get);
+%enddef
+
+%define %attributemap(Class, Type, Name, Get)
+%attributeval(sigrok::Class, Type, Name, Get);
+%enddef
+
+%define %enumextras(Class)
+%enddef
+
+/* Ignore this for now, needs a fix. */
+%ignore sigrok::Context::create_analog_packet;
+
 %include "bindings/swig/classes.i"
+