Changeset 60742 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Apr 28, 2016 1:55:03 PM (9 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/USBProxyBackend.h
r60108 r60742 67 67 virtual int captureDevice(HostUSBDevice *aDevice); 68 68 virtual void captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); 69 /** @todo unused */70 virtual void detachingDevice(HostUSBDevice *aDevice);71 69 virtual int releaseDevice(HostUSBDevice *aDevice); 72 70 virtual void releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); … … 74 72 75 73 static void freeDevice(PUSBDEVICE pDevice); 76 77 HRESULT runAllFiltersOnDevice(ComObjPtr<HostUSBDevice> &aDevice,78 SessionMachinesList &llOpenedMachines,79 SessionMachine *aIgnoreMachine);80 bool runMachineFilters(SessionMachine *aMachine, ComObjPtr<HostUSBDevice> &aDevice);81 82 virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice);83 virtual void deviceRemoved(ComObjPtr<HostUSBDevice> &aDevice);84 virtual void deviceChanged(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList *pllOpenedMachines, SessionMachine *aIgnoreMachine);85 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);86 74 87 75 protected: … … 94 82 virtual int interruptWait(void); 95 83 virtual PUSBDEVICE getDevices(void); 96 bool updateDeviceStateFake(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);97 84 uint32_t incRef(); 98 85 uint32_t decRef(); … … 102 89 static void initFilterFromDevice(PUSBFILTER aFilter, HostUSBDevice *aDevice); 103 90 static void freeDeviceMembers(PUSBDEVICE pDevice); 91 92 /** 93 * Backend specific callback when a device was added. 94 * (Currently only Linux uses it to adjust the udev polling). 95 */ 96 virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, PUSBDEVICE pDev); 104 97 105 98 private: … … 110 103 111 104 static DECLCALLBACK(int) serviceThread(RTTHREAD Thread, void *pvUser); 105 106 void updateDeviceList(PUSBDEVICE pDevices); 112 107 113 108 protected: … … 126 121 /** Reference counter which prevents the backend instance from being removed. */ 127 122 uint32_t m_cRefs; 123 /** List of smart HostUSBDevice pointers. */ 124 typedef std::list<ComObjPtr<HostUSBDevice> > HostUSBDeviceList; 125 /** List of the known USB devices for this backend. */ 126 HostUSBDeviceList m_llDevices; 128 127 }; 129 128 … … 153 152 virtual int captureDevice(HostUSBDevice *aDevice); 154 153 virtual void captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); 155 /** @todo unused */156 virtual void detachingDevice(HostUSBDevice *aDevice);157 154 virtual int releaseDevice(HostUSBDevice *aDevice); 158 155 virtual void releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); … … 164 161 virtual void serviceThreadInit (void); 165 162 virtual void serviceThreadTerm (void); 166 virtual bool updateDeviceState (HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);167 163 168 164 private: … … 208 204 virtual int interruptWait(void); 209 205 virtual PUSBDEVICE getDevices(void); 210 virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice); 211 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine); 206 virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, PUSBDEVICE aUSBDevice); 212 207 213 208 private: … … 255 250 virtual PUSBDEVICE getDevices(void); 256 251 int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc); 257 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);258 252 259 253 private: … … 302 296 virtual int interruptWait(void); 303 297 virtual PUSBDEVICE getDevices(void); 304 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);305 298 306 299 private: … … 334 327 virtual int interruptWait(void); 335 328 virtual PUSBDEVICE getDevices(void); 336 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);337 329 338 330 private: … … 365 357 int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc); 366 358 virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice); 367 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);368 359 369 360 private: … … 413 404 virtual int interruptWait(void); 414 405 virtual PUSBDEVICE getDevices(void); 415 virtual bool updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine);416 406 417 407 private: -
trunk/src/VBox/Main/include/USBProxyService.h
r60107 r60742 83 83 typedef std::list< ComObjPtr<HostUSBDeviceFilter> > USBDeviceFilterList; 84 84 85 void i_updateDeviceList(USBProxyBackend *pUsbProxyBackend, PUSBDEVICE pDevices);86 void i_getUSBFilters(USBDeviceFilterList *pGlobalFilters);87 88 85 HRESULT i_loadSettings(const settings::USBDeviceSourcesList &llUSBDeviceSources); 89 86 HRESULT i_saveSettings(settings::USBDeviceSourcesList &llUSBDeviceSources); 87 88 void i_deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, PUSBDEVICE aUSBDevice); 89 void i_deviceRemoved(ComObjPtr<HostUSBDevice> &aDevice); 90 void i_updateDeviceState(ComObjPtr<HostUSBDevice> &aDevice, PUSBDEVICE aUSBDevice, bool fFakeUpdate); 90 91 91 92 protected: … … 101 102 102 103 private: 104 105 HRESULT runAllFiltersOnDevice(ComObjPtr<HostUSBDevice> &aDevice, 106 SessionMachinesList &llOpenedMachines, 107 SessionMachine *aIgnoreMachine); 108 bool runMachineFilters(SessionMachine *aMachine, ComObjPtr<HostUSBDevice> &aDevice); 109 110 void deviceChanged(ComObjPtr<HostUSBDevice> &aDevice, bool fRunFilters, SessionMachine *aIgnoreMachine); 103 111 104 112 /** Pointer to the Host object. */
Note:
See TracChangeset
for help on using the changeset viewer.