1 | /* $Id: VBoxTrayMsg.h 47213 2013-07-17 12:36:02Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxTrayMsg - Globally registered messages (RPC) to/from VBoxTray.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2013 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.alldomusa.eu.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 ___VBOXTRAY_MSG_H
|
---|
19 | #define ___VBOXTRAY_MSG_H
|
---|
20 |
|
---|
21 | #define VBOXTRAY_IPC_PIPENAME "VBoxTrayIPCSvc"
|
---|
22 |
|
---|
23 | enum VBOXTRAYIPCMSGTYPE
|
---|
24 | {
|
---|
25 | /** Restarts VBoxTray. */
|
---|
26 | VBOXTRAYIPCMSGTYPE_RESTART = 10,
|
---|
27 | /** Shows a balloon message in the tray area. */
|
---|
28 | VBOXTRAYIPCMSGTYPE_SHOWBALLOONMSG = 100,
|
---|
29 | /** Retrieves the current user's last input
|
---|
30 | * time. This will be the user VBoxTray is running
|
---|
31 | * under. */
|
---|
32 | VBOXTRAYIPCMSGTYPE_USERLASTINPUT = 120
|
---|
33 | };
|
---|
34 |
|
---|
35 | /* VBoxTray's IPC header. */
|
---|
36 | typedef struct VBOXTRAYIPCHEADER
|
---|
37 | {
|
---|
38 | /** Header version, must be 0 by now. */
|
---|
39 | uint32_t uHdrVersion;
|
---|
40 | /** Message type. Specifies a message
|
---|
41 | * of VBOXTRAYIPCMSGTYPE. */
|
---|
42 | uint32_t uMsgType;
|
---|
43 | /** Message length (in bytes). This must
|
---|
44 | * include the overall message length, including
|
---|
45 | * (eventual) dynamically allocated areas which
|
---|
46 | * are passed into the message structure.
|
---|
47 | */
|
---|
48 | uint32_t uMsgLen;
|
---|
49 |
|
---|
50 | } VBOXTRAYIPCHEADER, *PVBOXTRAYIPCHEADER;
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * Tells VBoxTray to show a balloon message in Windows'
|
---|
54 | * tray area. This may or may not work depending on the
|
---|
55 | * system's configuration / set user preference.
|
---|
56 | */
|
---|
57 | typedef struct VBOXTRAYIPCMSG_SHOWBALLOONMSG
|
---|
58 | {
|
---|
59 | /** Length of message body (in bytes). */
|
---|
60 | uint32_t cbMsgContent;
|
---|
61 | /** Length of message title (in bytes). */
|
---|
62 | uint32_t cbMsgTitle;
|
---|
63 | /** Message type. */
|
---|
64 | uint32_t uType;
|
---|
65 | /** Time to show the message (in ms). */
|
---|
66 | uint32_t uShowMS;
|
---|
67 | /** Dynamically allocated stuff.
|
---|
68 | *
|
---|
69 | * Note: These must come at the end of the
|
---|
70 | * structure to not overwrite any important
|
---|
71 | * stuff above.
|
---|
72 | */
|
---|
73 | /** Message body. Can be up to 256 chars
|
---|
74 | * long. */
|
---|
75 | char szMsgContent[1];
|
---|
76 | /** Message title. Can be up to 73 chars
|
---|
77 | * long. */
|
---|
78 | char szMsgTitle[1];
|
---|
79 | } VBOXTRAYIPCMSG_SHOWBALLOONMSG, *PVBOXTRAYIPCMSG_SHOWBALLOONMSG;
|
---|
80 |
|
---|
81 | /**
|
---|
82 | * Response telling the last input of the current user.
|
---|
83 | */
|
---|
84 | typedef struct VBOXTRAYIPCRES_USERLASTINPUT
|
---|
85 | {
|
---|
86 | uint32_t uTickCount;
|
---|
87 | } VBOXTRAYIPCRES_USERLASTINPUT, *PVBOXTRAYIPCRES_USERLASTINPUT;
|
---|
88 |
|
---|
89 | #endif /* !___VBOXTRAY_MSG_H */
|
---|
90 |
|
---|