VirtualBox

Changeset 59119 in vbox for trunk


Ignore:
Timestamp:
Dec 14, 2015 2:28:25 PM (9 years ago)
Author:
vboxsync
Message:

Main: build fixes

Location:
trunk/src/VBox/Main/src-server
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp

    r59117 r59119  
    989989int HostUSBDevice::i_compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach /*= false */)
    990990{
    991     if (strcmp(aDev1->pszBackend, aDev2->pszBackend))
    992     {
    993         return 1;
    994     }
     991    /* Comparing devices from different backends doesn't make any sense and should not happen. */
     992    AssertReturn(!strcmp(aDev1->pszBackend, aDev2->pszBackend), -1);
    995993
    996994    /*
  • trunk/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp

    r59117 r59119  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #include "USBProxyService.h"
     22#include "USBProxyBackend.h"
    2323#include "Logging.h"
    2424#include "iokit.h"
     
    3939 * Initialize data members.
    4040 */
    41 USBProxyServiceDarwin::USBProxyServiceDarwin(Host *aHost)
    42     : USBProxyService(aHost), mServiceRunLoopRef(NULL), mNotifyOpaque(NULL), mWaitABitNextTime(false), mUSBLibInitialized(false)
    43 {
    44     LogFlowThisFunc(("aHost=%p\n", aHost));
     41USBProxyBackendDarwin::USBProxyBackendDarwin(USBProxyService *aUsbProxyService)
     42    : USBProxyBackend(aUsbProxyService), mServiceRunLoopRef(NULL), mNotifyOpaque(NULL), mWaitABitNextTime(false), mUSBLibInitialized(false)
     43{
     44    LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    4545}
    4646
     
    5151 * @returns VBox status code.
    5252 */
    53 int USBProxyServiceDarwin::init(void)
     53int USBProxyBackendDarwin::init(void)
    5454{
    5555    /*
     
    7373 * Stop all service threads and free the device chain.
    7474 */
    75 USBProxyServiceDarwin::~USBProxyServiceDarwin()
     75USBProxyBackendDarwin::~USBProxyBackendDarwin()
    7676{
    7777    LogFlowThisFunc(("\n"));
     
    9494
    9595
    96 void *USBProxyServiceDarwin::insertFilter(PCUSBFILTER aFilter)
     96void *USBProxyBackendDarwin::insertFilter(PCUSBFILTER aFilter)
    9797{
    9898    return USBLibAddFilter(aFilter);
     
    100100
    101101
    102 void USBProxyServiceDarwin::removeFilter(void *aId)
     102void USBProxyBackendDarwin::removeFilter(void *aId)
    103103{
    104104    USBLibRemoveFilter(aId);
     
    106106
    107107
    108 int USBProxyServiceDarwin::captureDevice(HostUSBDevice *aDevice)
     108int USBProxyBackendDarwin::captureDevice(HostUSBDevice *aDevice)
    109109{
    110110    /*
     
    144144
    145145
    146 void USBProxyServiceDarwin::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
     146void USBProxyBackendDarwin::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
    147147{
    148148    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
     
    158158
    159159
    160 int USBProxyServiceDarwin::releaseDevice(HostUSBDevice *aDevice)
     160int USBProxyBackendDarwin::releaseDevice(HostUSBDevice *aDevice)
    161161{
    162162    /*
     
    198198
    199199
    200 void USBProxyServiceDarwin::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
     200void USBProxyBackendDarwin::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
    201201{
    202202    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
     
    213213
    214214/** @todo unused */
    215 void USBProxyServiceDarwin::detachingDevice(HostUSBDevice *aDevice)
     215void USBProxyBackendDarwin::detachingDevice(HostUSBDevice *aDevice)
    216216{
    217217    NOREF(aDevice);
     
    219219
    220220
    221 bool USBProxyServiceDarwin::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine)
     221bool USBProxyBackendDarwin::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine)
    222222{
    223223    AssertReturn(aDevice, false);
     
    228228
    229229
    230 int USBProxyServiceDarwin::wait(RTMSINTERVAL aMillies)
     230int USBProxyBackendDarwin::wait(RTMSINTERVAL aMillies)
    231231{
    232232    SInt32 rc = CFRunLoopRunInMode(CFSTR(VBOX_IOKIT_MODE_STRING),
     
    243243
    244244
    245 int USBProxyServiceDarwin::interruptWait(void)
     245int USBProxyBackendDarwin::interruptWait(void)
    246246{
    247247    if (mServiceRunLoopRef)
     
    251251
    252252
    253 PUSBDEVICE USBProxyServiceDarwin::getDevices(void)
     253PUSBDEVICE USBProxyBackendDarwin::getDevices(void)
    254254{
    255255    /* call iokit.cpp */
     
    258258
    259259
    260 void USBProxyServiceDarwin::serviceThreadInit(void)
     260void USBProxyBackendDarwin::serviceThreadInit(void)
    261261{
    262262    mServiceRunLoopRef = CFRunLoopGetCurrent();
     
    265265
    266266
    267 void USBProxyServiceDarwin::serviceThreadTerm(void)
     267void USBProxyBackendDarwin::serviceThreadTerm(void)
    268268{
    269269    DarwinUnsubscribeUSBNotifications(mNotifyOpaque);
  • trunk/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp

    r59117 r59119  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #include "USBProxyService.h"
     22#include "USBProxyBackend.h"
    2323#include "Logging.h"
    2424
     
    6060 * Initialize data members.
    6161 */
    62 USBProxyServiceFreeBSD::USBProxyServiceFreeBSD(Host *aHost)
    63     : USBProxyService(aHost)
    64 {
    65     LogFlowThisFunc(("aHost=%p\n", aHost));
     62USBProxyBackendFreeBSD::USBProxyBackendFreeBSD(USBProxyService *aUsbProxyService)
     63    : USBProxyBackend(aHost)
     64{
     65    LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    6666}
    6767
     
    7272 * @returns S_OK on success and non-fatal failures, some COM error otherwise.
    7373 */
    74 int USBProxyServiceFreeBSD::init(void)
     74int USBProxyBackendFreeBSD::init(void)
    7575{
    7676    /*
     
    9292 * Stop all service threads and free the device chain.
    9393 */
    94 USBProxyServiceFreeBSD::~USBProxyServiceFreeBSD()
     94USBProxyBackendFreeBSD::~USBProxyBackendFreeBSD()
    9595{
    9696    LogFlowThisFunc(("\n"));
     
    107107
    108108
    109 int USBProxyServiceFreeBSD::captureDevice(HostUSBDevice *aDevice)
     109int USBProxyBackendFreeBSD::captureDevice(HostUSBDevice *aDevice)
    110110{
    111111    AssertReturn(aDevice, VERR_GENERAL_FAILURE);
     
    126126
    127127
    128 int USBProxyServiceFreeBSD::releaseDevice(HostUSBDevice *aDevice)
     128int USBProxyBackendFreeBSD::releaseDevice(HostUSBDevice *aDevice)
    129129{
    130130    AssertReturn(aDevice, VERR_GENERAL_FAILURE);
     
    145145
    146146
    147 bool USBProxyServiceFreeBSD::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
     147bool USBProxyBackendFreeBSD::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
    148148                                               SessionMachine **aIgnoreMachine)
    149149{
     
    160160 * See USBProxyService::deviceAdded for details.
    161161 */
    162 void USBProxyServiceFreeBSD::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines,
     162void USBProxyBackendFreeBSD::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines,
    163163                                         PUSBDEVICE aUSBDevice)
    164164{
     
    166166}
    167167
    168 int USBProxyServiceFreeBSD::wait(RTMSINTERVAL aMillies)
     168int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies)
    169169{
    170170    return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000);
     
    172172
    173173
    174 int USBProxyServiceFreeBSD::interruptWait(void)
     174int USBProxyBackendFreeBSD::interruptWait(void)
    175175{
    176176    return RTSemEventSignal(mNotifyEventSem);
     
    218218}
    219219
    220 PUSBDEVICE USBProxyServiceFreeBSD::getDevices(void)
     220PUSBDEVICE USBProxyBackendFreeBSD::getDevices(void)
    221221{
    222222    PUSBDEVICE pDevices = NULL;
  • trunk/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp

    r59117 r59119  
    2222#define INCL_BASE
    2323#define INCL_ERRORS
    24 #include "USBProxyService.h"
     24#include "USBProxyBackend.h"
    2525#include "Logging.h"
    2626
     
    3838 * Initialize data members.
    3939 */
    40 USBProxyServiceOs2::USBProxyServiceOs2(Host *aHost)
    41     : USBProxyService(aHost), mhev(NULLHANDLE), mhmod(NULLHANDLE),
     40USBProxyBackendOs2::USBProxyBackendOs2(USBProxyService *aUsbProxyService)
     41    : USBProxyBackend(aUsbProxyService), mhev(NULLHANDLE), mhmod(NULLHANDLE),
    4242    mpfnUsbRegisterChangeNotification(NULL), mpfnUsbDeregisterNotification(NULL),
    4343    mpfnUsbQueryNumberDevices(NULL), mpfnUsbQueryDeviceReport(NULL)
    4444{
    45     LogFlowThisFunc(("aHost=%p\n", aHost));
     45    LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    4646
    4747    /*
  • trunk/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp

    r59117 r59119  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #include "USBProxyService.h"
     22#include "USBProxyBackend.h"
    2323#include "Logging.h"
    2424
     
    5555 * Initialize data members.
    5656 */
    57 USBProxyServiceSolaris::USBProxyServiceSolaris(Host *aHost)
    58     : USBProxyService(aHost), mUSBLibInitialized(false)
    59 {
    60     LogFlowThisFunc(("aHost=%p\n", aHost));
     57USBProxyBackendSolaris::USBProxyBackendSolaris(USBProxyService *aUsbProxyService)
     58    : USBProxyBackend(aUsbProxyService), mUSBLibInitialized(false)
     59{
     60    LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    6161}
    6262
     
    6767 * @returns VBox status code.
    6868 */
    69 int USBProxyServiceSolaris::init(void)
     69int USBProxyBackendSolaris::init(void)
    7070{
    7171    /*
     
    9999 * Stop all service threads and free the device chain.
    100100 */
    101 USBProxyServiceSolaris::~USBProxyServiceSolaris()
     101USBProxyBackendSolaris::~USBProxyBackendSolaris()
    102102{
    103103    LogFlowThisFunc(("destruct\n"));
     
    123123
    124124
    125 void *USBProxyServiceSolaris::insertFilter(PCUSBFILTER aFilter)
     125void *USBProxyBackendSolaris::insertFilter(PCUSBFILTER aFilter)
    126126{
    127127    return USBLibAddFilter(aFilter);
     
    129129
    130130
    131 void USBProxyServiceSolaris::removeFilter(void *pvID)
     131voidUSBProxyBackendSolaris::removeFilter(void *pvID)
    132132{
    133133    USBLibRemoveFilter(pvID);
     
    135135
    136136
    137 int USBProxyServiceSolaris::wait(RTMSINTERVAL aMillies)
     137int USBProxyBackendSolaris::wait(RTMSINTERVAL aMillies)
    138138{
    139139    return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : RT_MIN(aMillies, 5000));
     
    141141
    142142
    143 int USBProxyServiceSolaris::interruptWait(void)
     143int USBProxyBackendSolaris::interruptWait(void)
    144144{
    145145    return RTSemEventSignal(mNotifyEventSem);
     
    147147
    148148
    149 PUSBDEVICE USBProxyServiceSolaris::getDevices(void)
     149PUSBDEVICE USBProxyBackendSolaris::getDevices(void)
    150150{
    151151    USBDEVICELIST DevList;
     
    328328
    329329
    330 int USBProxyServiceSolaris::captureDevice(HostUSBDevice *aDevice)
     330int USBProxyBackendSolaris::captureDevice(HostUSBDevice *aDevice)
    331331{
    332332    /*
     
    370370
    371371
    372 void USBProxyServiceSolaris::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
     372void USBProxyBackendSolaris::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
    373373{
    374374    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
     
    383383
    384384
    385 int USBProxyServiceSolaris::releaseDevice(HostUSBDevice *aDevice)
     385int USBProxyBackendSolaris::releaseDevice(HostUSBDevice *aDevice)
    386386{
    387387    /*
     
    425425
    426426
    427 void USBProxyServiceSolaris::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
     427void USBProxyBackendSolaris::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)
    428428{
    429429    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
     
    438438
    439439
    440 bool USBProxyServiceSolaris::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
     440bool USBProxyBackendSolaris::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
    441441                                               SessionMachine **aIgnoreMachine)
    442442{
  • trunk/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp

    r59117 r59119  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #include "USBProxyService.h"
     22#include "USBProxyBackend.h"
    2323#include "Logging.h"
    2424
     
    3838 * Initialize data members.
    3939 */
    40 USBProxyServiceWindows::USBProxyServiceWindows(Host *aHost)
    41     : USBProxyService(aHost), mhEventInterrupt(INVALID_HANDLE_VALUE)
    42 {
    43     LogFlowThisFunc(("aHost=%p\n", aHost));
     40USBProxyBackendWindows::USBProxyBackendWindows(USBProxyService *aUsbProxyService)
     41    : USBProxyBackend(aHost), mhEventInterrupt(INVALID_HANDLE_VALUE)
     42{
     43    LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    4444}
    4545
     
    5050 * @returns S_OK on success and non-fatal failures, some COM error otherwise.
    5151 */
    52 int USBProxyServiceWindows::init(void)
     52int USBProxyBackendWindows::init(void)
    5353{
    5454    /*
     
    8888 * Stop all service threads and free the device chain.
    8989 */
    90 USBProxyServiceWindows::~USBProxyServiceWindows()
     90USBProxyBackendWindows::~USBProxyBackendWindows()
    9191{
    9292    LogFlowThisFunc(("\n"));
     
    110110
    111111
    112 void *USBProxyServiceWindows::insertFilter(PCUSBFILTER aFilter)
     112void *USBProxyBackendWindows::insertFilter(PCUSBFILTER aFilter)
    113113{
    114114    AssertReturn(aFilter, NULL);
     
    124124
    125125
    126 void USBProxyServiceWindows::removeFilter(void *aID)
     126void USBProxyBackendWindows::removeFilter(void *aID)
    127127{
    128128    LogFlow(("USBProxyServiceWindows::removeFilter(): id=%p\n", aID));
     
    134134
    135135
    136 int USBProxyServiceWindows::captureDevice(HostUSBDevice *aDevice)
     136int USBProxyBackendWindows::captureDevice(HostUSBDevice *aDevice)
    137137{
    138138    /*
     
    176176
    177177
    178 int USBProxyServiceWindows::releaseDevice(HostUSBDevice *aDevice)
     178int USBProxyBackendWindows::releaseDevice(HostUSBDevice *aDevice)
    179179{
    180180    /*
     
    219219
    220220
    221 bool USBProxyServiceWindows::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
     221bool USBProxyBackendWindows::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,
    222222                                               SessionMachine **aIgnoreMachine)
    223223{
     
    229229
    230230
    231 int USBProxyServiceWindows::wait(unsigned aMillies)
     231int USBProxyBackendWindows::wait(unsigned aMillies)
    232232{
    233233    return USBLibWaitChange(aMillies);
     
    235235
    236236
    237 int USBProxyServiceWindows::interruptWait(void)
     237int USBProxyBackendWindows::interruptWait(void)
    238238{
    239239    return USBLibInterruptWaitChange();
     
    243243 * Gets a list of all devices the VM can grab
    244244 */
    245 PUSBDEVICE USBProxyServiceWindows::getDevices(void)
     245PUSBDEVICE USBProxyBackendWindows::getDevices(void)
    246246{
    247247    PUSBDEVICE pDevices = NULL;
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