Changeset 58329 in vbox for trunk/include/VBox/HostServices
- Timestamp:
- Oct 20, 2015 10:05:12 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103528
- Location:
- trunk/include/VBox/HostServices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/DragAndDropSvc.h
r58257 r58329 32 32 * Protocol changelog: 33 33 * 34 * Protocol v1 (VBox < 5.0 ):35 * -Initial implementation which only implemented host to guest transfers.36 * -For file transfers all file information such as the file name and file size were34 * Protocol v1 (VBox < 5.0, deprecated): 35 * | Initial implementation which only implemented host to guest transfers. 36 * | For file transfers all file information such as the file name and file size were 37 37 * transferred with every file data chunk being sent. 38 38 * 39 * Protocol v2 (VBox 5.0 ):40 * -Added support for guest to host transfers.41 * -Added protocol version support through VBOXDNDCONNECTMSG. The host takes the installed39 * Protocol v2 (VBox 5.0 - VBox 5.0.8, deprecated): 40 * + Added support for guest to host transfers. 41 * + Added protocol version support through VBOXDNDCONNECTMSG. The host takes the installed 42 42 * Guest Additions version as indicator which protocol to use for communicating with the guest. 43 43 * The guest itself uses VBOXDNDCONNECTMSG to report its supported protocol version to the DnD service. 44 44 * 45 * Protocol v3 (VBox 5.0+): 46 Added context IDs for every HGCM message. Not used yet and must be 0. 47 * - Added VBOXDNDSNDDATAHDR and VBOXDNDCBSNDDATAHDRDATA to support (simple) accounting of objects 45 * Protocol v3 (VBox 5.0.10 and up, current): 46 * + Added VBOXDNDDISCONNECTMSG for being able to track client disconnects on host side (Main). 47 * + Added context IDs for every HGCM message. Not used yet and must be 0. 48 * + Added VBOXDNDSNDDATAHDR and VBOXDNDCBSNDDATAHDRDATA to support (simple) accounting of objects 48 49 * being transferred, along with supplying separate meta data size (which is part of the total size being sent). 49 * -Added new HOST_DND_HG_SND_DATA_HDR + GUEST_DND_GH_SND_DATA_HDR commands which now allow specifying an optional50 * + Added new HOST_DND_HG_SND_DATA_HDR + GUEST_DND_GH_SND_DATA_HDR commands which now allow specifying an optional 50 51 * compression type and defining a checksum for the overall data transfer. 51 * -Enhannced VBOXDNDGHSENDDATAMSG to support (rolling) checksums for the supplied data block.52 * - VBOXDNDHGSENDFILEDATAMSG and VBOXDNDGHSENDFILEDATAMSG are now sharing the same HGCM mesasge.53 * - VBOXDNDHGSENDDATAMSG and VBOXDNDGHSENDDATAMSG can now contain an optional checksum for the current data block.52 * + Enhannced VBOXDNDGHSENDDATAMSG to support (rolling) checksums for the supplied data block. 53 * + VBOXDNDHGSENDDATAMSG and VBOXDNDGHSENDDATAMSG can now contain an optional checksum for the current data block. 54 * | VBOXDNDHGSENDFILEDATAMSG and VBOXDNDGHSENDFILEDATAMSG are now sharing the same HGCM mesasge. 54 55 * - Removed unused HOST_DND_GH_RECV_DIR, HOST_DND_GH_RECV_FILE_DATA and HOST_DND_GH_RECV_FILE_HDR commands. 55 56 */ … … 184 185 enum eGuestFn 185 186 { 186 /* Guest sends a connection request to the HGCM service. 187 /* Guest sends a connection request to the HGCM service, 188 * along with some additional information like supported 189 * protocol version and flags. 187 190 * Note: New since protocol version 2. */ 188 191 GUEST_DND_CONNECT = 10, 192 193 /* Sent when a guest client disconnected from the HGCM service. */ 194 GUEST_DND_DISCONNECT = 11, 189 195 190 196 /** … … 287 293 HGCMFunctionParameter uAllActions; /* OUT uint32_t */ 288 294 HGCMFunctionParameter pvFormats; /* OUT ptr */ 289 HGCMFunctionParameter c Formats;/* OUT uint32_t */295 HGCMFunctionParameter cbFormats; /* OUT uint32_t */ 290 296 } v1; 291 297 struct … … 299 305 HGCMFunctionParameter uAllActions; /* OUT uint32_t */ 300 306 HGCMFunctionParameter pvFormats; /* OUT ptr */ 301 HGCMFunctionParameter c Formats;/* OUT uint32_t */307 HGCMFunctionParameter cbFormats; /* OUT uint32_t */ 302 308 } v3; 303 309 } u; … … 680 686 681 687 /** 682 * HG Acknowledge Operation event. 688 * Acknowledges a host operation along with the allowed 689 * action(s) on the guest. 683 690 * 684 691 * Used by: … … 923 930 uint32_t uFlags; 924 931 } VBOXDNDCBCONNECTMSGDATA, *PVBOXDNDCBCONNECTMSGDATA; 932 933 typedef struct VBOXDNDCBDISCONNECTMSGDATA 934 { 935 /** Callback data header. */ 936 VBOXDNDCBHEADERDATA hdr; 937 } VBOXDNDCBDISCONNECTMSGDATA, *PVBOXDNDCBDISCONNECTMSGDATA; 925 938 926 939 typedef struct VBOXDNDCBHGGETNEXTHOSTMSG -
trunk/include/VBox/HostServices/Service.h
r58106 r58329 300 300 } 301 301 302 pr ivate:302 protected: 303 303 304 304 uint32_t m_uClientId; … … 310 310 PVBOXHGCMSVCPARM m_paParms; 311 311 }; 312 313 /** 314 * Structure for keeping a HGCM service context. 315 */ 316 typedef struct VBOXHGCMSVCTX 317 { 318 /** HGCM helper functions. */ 319 PVBOXHGCMSVCHELPERS pHelpers; 320 /* 321 * Callback function supplied by the host for notification of updates 322 * to properties. 323 */ 324 PFNHGCMSVCEXT pfnHostCallback; 325 /** User data pointer to be supplied to the host callback function. */ 326 void *pvHostData; 327 } VBOXHGCMSVCTX, *PVBOXHGCMSVCTX; 312 328 313 329 template <class T> … … 383 399 protected: 384 400 explicit AbstractService(PVBOXHGCMSVCHELPERS pHelpers) 385 : m_pHelpers(pHelpers)386 , m_pfnHostCallback(NULL)387 , m_pvHostData(NULL)388 {}401 { 402 RT_ZERO(m_SvcCtx); 403 m_SvcCtx.pHelpers = pHelpers; 404 } 389 405 virtual int init(VBOXHGCMSVCFNTABLE *ptable) { return VINF_SUCCESS; } 390 406 virtual int uninit() { return VINF_SUCCESS; } … … 396 412 /** Type definition for use in callback functions. */ 397 413 typedef AbstractService SELF; 398 /** HGCM helper functions. */ 399 PVBOXHGCMSVCHELPERS m_pHelpers; 400 /* 401 * Callback function supplied by the host for notification of updates 402 * to properties. 403 */ 404 PFNHGCMSVCEXT m_pfnHostCallback; 405 /** User data pointer to be supplied to the host callback function. */ 406 void *m_pvHostData; 414 /** The HGCM service context this service is bound to. */ 415 VBOXHGCMSVCTX m_SvcCtx; 407 416 408 417 /** … … 500 509 LogFlowFunc(("pvService=%p, pfnExtension=%p, pvExtention=%p\n", pvService, pfnExtension, pvExtension)); 501 510 SELF *pSelf = reinterpret_cast<SELF *>(pvService); 502 pSelf->m_ pfnHostCallback = pfnExtension;503 pSelf->m_ pvHostData= pvExtension;511 pSelf->m_SvcCtx.pfnHostCallback = pfnExtension; 512 pSelf->m_SvcCtx.pvHostData = pvExtension; 504 513 return VINF_SUCCESS; 505 514 }
Note:
See TracChangeset
for help on using the changeset viewer.