VirtualBox

Changeset 75969 in vbox for trunk/include


Ignore:
Timestamp:
Dec 5, 2018 12:08:09 PM (6 years ago)
Author:
vboxsync
Message:

HGCM,GuestProps: Added HGCM service notifications for VM power-on, VM resume, VM suspend, VM reset and VM power-off. Made use of the first two in guest properties to wake up guest programs waiting on any of the host version properties. Also moved inserting sysprep and host version properties to the services as that's a better home than ConsoleImpl/VMMDevInterface in my opinion.

File:
1 edited

Legend:

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

    r75853 r75969  
    7373 * 6.4->6.5 Bacause pfnGetVMMDevSessionId was added pfnLoadState got the version
    7474 *          parameter (VBox 6.0).
     75 * 6.5->7.1 Because pfnNotify was added.
    7576 */
    76 #define VBOX_HGCM_SVC_VERSION_MAJOR (0x0006)
    77 #define VBOX_HGCM_SVC_VERSION_MINOR (0x0004)
     77#define VBOX_HGCM_SVC_VERSION_MAJOR (0x0007)
     78#define VBOX_HGCM_SVC_VERSION_MINOR (0x0001)
    7879#define VBOX_HGCM_SVC_VERSION ((VBOX_HGCM_SVC_VERSION_MAJOR << 16) + VBOX_HGCM_SVC_VERSION_MINOR)
    7980
     
    448449typedef FNHGCMSVCEXT *PFNHGCMSVCEXT;
    449450
     451/**
     452 * Notification event.
     453 */
     454typedef enum HGCMNOTIFYEVENT
     455{
     456    HGCMNOTIFYEVENT_INVALID = 0,
     457    HGCMNOTIFYEVENT_POWER_ON,
     458    HGCMNOTIFYEVENT_RESUME,
     459    HGCMNOTIFYEVENT_SUSPEND,
     460    HGCMNOTIFYEVENT_RESET,
     461    HGCMNOTIFYEVENT_POWER_OFF,
     462    HGCMNOTIFYEVENT_END,
     463    HGCMNOTIFYEVENT_32BIT_HACK = 0x7fffffff
     464} HGCMNOTIFYEVENT;
     465
     466
    450467/** The Service DLL entry points.
    451468 *
     
    453470 *  function and the DLL must fill in the VBOXHGCMSVCFNTABLE
    454471 *  with function pointers.
     472 *
     473 *  @note The structure is used in separately compiled binaries so an explicit
     474 *        packing is required.
    455475 */
    456 
    457 /* The structure is used in separately compiled binaries so an explicit packing is required. */
    458476typedef struct VBOXHGCMSVCFNTABLE
    459477{
     
    509527    /** Register a service extension callback. */
    510528    DECLR3CALLBACKMEMBER(int, pfnRegisterExtension, (void *pvService, PFNHGCMSVCEXT pfnExtension, void *pvExtension));
     529
     530    /** Notification (VM state). */
     531    DECLR3CALLBACKMEMBER(void, pfnNotify, (void *pvService, HGCMNOTIFYEVENT enmEvent));
    511532
    512533    /** User/instance data pointer for the service. */
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