[Vala] Questions about vapi files writing

Hi to all,
        I am trying to (re)write Vala bindings for libcurl.

I started following the instruction in this page
and using information from this page

At last I got a libcurl.gi that was close to what I expected and I tried
to write a metadata file to get an usable vapi file. Unfortunately I
have some problems completing the task.

I have attached an example containing some of the problem I am currently
facing. The libcurl.vapi.target is the desired vapi file, while the
libcurl.vapi is obtained from libcurl.gi and libcurl.metadata using
vapigen (0.14).

The main issues are:
1) How can I specify that a method (curl_easy_init) is the constructor
of a class (EasyHandle)?
2) How can I instruct vapigen that a function is a method of a class and
not a static function?
3) How can I instruct vapigen to put a cname attibute where needed (e.g.
for the EasyHandle class or the Code enumeration)?
4) How can I handle an enumeration value with a different prefix from
all the other values (e.g.: the last value in the Code enumeration)?
5) Is there any way I can put a static function in a nested namespace
(e.g.: Curl.Global.init())?

Thank you for your help.


Attachment: libcurl.gi
Description: Text Data

Attachment: libcurl.metadata
Description: Text document

Attachment: libcurl.vapi
Description: Text Data

Attachment: libcurl.vapi.target
Description: Text document

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]