5 messages in net.java.dev.jna.userssome tip for mapping
FromSent OnAttachments
Daniele DellafioreFeb 18, 2008 12:58 pm.html
Timothy WallFeb 18, 2008 7:24 pm 
Daniele DellafioreFeb 19, 2008 12:40 am 
Timothy WallFeb 20, 2008 4:34 am 
Daniele DellafioreFeb 20, 2008 5:26 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:some tip for mappingActions...
From:Daniele Dellafiore (ilde@gmail.com)
Date:Feb 18, 2008 12:58:45 pm
List:net.java.dev.jna.users
Attachments:
libgpod-The-Itdb-iTunesDB-structure.html - 29k

Hi.

It is the very first time I use jna, I would like to ask some tip to start writing.

I have made a test like this:

Gpod gpod = (Gpod) Native.loadLibrary("libgpod.so.3.0.0", Gpod.class); assertNotNull(gpod);

and it passes so I am able to load the library and map it in a interface that extends Library. That interface class is empty. As you can see I Am trying to map libgpod library. I cannot find online doc, I'll attach to this email.

I need some tip on how to create the Java class, for example the native method:

Itdb_iTunesDB* itdb_new (void);

how should be mapped? And there is the structure, Itdb_iTunesDB, should I map it in:

class Itdb_iTunesDB extends Structure { ... }

and that structure should be in Gpod.class? Or where?

Well, I am pretty confused, never done something similar before, I will accept any advice, also some useful readings.