• T
    vbox: Rewrite vboxStoragePoolNumOfVolumes · ce381d37
    Taowei Luo 提交于
    We use typedef IMedium IHardDisk to make IHardDisk hierachy from
    IMedium (Actually it did on vbox 2.2 and 3.0's C++ API).
    So when calling
        VBOX_MEDIUM_FUNC_ARG*(IHardDisk, func, args)
    we can directly replace it to
        gVBoxAPI.UIMedium.func(IHardDisk, args)
    
    When dealing with this two types, we get some rules from it's
    hierachy relationship.
    
    When using IHardDisk and IMedium as input, we can't transfer a
    IMedium to IHardDisk. Like:
        gVBoxAPI.UIHardDisk.func(IHardDisk *hardDisk, args)
        Here, we can't put a *IMedium as a argument.
    
    When using IHardDisk and IMedium as output, we can't transfer a
    IHardDisk to IMedium. Like:
        gVBoxAPI.UIMachine.GetMedium(IMedium **out)
        Here, we can't put a **IHardDisk as a argument. If this case
        do happen, we either change the API to GetHardDisk or write a
        new one.
    ce381d37
vbox_tmpl.c 193.6 KB