summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/WINNT/VBoxMMR/tsmf.h
blob: b84ab4310c9e60274be90e20a70baaab889c5ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* $Id: tsmf.h $ */
/** @file
 * VBoxMMR - Multimedia Redirection
 */

/*
 * Copyright (C) 2012 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#ifndef ___TSMF_H
#define ___TSMF_H

/*
 * BEGIN: TSMFRAW defines for both the guest and the server.
 */

/* TSMFRAW functions. */
#define TSMFRAW_FN_CHANNEL_CREATE 1 /* Create a TSMF channel. */
#define TSMFRAW_FN_CHANNEL_CLOSE  2 /* Close the channel. */
#define TSMFRAW_FN_CHANNEL_DATA   3 /* Send data over the channel. */

/* The header of all tsmfraw transport messages. This is used by both the requests and the responses. */
#pragma pack(1)
typedef struct TSMFRAWMSGHDR
{
    DWORD u32Function;       /* TSMFRAW_FN_* */
    DWORD u32ChannelHandle;  /* The TSMF channel handle. */
} TSMFRAWMSGHDR;

/* u32ChannelHandle is assigned by the guest. */
typedef struct TSMFRAWCREATEREQ
{
    TSMFRAWMSGHDR hdr;
} TSMFRAWCREATEREQ;

/* u32Result is 0, if the channel creation failed. */
typedef struct TSMFRAWCREATERSP
{
    TSMFRAWMSGHDR hdr;
    DWORD u32Result;         /* How the request completed. */
} TSMFRAWCREATERSP;

/* The server must close the channel. */
typedef struct TSMFRAWCLOSE
{
    TSMFRAWMSGHDR hdr;
} TSMFRAWCLOSE;

/* Either the guest sends data to the client or the server forwards the received data to the guest. */
typedef struct TSMFRAWDATA
{
    TSMFRAWMSGHDR hdr;
    DWORD u32DataSize;       /* The size of data. */
    DWORD u32DataOffset;     /* Relative to the structure start. */
    /* u32DataSize bytes follow. */
} TSMFRAWDATA;

#pragma pack()

typedef struct TSMFRAWDATA TSMFRAWDATA;

#endif /* ___TSMF_H */