[Vala] translating union in vapi file


I'm in trouble while translating non-Object library which this kind of structure :

typedef struct mpd_InfoEntity {
    /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine
     * what this entity is (song, directory, etc...)
    int type;
    /* the actual data you want, mpd_Song, mpd_Directory, etc */
    union {
        mpd_Directory * directory;
        mpd_Song * song;
        mpd_PlaylistFile * playlistFile;
    } info;
} mpd_InfoEntity;

I don't know the way to handle that.
May  Directory, Song, PlaylistFile classes must inherit from the Boxed class ?

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