VirtualBox

Changeset 98792 in vbox for trunk/src/VBox/Main


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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