VirtualBox

Changeset 8014 in vbox


Ignore:
Timestamp:
Apr 15, 2008 6:36:25 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29672
Message:

Darwin USB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/usblib.h

    r5999 r8014  
    3535# include <VBox/usblib-win.h>
    3636#endif
     37#ifdef RT_OS_DARWIN
     38# include <VBox/usblib-darwin.h>
     39#endif
    3740/** @todo merge the usblib-win.h interface into the darwin and linux ports where suitable. */
    3841
     
    4245 */
    4346
     47#ifndef RT_OS_WINDOWS
     48#ifdef IN_RING3
     49/**
     50 * Initializes the USBLib component.
     51 *
     52 * The USBLib keeps a per process connection to the kernel driver
     53 * and all USBLib users within a process will share the same
     54 * connection. USBLib does reference counting to make sure that
     55 * the connection remains open until all users has called USBLibTerm().
     56 *
     57 * @returns VBox status code.
     58 *
     59 * @remark  The users within the process are responsible for not calling
     60 *          this function at the same time (because I'm lazy).
     61 */
     62int USBLibInit(void);
     63
     64/**
     65 * Terminates the USBLib component.
     66 *
     67 * Must match successfull USBLibInit calls.
     68 *
     69 * @returns VBox status code.
     70 */
     71int USBLibTerm(void);
     72
     73/**
     74 * Adds a filter.
     75 *
     76 * This function will validate and transfer the specified filter
     77 * to the kernel driver and make it start using it. The kernel
     78 * driver will return a filter id that this function passes on
     79 * to its caller.
     80 *
     81 * The kernel driver will associate the added filter with the
     82 * calling process and automatically remove all filters when
     83 * the process terminates the connection to it or dies.
     84 *
     85 * @returns Filter id for passing to USBLibRemoveFilter on success.
     86 * @returns NULL on failure.
     87 *
     88 * @param   pFilter     The filter to add.
     89 */
     90void *USBLibAddFilter(PCUSBFILTER pFilter);
     91
     92/**
     93 * Removes a filter.
     94 *
     95 * @param   pvId        The ID returned by USBLibAddFilter.
     96 */
     97void USBLibRemoveFilter(void *pvId);
     98
     99#endif /* IN_RING3 */
     100#endif /* !RT_OS_WINDOWS */
     101
    44102/** @} */
    45103#endif
Note: See TracChangeset for help on using the changeset viewer.

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