VirtualBox

Changeset 26275 in vbox


Ignore:
Timestamp:
Feb 5, 2010 4:30:19 AM (15 years ago)
Author:
vboxsync
Message:

USB: string descriptor caching for virtual devices.

File:
1 edited

Legend:

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

    r26248 r26275  
    5252 */
    5353
     54
     55/**
     56 * A string entry for the USB descriptor cache.
     57 */
     58typedef struct PDMUSBDESCCACHESTRING
     59{
     60    /** The string index. */
     61    uint8_t     idx;
     62    /** The UTF-8 representation of the string. */
     63    const char *psz;
     64} PDMUSBDESCCACHESTRING;
     65/** Pointer to a const string entry. */
     66typedef PDMUSBDESCCACHESTRING const *PCPDMUSBDESCCACHESTRING;
     67
     68
     69/**
     70 * A language entry for the USB descriptor cache.
     71 */
     72typedef struct PDMUSBDESCCACHELANG
     73{
     74    /** The language ID for the strings in this block. */
     75    uint16_t                idLang;
     76    /** The number of strings in the array. */
     77    uint16_t                cStrings;
     78    /** Pointer to an array of associated strings.
     79     * This must be sorted in ascending order by string index as a binary lookup
     80     * will be performed. */
     81    PCPDMUSBDESCCACHESTRING paStrings;
     82} PDMUSBDESCCACHELANG;
     83/** Pointer to a const language entry. */
     84typedef PDMUSBDESCCACHELANG const *PCPDMUSBDESCCACHELANG;
     85
     86
    5487/**
    5588 * USB descriptor cache.
     
    6598{
    6699    /** USB device descriptor */
    67     PCVUSBDESCDEVICE    pDevice;
     100    PCVUSBDESCDEVICE        pDevice;
    68101    /** USB Descriptor arrays (pDev->bNumConfigurations) */
    69     PCVUSBDESCCONFIGEX  paConfigs;
     102    PCVUSBDESCCONFIGEX      paConfigs;
     103    /** Language IDs and their associated strings.
     104     * This must be sorted in ascending order by language ID as a binary lookup
     105     * will be used. */
     106    PCPDMUSBDESCCACHELANG   paLanguages;
     107    /** The number of entries in the array pointed to by paLanguages. */
     108    uint16_t                cLanguages;
    70109    /** Use the cached descriptors for GET_DESCRIPTOR requests. */
    71     bool                fUseCachedDescriptors;
     110    bool                    fUseCachedDescriptors;
     111    /** Use the cached string descriptors. */
     112    bool                    fUseCachedStringsDescriptors;
    72113} PDMUSBDESCCACHE;
    73114/** Pointer to an USB descriptor cache. */
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