JNA and ZBar(library for bar code reader)
- by user219120
I'm creating Java Interface with JNA for ZBar(library for bar code reader).
In JNA, structures in C are needed to declare. For example::
// In C
typedef struct {
char* id;
char* name;
int age;
char* sectionId
} EMPLOYEE;
to
// In Java with JNA
public static class Employee extends Structure { // com.sun.jna.Structure
String id;
String name;
int age;
String sectionId;
}
But in ZBar, structures have no members. For example::
// zbar-0.10/include/zbar.h
// line:1009-1011
struct zbar_image_scanner_s;
/** opaque image scanner object. */
typedef struct zbar_image_scanner_s zbar_image_scanner_t;
That doesn't declare size or members of the structures.
How can I write interfaces for these structures in JNA?