]> xenbits.xensource.com Git - libvirt.git/commit
vbox: Rewrite vboxStoragePoolNumOfVolumes
authorTaowei Luo <uaedante@gmail.com>
Fri, 24 Oct 2014 01:46:39 +0000 (09:46 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 29 Oct 2014 00:21:39 +0000 (01:21 +0100)
commitce381d3764a332b60c19c565f9220c1ff7055295
treea7fb99b97717ff12fc8a188fd0c7cfc3f8134e60
parent459886d41ba0c9626e663115f36a3416b5d22750
vbox: Rewrite vboxStoragePoolNumOfVolumes

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.
po/POTFILES.in
src/vbox/vbox_common.h
src/vbox/vbox_storage.c
src/vbox/vbox_tmpl.c
src/vbox/vbox_uniformed_api.h