VirtualBox

Changeset 43462 in vbox for trunk/include


Ignore:
Timestamp:
Sep 28, 2012 10:46:41 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80995
Message:

HGCM Host Channel service: implemented a generic Query function.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r43347 r43462  
    4545#define VBOX_HOST_CHANNEL_FN_SEND         3 /* Send data to the host. */
    4646#define VBOX_HOST_CHANNEL_FN_RECV         4 /* Receive data from the host. */
    47 #define VBOX_HOST_CHANNEL_FN_CONTROL      5 /* Generic data exchange. */
     47#define VBOX_HOST_CHANNEL_FN_CONTROL      5 /* Generic data exchange using a channel instance. */
    4848#define VBOX_HOST_CHANNEL_FN_EVENT_WAIT   6 /* Blocking wait for a host event. */
    4949#define VBOX_HOST_CHANNEL_FN_EVENT_CANCEL 7 /* Cancel the blocking wait. */
     50#define VBOX_HOST_CHANNEL_FN_QUERY        8 /* Generic data exchange using a channel name. */
    5051
    5152/*
     
    5657#define VBOX_HOST_CHANNEL_EVENT_RECV         2    /* Data is available for receiving. */
    5758#define VBOX_HOST_CHANNEL_EVENT_USER         1000 /* Base of channel specific events. */
     59
     60/*
     61 * The common control code ids for the VBOX_HOST_CHANNEL_FN_[CONTROL|QUERY]
     62 */
     63#define VBOX_HOST_CHANNEL_CTRL_EXISTS     0    /* Whether the channel instance or provider exists. */
     64#define VBOX_HOST_CHANNEL_CTRL_USER       1000 /* Base of channel specific events. */
    5865
    5966#pragma pack(1)
     
    122129    VBoxGuestHGCMCallInfo hdr;
    123130} VBoxHostChannelEventCancel;
     131
     132typedef struct VBoxHostChannelQuery
     133{
     134    VBoxGuestHGCMCallInfo hdr;
     135    HGCMFunctionParameter name;   /* IN linear ptr: Channel name utf8 nul terminated. */
     136    HGCMFunctionParameter code;   /* IN uint32_t: The control code. */
     137    HGCMFunctionParameter parm;   /* IN linear pointer: Parameters of the function. */
     138    HGCMFunctionParameter data;   /* OUT linear pointer: Buffer for results. */
     139    HGCMFunctionParameter sizeDataReturned; /* OUT uint32_t: Bytes returned in the 'data' buffer. */
     140} VBoxHostChannelQuery;
    124141
    125142
     
    180197                                                   uint32_t *pcbReceived, uint32_t *pcbRemaining));
    181198
    182     /* The guest talks to the provider of the channel. */
     199    /* The guest talks to the provider of the channel.
     200     * @param pvChannel The channel instance. NULL if the target is the provider, rather than a channel.
     201     */
    183202    DECLR3CALLBACKMEMBER(int, HostChannelControl, (void *pvChannel, uint32_t u32Code,
    184203                                                   const void *pvParm, uint32_t cbParm,
  • trunk/include/VBox/VBoxGuestLib.h

    r43346 r43462  
    737737                                            uint32_t *pu32SizeReturned);
    738738VBGLR3DECL(int)  VbglR3HostChannelEventCancel(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
     739VBGLR3DECL(int)  VbglR3HostChannelQuery(const char *pszName, uint32_t u32HGCMClientId, uint32_t u32Code,
     740                                        void *pvParm, uint32_t cbParm, void *pvData, uint32_t cbData,
     741                                        uint32_t *pu32SizeDataReturned);
    739742
    740743#endif /* IN_RING3 */
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