1 | /* $Id: tsmf.h 44864 2013-02-28 12:18:42Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxMMR - Multimedia Redirection
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___TSMF_H
|
---|
19 | #define ___TSMF_H
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * BEGIN: TSMFRAW defines for both the guest and the server.
|
---|
23 | */
|
---|
24 |
|
---|
25 | /* TSMFRAW functions. */
|
---|
26 | #define TSMFRAW_FN_CHANNEL_CREATE 1 /* Create a TSMF channel. */
|
---|
27 | #define TSMFRAW_FN_CHANNEL_CLOSE 2 /* Close the channel. */
|
---|
28 | #define TSMFRAW_FN_CHANNEL_DATA 3 /* Send data over the channel. */
|
---|
29 |
|
---|
30 | /* The header of all tsmfraw transport messages. This is used by both the requests and the responses. */
|
---|
31 | #pragma pack(1)
|
---|
32 | typedef struct TSMFRAWMSGHDR
|
---|
33 | {
|
---|
34 | DWORD u32Function; /* TSMFRAW_FN_* */
|
---|
35 | DWORD u32ChannelHandle; /* The TSMF channel handle. */
|
---|
36 | } TSMFRAWMSGHDR;
|
---|
37 |
|
---|
38 | /* u32ChannelHandle is assigned by the guest. */
|
---|
39 | typedef struct TSMFRAWCREATEREQ
|
---|
40 | {
|
---|
41 | TSMFRAWMSGHDR hdr;
|
---|
42 | } TSMFRAWCREATEREQ;
|
---|
43 |
|
---|
44 | /* u32Result is 0, if the channel creation failed. */
|
---|
45 | typedef struct TSMFRAWCREATERSP
|
---|
46 | {
|
---|
47 | TSMFRAWMSGHDR hdr;
|
---|
48 | DWORD u32Result; /* How the request completed. */
|
---|
49 | } TSMFRAWCREATERSP;
|
---|
50 |
|
---|
51 | /* The server must close the channel. */
|
---|
52 | typedef struct TSMFRAWCLOSE
|
---|
53 | {
|
---|
54 | TSMFRAWMSGHDR hdr;
|
---|
55 | } TSMFRAWCLOSE;
|
---|
56 |
|
---|
57 | /* Either the guest sends data to the client or the server forwards the received data to the guest. */
|
---|
58 | typedef struct TSMFRAWDATA
|
---|
59 | {
|
---|
60 | TSMFRAWMSGHDR hdr;
|
---|
61 | DWORD u32DataSize; /* The size of data. */
|
---|
62 | DWORD u32DataOffset; /* Relative to the structure start. */
|
---|
63 | /* u32DataSize bytes follow. */
|
---|
64 | } TSMFRAWDATA;
|
---|
65 |
|
---|
66 | #pragma pack()
|
---|
67 |
|
---|
68 | typedef struct TSMFRAWDATA TSMFRAWDATA;
|
---|
69 |
|
---|
70 | #endif /* ___TSMF_H */
|
---|