VirtualBox

Changeset 98792 in vbox


Ignore:
Timestamp:
Feb 28, 2023 5:01:23 PM (21 months ago)
Author:
vboxsync
Message:

Guest Control/VBoxService: Moved all the CALLBACKDATA_ struct from GuestControlSvc.h into GuestCtrlImplPrivate.h, as these structs only belong into Main + added missing docs. bugref:9783

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/GuestControlSvc.h

    r98709 r98792  
    16081608} HGCMReplyFsNotify;
    16091609#pragma pack ()
    1610 
    1611 
    1612 /******************************************************************************
    1613 * Callback data structures.                                                   *
    1614 ******************************************************************************/
    1615 
    1616 /**
    1617  * The guest control callback data header. Must come first
    1618  * on each callback structure defined below this struct.
    1619  */
    1620 typedef struct CALLBACKDATA_HEADER
    1621 {
    1622     /** Context ID to identify callback data. This is
    1623      *  and *must* be the very first parameter in this
    1624      *  structure to still be backwards compatible. */
    1625     uint32_t uContextID;
    1626 } CALLBACKDATA_HEADER, *PCALLBACKDATA_HEADER;
    1627 
    1628 /*
    1629  * These structures make up the actual low level HGCM callback data sent from
    1630  * the guest back to the host.
    1631  */
    1632 
    1633 typedef struct CALLBACKDATA_CLIENT_DISCONNECTED
    1634 {
    1635     /** Callback data header. */
    1636     CALLBACKDATA_HEADER hdr;
    1637 } CALLBACKDATA_CLIENT_DISCONNECTED, *PCALLBACKDATA_CLIENT_DISCONNECTED;
    1638 
    1639 typedef struct CALLBACKDATA_MSG_REPLY
    1640 {
    1641     /** Callback data header. */
    1642     CALLBACKDATA_HEADER hdr;
    1643     /** Notification type. */
    1644     uint32_t uType;
    1645     /** Notification result. Note: int vs. uint32! */
    1646     uint32_t rc;
    1647     /** Pointer to optional payload. */
    1648     void *pvPayload;
    1649     /** Payload size (in bytes). */
    1650     uint32_t cbPayload;
    1651 } CALLBACKDATA_MSG_REPLY, *PCALLBACKDATA_MSG_REPLY;
    1652 
    1653 typedef struct CALLBACKDATA_SESSION_NOTIFY
    1654 {
    1655     /** Callback data header. */
    1656     CALLBACKDATA_HEADER hdr;
    1657     /** Notification type. */
    1658     uint32_t uType;
    1659     /** Notification result. Note: int vs. uint32! */
    1660     uint32_t uResult;
    1661 } CALLBACKDATA_SESSION_NOTIFY, *PCALLBACKDATA_SESSION_NOTIFY;
    1662 
    1663 typedef struct CALLBACKDATA_PROC_STATUS
    1664 {
    1665     /** Callback data header. */
    1666     CALLBACKDATA_HEADER hdr;
    1667     /** The process ID (PID). */
    1668     uint32_t uPID;
    1669     /** The process status. */
    1670     uint32_t uStatus;
    1671     /** Optional flags, varies, based on u32Status. */
    1672     uint32_t uFlags;
    1673     /** Optional data buffer (not used atm). */
    1674     void *pvData;
    1675     /** Size of optional data buffer (not used atm). */
    1676     uint32_t cbData;
    1677 } CALLBACKDATA_PROC_STATUS, *PCALLBACKDATA_PROC_STATUS;
    1678 
    1679 typedef struct CALLBACKDATA_PROC_OUTPUT
    1680 {
    1681     /** Callback data header. */
    1682     CALLBACKDATA_HEADER hdr;
    1683     /** The process ID (PID). */
    1684     uint32_t uPID;
    1685     /** The handle ID (stdout/stderr). */
    1686     uint32_t uHandle;
    1687     /** Optional flags (not used atm). */
    1688     uint32_t uFlags;
    1689     /** Optional data buffer. */
    1690     void *pvData;
    1691     /** Size (in bytes) of optional data buffer. */
    1692     uint32_t cbData;
    1693 } CALLBACKDATA_PROC_OUTPUT, *PCALLBACKDATA_PROC_OUTPUT;
    1694 
    1695 typedef struct CALLBACKDATA_PROC_INPUT
    1696 {
    1697     /** Callback data header. */
    1698     CALLBACKDATA_HEADER hdr;
    1699     /** The process ID (PID). */
    1700     uint32_t uPID;
    1701     /** Current input status. */
    1702     uint32_t uStatus;
    1703     /** Optional flags. */
    1704     uint32_t uFlags;
    1705     /** Size (in bytes) of processed input data. */
    1706     uint32_t uProcessed;
    1707 } CALLBACKDATA_PROC_INPUT, *PCALLBACKDATA_PROC_INPUT;
    1708 
    1709 /**
    1710  * General guest file notification callback.
    1711  */
    1712 typedef struct CALLBACKDATA_FILE_NOTIFY
    1713 {
    1714     /** Callback data header. */
    1715     CALLBACKDATA_HEADER hdr;
    1716     /** Notification type. */
    1717     uint32_t uType;
    1718     /** IPRT result of overall operation. */
    1719     uint32_t rc;
    1720     union
    1721     {
    1722         struct
    1723         {
    1724             /** Guest file handle. */
    1725             uint32_t uHandle;
    1726         } open;
    1727         /** Note: Close does not have any additional data (yet). */
    1728         struct
    1729         {
    1730             /** How much data (in bytes) have been read. */
    1731             uint32_t cbData;
    1732             /** Actual data read (if any). */
    1733             void *pvData;
    1734         } read;
    1735         struct
    1736         {
    1737             /** How much data (in bytes) have been successfully written. */
    1738             uint32_t cbWritten;
    1739         } write;
    1740         struct
    1741         {
    1742             /** New file offset after successful seek. */
    1743             uint64_t uOffActual;
    1744         } seek;
    1745         struct
    1746         {
    1747             /** New file offset after successful tell. */
    1748             uint64_t uOffActual;
    1749         } tell;
    1750         struct
    1751         {
    1752             /** The new file siz.e */
    1753             uint64_t cbSize;
    1754         } SetSize;
    1755     } u;
    1756 } CALLBACKDATA_FILE_NOTIFY, *PCALLBACKDATA_FILE_NOTIFY;
    17571610} /* namespace guestControl */
    17581611
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r98725 r98792  
    14591459/*******************************************************************************
    14601460* Callback data structures.                                                    *
     1461*                                                                              *
     1462* These structures make up the actual low level HGCM callback data sent from   *
     1463* the guest back to the host.                                                  *
    14611464*******************************************************************************/
     1465
     1466/**
     1467 * The guest control callback data header. Must come first
     1468 * on each callback structure defined below this struct.
     1469 */
     1470typedef struct CALLBACKDATA_HEADER
     1471{
     1472    /** Context ID to identify callback data. This is
     1473     *  and *must* be the very first parameter in this
     1474     *  structure to still be backwards compatible. */
     1475    uint32_t uContextID;
     1476} CALLBACKDATA_HEADER;
     1477/** Pointer to a CALLBACKDATA_HEADER struct. */
     1478typedef CALLBACKDATA_HEADER *PCALLBACKDATA_HEADER;
     1479
     1480/**
     1481 * Host service callback data when a HGCM client disconnected.
     1482 */
     1483typedef struct CALLBACKDATA_CLIENT_DISCONNECTED
     1484{
     1485    /** Callback data header. */
     1486    CALLBACKDATA_HEADER hdr;
     1487} CALLBACKDATA_CLIENT_DISCONNECTED;
     1488/** Pointer to a CALLBACKDATA_CLIENT_DISCONNECTED struct. */
     1489typedef CALLBACKDATA_CLIENT_DISCONNECTED *PCALLBACKDATA_CLIENT_DISCONNECTED;
     1490
     1491/**
     1492 * Host service callback data for a generic guest reply.
     1493 */
     1494typedef struct CALLBACKDATA_MSG_REPLY
     1495{
     1496    /** Callback data header. */
     1497    CALLBACKDATA_HEADER hdr;
     1498    /** Notification type. */
     1499    uint32_t uType;
     1500    /** Notification result. Note: int vs. uint32! */
     1501    uint32_t rc;
     1502    /** Pointer to optional payload. */
     1503    void *pvPayload;
     1504    /** Payload size (in bytes). */
     1505    uint32_t cbPayload;
     1506} CALLBACKDATA_MSG_REPLY;
     1507/** Pointer to a CALLBACKDATA_MSG_REPLY struct. */
     1508typedef CALLBACKDATA_MSG_REPLY *PCALLBACKDATA_MSG_REPLY;
     1509
     1510/**
     1511 * Host service callback data for guest session notifications.
     1512 */
     1513typedef struct CALLBACKDATA_SESSION_NOTIFY
     1514{
     1515    /** Callback data header. */
     1516    CALLBACKDATA_HEADER hdr;
     1517    /** Notification type. */
     1518    uint32_t uType;
     1519    /** Notification result. Note: int vs. uint32! */
     1520    uint32_t uResult;
     1521} CALLBACKDATA_SESSION_NOTIFY;
     1522/** Pointer to a CALLBACKDATA_SESSION_NOTIFY struct. */
     1523typedef CALLBACKDATA_SESSION_NOTIFY *PCALLBACKDATA_SESSION_NOTIFY;
     1524
     1525/**
     1526 * Host service callback data for guest process status notifications.
     1527 */
     1528typedef struct CALLBACKDATA_PROC_STATUS
     1529{
     1530    /** Callback data header. */
     1531    CALLBACKDATA_HEADER hdr;
     1532    /** The process ID (PID). */
     1533    uint32_t uPID;
     1534    /** The process status. */
     1535    uint32_t uStatus;
     1536    /** Optional flags, varies, based on u32Status. */
     1537    uint32_t uFlags;
     1538    /** Optional data buffer (not used atm). */
     1539    void *pvData;
     1540    /** Size of optional data buffer (not used atm). */
     1541    uint32_t cbData;
     1542} CALLBACKDATA_PROC_STATUS;
     1543/** Pointer to a CALLBACKDATA_PROC_OUTPUT struct. */
     1544typedef CALLBACKDATA_PROC_STATUS* PCALLBACKDATA_PROC_STATUS;
     1545
     1546/**
     1547 * Host service callback data for guest process output notifications.
     1548 */
     1549typedef struct CALLBACKDATA_PROC_OUTPUT
     1550{
     1551    /** Callback data header. */
     1552    CALLBACKDATA_HEADER hdr;
     1553    /** The process ID (PID). */
     1554    uint32_t uPID;
     1555    /** The handle ID (stdout/stderr). */
     1556    uint32_t uHandle;
     1557    /** Optional flags (not used atm). */
     1558    uint32_t uFlags;
     1559    /** Optional data buffer. */
     1560    void *pvData;
     1561    /** Size (in bytes) of optional data buffer. */
     1562    uint32_t cbData;
     1563} CALLBACKDATA_PROC_OUTPUT;
     1564/** Pointer to a CALLBACKDATA_PROC_OUTPUT struct. */
     1565typedef CALLBACKDATA_PROC_OUTPUT *PCALLBACKDATA_PROC_OUTPUT;
     1566
     1567/**
     1568 * Host service callback data guest process input notifications.
     1569 */
     1570typedef struct CALLBACKDATA_PROC_INPUT
     1571{
     1572    /** Callback data header. */
     1573    CALLBACKDATA_HEADER hdr;
     1574    /** The process ID (PID). */
     1575    uint32_t uPID;
     1576    /** Current input status. */
     1577    uint32_t uStatus;
     1578    /** Optional flags. */
     1579    uint32_t uFlags;
     1580    /** Size (in bytes) of processed input data. */
     1581    uint32_t uProcessed;
     1582} CALLBACKDATA_PROC_INPUT;
     1583/** Pointer to a CALLBACKDATA_PROC_INPUT struct. */
     1584typedef CALLBACKDATA_PROC_INPUT *PCALLBACKDATA_PROC_INPUT;
     1585
     1586/**
     1587 * General guest file notification callback.
     1588 */
     1589typedef struct CALLBACKDATA_FILE_NOTIFY
     1590{
     1591    /** Callback data header. */
     1592    CALLBACKDATA_HEADER hdr;
     1593    /** Notification type. */
     1594    uint32_t uType;
     1595    /** IPRT result of overall operation. */
     1596    uint32_t rc;
     1597    union
     1598    {
     1599        struct
     1600        {
     1601            /** Guest file handle. */
     1602            uint32_t uHandle;
     1603        } open;
     1604        /** Note: Close does not have any additional data (yet). */
     1605        struct
     1606        {
     1607            /** How much data (in bytes) have been read. */
     1608            uint32_t cbData;
     1609            /** Actual data read (if any). */
     1610            void *pvData;
     1611        } read;
     1612        struct
     1613        {
     1614            /** How much data (in bytes) have been successfully written. */
     1615            uint32_t cbWritten;
     1616        } write;
     1617        struct
     1618        {
     1619            /** New file offset after successful seek. */
     1620            uint64_t uOffActual;
     1621        } seek;
     1622        struct
     1623        {
     1624            /** New file offset after successful tell. */
     1625            uint64_t uOffActual;
     1626        } tell;
     1627        struct
     1628        {
     1629            /** The new file siz.e */
     1630            uint64_t cbSize;
     1631        } SetSize;
     1632    } u;
     1633} CALLBACKDATA_FILE_NOTIFY;
     1634/** Pointer to a CALLBACKDATA_FILE_NOTIFY, struct. */
     1635typedef CALLBACKDATA_FILE_NOTIFY *PCALLBACKDATA_FILE_NOTIFY;
    14621636
    14631637/**
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