VirtualBox

Changeset 3644 in vbox for trunk/include


Ignore:
Timestamp:
Jul 16, 2007 3:21:16 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22916
Message:

Added PDMIHOSTDEVICEPORT and PDMINTERFACE_HOST_DEVICE_CONNECTOR, and a Parallel class. Contributed by: Alexander Eichner

File:
1 edited

Legend:

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

    r3632 r3644  
    732732    PDMINTERFACE_VUSB_DEVICE,
    733733
     734    /** PDMIHOSTDEVICEPORT      - The Host Device port interface.       (Down)   Coupled with PDMINTERFACE_HOST_DEVICE_CONNECTOR. */
     735    PDMINTERFACE_HOST_DEVICE_PORT,
     736    /** PDMIHOSTDEVICECONNECTOR - The Host device connector interface   (Up)     Coupled with PDMINTERFACE_HOST_DEVICE_PORT. */
     737    PDMINTERFACE_HOST_DEVICE_CONNECTOR,
     738
    734739    /** Maximum interface number. */
    735740    PDMINTERFACE_MAX
     
    17591764    DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMISTREAM pInterface, const void *pvBuf, size_t *cbWrite));
    17601765} PDMISTREAM;
     1766
     1767
     1768/** Pointer to a host device port interface. */
     1769typedef struct PDMIHOSTDEVICEPORT *PPDMIHOSTDEVICEPORT;
     1770
     1771/**
     1772 * Char port interface.
     1773 * Pair with PDMIHOSTDEVICECONNECTOR.
     1774 */
     1775typedef struct PDMIHOSTDEVICEPORT
     1776{
     1777    /**
     1778     * Deliver data read to the device/driver.
     1779     *
     1780     * @returns VBox status code.
     1781     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1782     * @param   pvBuf           Where the read bits are stored.
     1783     * @param   pcbRead         Number of bytes available for reading/having been read.
     1784     * @thread  Any thread.
     1785     */
     1786    DECLR3CALLBACKMEMBER(int, pfnNotifyRead,(PPDMIHOSTDEVICEPORT pInterface, const void *pvBuf, size_t *pcbRead));
     1787} PDMIHOSTDEVICEPORT;
     1788
     1789/** Pointer to a Host Device connector interface. */
     1790typedef struct PDMIHOSTDEVICECONNECTOR *PPDMIHOSTDEVICECONNECTOR;
     1791
     1792/**
     1793 * Host device connector interface
     1794 * Pair with PDMIHOSTDEVICEPORT.
     1795 */
     1796typedef struct PDMIHOSTDEVICECONNECTOR
     1797{
     1798    /**
     1799     * Write bits.
     1800     *
     1801     * @returns VBox status code.
     1802     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1803     * @param   pvBuf           Where to store the write bits.
     1804     * @param   pcbWrite        Number of bytes to write/bytes actually written.
     1805     * @thread  Any thread.
     1806     */
     1807    DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIHOSTDEVICECONNECTOR pInterface, const void *pvBuf, size_t *pcbWrite));
     1808
     1809    /**
     1810     * Read bits.
     1811     *
     1812     * @returns VBox status code.
     1813     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1814     * @param   pvBuf           Where to store the read bits.
     1815     * @param   pcbRead         Number of bytes to read/bytes actually read.
     1816     * @thread  Any thread.
     1817     */
     1818    DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIHOSTDEVICECONNECTOR pInterface, void *pvBuf, size_t *pcbRead));
     1819
     1820    /**
     1821     * Perform IO control on the host device.
     1822     *
     1823     * @returns VBox status code.
     1824     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     1825     * @param   uCommand        The number of the command to set or get data
     1826     * @param   pvData          Where to store the command data.
     1827     * @thread  Any thread.
     1828     */
     1829    DECLR3CALLBACKMEMBER(int, pfnIOCtl,(PPDMIHOSTDEVICECONNECTOR pInterface, RTUINT uCommand, void *pvData));
     1830} PDMIHOSTDEVICECONNECTOR;
    17611831
    17621832
     
    35443614/** Serial controller device. */
    35453615#define PDM_DEVREG_CLASS_SERIAL         BIT(16)
     3616/** Parallel controller device */
     3617#define PDM_DEVREG_CLASS_PARALLEL       BIT(17)
    35463618/** Misc devices (always last). */
    35473619#define PDM_DEVREG_CLASS_MISC           BIT(31)
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