summaryrefslogtreecommitdiff
path: root/open-vm-tools/lib/include/vmware/tools/desktopevents.h
blob: 98f78e18cf9814b1e90d2656074098e66164da65 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*********************************************************
 * Copyright (C) 2009 VMware, Inc. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation version 2.1 and no later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
 *
 *********************************************************/

#ifndef _DESKTOPEVENTS_H_
#define _DESKTOPEVENTS_H_

/**
 * @file desktopevents.h
 *
 * Public interface for the "switchUser" plugin. This plugin exposes some
 * user session-related events to other plugins.
 *
 * Aside from the functionality exposed in this file, the plugin also
 * emits the TOOLS_CORE_SIG_SESSION_CHANGE signal (which is handled
 * by vmtoolsd automatically when it's run from within the SCM;
 * see plugin.h).
 *
 * Currently the plugin is only available on Win32.
 *
 * @addtogroup vmtools_plugins
 * @{
 */

#if defined(_WIN32)

/**
 * Signal sent when a "desktop switch" event is detected.
 *
 * Defined in desktopevents.h.
 *
 * @param[in]  src      The source object.
 * @param[in]  ctx      ToolsAppCtx *: the application context.
 * @param[in]  data     Client data.
 */
#define TOOLS_CORE_SIG_DESKTOP_SWITCH "tcs_desktop_switch"


/**
 * Name of the message that can be sent to the desktop events window to
 * shut down the vmusr instance.
 */
#define DESKTOP_EVENTS_SHUTDOWN "VMdesktopEventsShutdownMsg"

#else   // !WIN32

/**
 * Signal emitted upon X I/O error callback firing.
 *
 * @param[in]   src     The source object.
 * @param[in]   ctx     ToolsAppCtx *: the application context.
 * @param[in]   data    Client data.
 */
#define TOOLS_CORE_SIG_XIOERROR "tcs_de_xioerror"

/**
 * Signal emitted upon SmcCallbacks::save_yourself.
 *
 * @param[in]   src             The source object.
 * @param[in]   ctx             ToolsAppCtx *: the application context.
 * @parma[in]   saveType        Refer to SMlib.xml.
 * @param[in]   shutdown        0 = checkpoint, 1 = shutdown.
 * @param[in]   interactStyle   May interact with user?
 * @param[in]   fast            Shutdown as quickly as possible.
 * @param[in]   data            Client data.
 */
#define TOOLS_CORE_SIG_XSM_SAVE_YOURSELF "tcs_de_xsm_save_yourself"

/**
 * Signal emitted upon SmcCallbacks::die.
 *
 * @param[in]   src     The source object.
 * @param[in]   ctx     ToolsAppCtx *: the application context.
 * @param[in]   data    Client data.
 */
#define TOOLS_CORE_SIG_XSM_DIE "tcs_de_xsm_die"

/**
 * Signal emitted upon SmcCallbacks::save_complete.
 *
 * @param[in]   src     The source object.
 * @param[in]   ctx     ToolsAppCtx *: the application context.
 * @param[in]   data    Client data.
 */
#define TOOLS_CORE_SIG_XSM_SAVE_COMPLETE "tcs_de_xsm_save_complete"

/**
 * Signal emitted upon SmcCallbacks::shutdown_cancelled.
 *
 * @param[in]   src     The source object.
 * @param[in]   ctx     ToolsAppCtx *: the application context.
 * @param[in]   data    Client data.
 */
#define TOOLS_CORE_SIG_XSM_SHUTDOWN_CANCELLED "tcs_de_xsm_shutdown_cancelled"

#endif  // if defined(_WIN32)

/** @} */

#endif /* _DESKTOPEVENTS_H_ */