Binary format of library description


The binary format has changed starting with version 0.9.3: A new description will be added later.

The description for a library <libname.so> will normally by called <libname.dso> and stored in the directory /usr/local/hbasic/packages. It contains the following parts:
  1. <Library Description Header>
  2. <global method description>
  3. <global constant description>
  4. <class reference table>

where <library description header> is
<4 character> "DESO" file tag
<2 byte> file version (currently 01 01)
<2 byte> package description type (02 00 for shared object library)
<long> offset to start of class desription
<n char> library name (termineted with <char>0 )
<n char> library description (terminated with <char>0 )

<global method description>
<byte> method tag = ETYPE_METHOD
<byte> length of following method description in byte
<n char> name of method
<byte> returntype
<byte> number of parameters in method
<n byte> type of each parameter
<n char> method of shared object symbol to call

<global constant description>
<byte> Type of entry = ETYPE_CONSTANT
<byte> length of entry
<n char> name of constant
<byte> type of constant
<n byte> value of constant (depending on type)

<class reference table>
Offset for class description

Class description
<n char> class name
<n char> class description text
<short> flags
<n char> init method
<n char> exit method
<n char> Qt class