VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTrayMsg.h@ 96407

Last change on this file since 96407 was 96407, checked in by vboxsync, 3 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: VBoxTrayMsg.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VBoxTrayMsg - Globally registered messages (RPC) to/from VBoxTray.
4 */
5
6/*
7 * Copyright (C) 2010-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef GA_INCLUDED_SRC_WINNT_VBoxTray_VBoxTrayMsg_h
29#define GA_INCLUDED_SRC_WINNT_VBoxTray_VBoxTrayMsg_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/** The IPC pipe's prefix (native).
35 * Will be followed by the username VBoxTray runs under. */
36#define VBOXTRAY_IPC_PIPE_PREFIX "\\\\.\\pipe\\VBoxTrayIPC-"
37/** The IPC header's magic. */
38#define VBOXTRAY_IPC_HDR_MAGIC 0x19840804
39
40enum VBOXTRAYIPCMSGTYPE
41{
42 /** Restarts VBoxTray. */
43 VBOXTRAYIPCMSGTYPE_RESTART = 10,
44 /** Shows a balloon message in the tray area. */
45 VBOXTRAYIPCMSGTYPE_SHOWBALLOONMSG = 100,
46 /** Retrieves the current user's last input
47 * time. This will be the user VBoxTray is running
48 * under. No actual message for this command
49 * required. */
50 VBOXTRAYIPCMSGTYPE_USERLASTINPUT = 120
51};
52
53/* VBoxTray's IPC header. */
54typedef struct VBOXTRAYIPCHEADER
55{
56 /** The header's magic. */
57 uint32_t uMagic;
58 /** Header version, must be 0 by now. */
59 uint32_t uHdrVersion;
60 /** Message type. Specifies a message
61 * of VBOXTRAYIPCMSGTYPE. */
62 uint32_t uMsgType;
63 /** Message length (in bytes). This must
64 * include the overall message length, including
65 * (eventual) dynamically allocated areas which
66 * are passed into the message structure.
67 */
68 uint32_t uMsgLen;
69
70} VBOXTRAYIPCHEADER, *PVBOXTRAYIPCHEADER;
71
72/**
73 * Tells VBoxTray to show a balloon message in Windows'
74 * tray area. This may or may not work depending on the
75 * system's configuration / set user preference.
76 */
77typedef struct VBOXTRAYIPCMSG_SHOWBALLOONMSG
78{
79 /** Length of message body (in bytes). */
80 uint32_t cbMsgContent;
81 /** Length of message title (in bytes). */
82 uint32_t cbMsgTitle;
83 /** Message type. */
84 uint32_t uType;
85 /** Time to show the message (in ms). */
86 uint32_t uShowMS;
87 /** Dynamically allocated stuff.
88 *
89 * Note: These must come at the end of the
90 * structure to not overwrite any important
91 * stuff above.
92 */
93 /** Message body. Can be up to 256 chars
94 * long. */
95 char szMsgContent[1];
96 /** Message title. Can be up to 73 chars
97 * long. */
98 char szMsgTitle[1];
99} VBOXTRAYIPCMSG_SHOWBALLOONMSG, *PVBOXTRAYIPCMSG_SHOWBALLOONMSG;
100
101/**
102 * Response telling the last input of the current user.
103 */
104typedef struct VBOXTRAYIPCRES_USERLASTINPUT
105{
106 /** Last occurred user input event (in seconds). */
107 uint32_t uLastInput;
108} VBOXTRAYIPCRES_USERLASTINPUT, *PVBOXTRAYIPCRES_USERLASTINPUT;
109
110#endif /* !GA_INCLUDED_SRC_WINNT_VBoxTray_VBoxTrayMsg_h */
111
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette