]> sigrok.org Git - libsigrok.git/blobdiff - bindings/java/org/sigrok/core/classes/classes.i
Add a public API to list available serial ports.
[libsigrok.git] / bindings / java / org / sigrok / core / classes / classes.i
index c7173e4a77d010937b824377fc2e4d40baba2955..867e8fcaaae53d20a9db466f1eaa89990fcdacf9 100644 (file)
@@ -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");
@@ -376,8 +381,21 @@ typedef jobject jsourcecallback;
   }
 }
 
-/* Currently broken due to some std::map typemap issues. */
-%ignore sigrok::Meta::get_config;
-
 %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"
+