VirtualBox

Changeset 13916 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Nov 6, 2008 1:48:05 PM (16 years ago)
Author:
vboxsync
Message:

HostServices/GuestProperties: added guest notification querying

File:
1 edited

Legend:

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

    r13780 r13916  
    5959/** Maximum size for enumeration patterns */
    6060enum { MAX_PATTERN_LEN = 1024 };
     61/** Maximum number of changes we remember for guest notifications */
     62enum { MAX_GUEST_NOTIFICATIONS = 256 };
    6163
    6264/**
     
    264266    DEL_PROP = 4,
    265267    /** Enumerate guest properties */
    266     ENUM_PROPS = 5
     268    ENUM_PROPS = 5,
     269    /** Poll for guest notifications */
     270    GET_NOTIFICATION = 6
    267271};
    268272
     
    426430    HGCMFunctionParameter size;
    427431} EnumProperties;
     432
     433/**
     434 * The guest is polling for notifications on changes to properties, optionally
     435 * specifying the timestamp of the last notification seen.
     436 * On success, VINF_SUCCESS will be returned and the buffer will contain
     437 * details of a property notification.  If no new notification is available,
     438 * a timestamp of zero will be returned.
     439 * If the last notification could not be found by timestamp, VWRN_NOT_FOUND
     440 * will be returned and the oldest available notification will be returned.
     441 * if no timestamp is specified, the oldest available notification will be
     442 * returned.
     443 * If the buffer supplied was not large enough to hold the notification,
     444 * VERR_BUFFER_OVERFLOW will be returned and the size parameter will contain
     445 * the size of the buffer needed.
     446 */
     447typedef struct _GetNotification
     448{
     449    VBoxGuestHGCMCallInfo hdr;
     450
     451    /**
     452     * The timestamp of the last change seen (IN uint64_t)
     453     * This may be zero, in which case the oldest available change will be
     454     * sent.  If the service does not remember an event matching the
     455     * timestamp, then VWRN_NOT_FOUND will be returned, and the guest should
     456     * assume that it has missed a certain number of notifications.
     457     *
     458     * The timestamp of the change being notified of (OUT uint64_t)
     459     * If this is zero then no new events are available.  Undefined on
     460     * failure.
     461     */
     462    HGCMFunctionParameter timestamp;
     463
     464    /**
     465     * The returned data. if any will be placed here.  (OUT pointer)
     466     * This call returns three null-terminated strings which will be placed
     467     * one after another: name, value and flags.  For a delete notification,
     468     * value and flags will be empty strings.  Undefined on failure.
     469     */
     470    HGCMFunctionParameter buffer;
     471
     472    /**
     473     * On success, the size of the returned data.  (OUT uint32_t)
     474     * On buffer overflow, the size of the buffer needed to hold the data.
     475     * Undefined on failure.
     476     */
     477    HGCMFunctionParameter size;
     478} GetNotification;
    428479#pragma pack ()
    429480
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