VirtualBox

Ignore:
Timestamp:
Mar 16, 2016 7:43:56 PM (9 years ago)
Author:
vboxsync
Message:

Revert r106058, incomplete conversion of USBProxyBackend to a COM class failing to build on Windows

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r60067 r60068  
    159159    { "convertfromraw",     USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
    160160    { "convertdd",          USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
    161     { "usbdevsource",       USAGE_USBDEVSOURCE,     VBMG_CMD_TODO, handleUSBDevSource,         0 }
    162161};
    163162
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r60067 r60068  
    112112#define USAGE_ENCRYPTMEDIUM         RT_BIT_64(61)
    113113#define USAGE_MEDIUMENCCHKPWD       RT_BIT_64(62)
    114 #define USAGE_USBDEVSOURCE          RT_BIT_64(63)
    115114#define USAGE_ALL                   (~(uint64_t)0)
    116115/** @} */
     
    309308/* VBoxManageUSB.cpp */
    310309RTEXITCODE handleUSBFilter(HandlerArg *a);
    311 RTEXITCODE handleUSBDevSource(HandlerArg *a);
    312310
    313311/* VBoxManageHostonly.cpp */
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r60067 r60068  
    13801380    }
    13811381
    1382     if (fCategory & USAGE_USBDEVSOURCE)
    1383     {
    1384         RTStrmPrintf(pStrm,
    1385                            "%s usbdevsource %s    add <source name>\n"
    1386                      "                            --backend <backend>\n"
    1387                      "                            --address <address>\n"
    1388                            "%s usbdevsource %s    remove <source name>\n"
    1389                      "\n", SEP, SEP);
    1390     }
    1391 
    13921382#ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */
    13931383    if (fCategory == USAGE_ALL)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp

    r60067 r60068  
    547547    return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;
    548548}
    549 
    550 RTEXITCODE handleUSBDevSource(HandlerArg *a)
    551 {
    552     HRESULT rc = S_OK;
    553 
    554     /* at least: 0: command, 1: source id */
    555     if (a->argc < 2)
    556         return errorSyntax(USAGE_USBDEVSOURCE, "Not enough parameters");
    557 
    558     ComPtr<IHost> host;
    559     if (!strcmp(a->argv[0], "add"))
    560     {
    561         Bstr strBackend;
    562         Bstr strAddress;
    563         if (a->argc != 6)
    564             return errorSyntax(USAGE_USBDEVSOURCE, "Invalid number of parameters");
    565 
    566         for (int i = 2; i < a->argc; i++)
    567         {
    568             if (!strcmp(a->argv[i], "--backend"))
    569             {
    570                 i++;
    571                 strBackend = a->argv[i];
    572             }
    573             else if (!strcmp(a->argv[i], "--address"))
    574             {
    575                 i++;
    576                 strAddress = a->argv[i];
    577             }
    578             else
    579                 return errorSyntax(USAGE_USBDEVSOURCE, "Parameter \"%s\" is invalid", a->argv[i]);
    580         }
    581 
    582         SafeArray<BSTR> usbSourcePropNames;
    583         SafeArray<BSTR> usbSourcePropValues;
    584 
    585         CHECK_ERROR_RET(a->virtualBox, COMGETTER(Host)(host.asOutParam()), RTEXITCODE_FAILURE);
    586         CHECK_ERROR_RET(host, AddUSBDeviceSource(strBackend.raw(), Bstr(a->argv[1]).raw(), strAddress.raw(),
    587                                                  ComSafeArrayAsInParam(usbSourcePropNames), ComSafeArrayAsInParam(usbSourcePropValues)),
    588                         RTEXITCODE_FAILURE);
    589     }
    590     else if (!strcmp(a->argv[0], "remove"))
    591     {
    592         CHECK_ERROR_RET(a->virtualBox, COMGETTER(Host)(host.asOutParam()), RTEXITCODE_FAILURE);
    593         CHECK_ERROR_RET(host, RemoveUSBDeviceSource(Bstr(a->argv[1]).raw()), RTEXITCODE_FAILURE);
    594     }
    595 
    596     return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;
    597 }
    598 
    599549/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette