1. 29 10月, 2014 8 次提交
    • T
      vbox: Rewrite vboxStorageVolDelete · 1c2c3906
      Taowei Luo 提交于
      The API on IHardDiskAttachment is merged into IMediumAttachment.
      So, we don't need it anymore.
      1c2c3906
    • T
      vbox: Rewrite vboxStorageVolCreateXML · 0cd409cd
      Taowei Luo 提交于
      If the <path> in target element is not given, libvirt will put the
      new volume in ~/.VirtualBox by default.
      0cd409cd
    • T
      vbox: Rewrite vboxStorageVolLookupByPath · fc41e003
      Taowei Luo 提交于
      fc41e003
    • T
      vbox: Rewrite vboxStorageVolLookupByKey · f67ae174
      Taowei Luo 提交于
      f67ae174
    • T
      vbox: Rewrite vboxStorageVolLookupByName · 8a8fa504
      Taowei Luo 提交于
      8a8fa504
    • T
      vbox: Rewrite vboxStoragePoolListVolumes · c3c8cd4f
      Taowei Luo 提交于
      c3c8cd4f
    • 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
    • T
      vbox: Rewrite vbox-independent functions · 459886d4
      Taowei Luo 提交于
      This patch rewrites the following functions
          *vboxStorageOpen
          *vboxStorageClose
          *vboxConnectNumOfStoragePools
          *vboxConnectListStoragePools
          *vboxStoragePoolLookupByName
      
      These functions do not call any vbox API, so I directly move it
      from vbox_tmpl.c to vbox_storage.c
      
      A small improvement is made on vboxConnectListStoragePools.
      The if condition nnames == 1 is modified to nnames > 0. So if the
      caller put more than one slot to get active storage pools, the new
      function will return exactly one, while the old one would only
      return 0.
      459886d4