VirtualBox

Changeset 13376 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 17, 2008 2:20:28 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38102
Message:

HostServices/GuestProperties: use an HGCM service extension instead of the callback type I added

File:
1 edited

Legend:

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

    r13293 r13376  
    206206     * The parameter format matches that of ENUM_PROPS.
    207207     */
    208     ENUM_PROPS_HOST = 6,
    209     /**
    210      * Register a callback with the service which will be called when a
    211      * property is modified.  The callback is a function returning void and
    212      * taking a pointer to a HOSTCALLBACKDATA structure.
    213      */
    214     REGISTER_CALLBACK = 7
    215 };
    216 
    217 typedef struct _HOSTCALLBACKDATA
    218 {
    219     /** Callback structure header */
    220     VBOXHGCMCALLBACKHDR hdr;
    221     /** The name of the property that was changed */
    222     const char *pcszName;
    223     /** The new property value, or NULL if the property was deleted */
    224     const char *pcszValue;
    225     /** The timestamp of the modification */
    226     uint64_t u64Timestamp;
    227     /** The flags field of the modified property */
    228     const char *pcszFlags;
    229 } HOSTCALLBACKDATA, *PHOSTCALLBACKDATA;
     208    ENUM_PROPS_HOST = 6
     209};
    230210
    231211/**
     
    248228
    249229/**
     230 * Data structure to pass to the service extension callback.  We use this to
     231 * notify the host of changes to properties.
     232 */
     233typedef struct _HOSTCALLBACKDATA
     234{
     235    /** Magic number to identify the structure */
     236    uint32_t u32Magic;
     237    /** The name of the property that was changed */
     238    const char *pcszName;
     239    /** The new property value, or NULL if the property was deleted */
     240    const char *pcszValue;
     241    /** The timestamp of the modification */
     242    uint64_t u64Timestamp;
     243    /** The flags field of the modified property */
     244    const char *pcszFlags;
     245} HOSTCALLBACKDATA, *PHOSTCALLBACKDATA;
     246
     247enum
     248{
     249    /** Magic number for sanity checking the HOSTCALLBACKDATA structure */
     250    HOSTCALLBACKMAGIC = 0x69c87a78
     251};
     252
     253/**
    250254 * HGCM parameter structures.  Packing is explicitly defined as this is a wire format.
    251255 */
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