summaryrefslogtreecommitdiff
path: root/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h
blob: e88d169d952b12e71f85fff58cc4d8e3cdd2da0f (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*********************************************************
 * 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 _TCLODEFS_H_
#define _TCLODEFS_H_

/**
 * @file tclodefs.h
 *
 * Miscelaneous GuestRPC definitions. There include generic definitions not
 * particular to any application, and also some application-specific definitions
 * that don't really justify a separate header file.
 */

/** TCLO channel name for the main Tools service. */
#define TOOLS_DAEMON_NAME         "toolbox"
/** TCLO channel name for the Tools configuration UI. */
#define TOOLS_CTLPANEL_NAME       "toolbox-ui"
/** TCLO channel name for the Tools user service. */
#define TOOLS_DND_NAME            "toolbox-dnd"
/** TCLO channel name for the Tools upgraded. */
#define TOOLS_UPGRADER_NAME       "tools-upgrader"
/** TCLO channel name for the VDI single-sign-on service. */
#define TOOLS_SSO_NAME            "tools-sso"
/** TCLO channel name for the HGFS driver. */
#define TOOLS_HGFS_NAME           "tools-hgfs"

/*
 * The TCLO channel names used by the View Agent Service.
 * vdiagent may register RPC callbacks to be notified of certain events not
 * handled by Tools Service.
 */
#define TOOLS_VDIAGENT_NAME       "vdiagent"

/** Reply from host when the command is not recognized. */
#define RPCI_UNKNOWN_COMMAND      "Unknown command"

#define GUESTRPC_TCLO_VSOCK_LISTEN_PORT      975
#define GUESTRPC_RPCI_VSOCK_LISTEN_PORT      976

/*
 * Tools options.
 */

#define TOOLSOPTION_COPYPASTE                     "copypaste"
#define TOOLSOPTION_AUTOHIDE                      "autohide"
#define TOOLSOPTION_BROADCASTIP                   "broadcastIP"
#define TOOLSOPTION_ENABLEDND                     "enableDnD"
#define TOOLSOPTION_MAP_ROOT_HGFS_SHARE           "mapRootHgfsShare"
#define TOOLSOPTION_LINK_ROOT_HGFS_SHARE          "linkRootHgfsShare"
#define TOOLSOPTION_ENABLE_MESSAGE_BUS_TUNNEL     "enableMessageBusTunnel"

/*
 * Auto-upgrade commands.
 */

#define AUTOUPGRADE_AVAILABLE_CMD   "vmx.capability.tools_is_upgradable"
#define AUTOUPGRADE_START_CMD       "guest.initiateAutoUpgrade"

/* More upgrader commands. */
#define GUEST_UPGRADER_SEND_CMD_LINE_ARGS  "guest.upgrader_send_cmd_line_args"

/*
 * Shrink commands.
 */

#define DISK_SHRINK_CMD             "disk.shrink"

/*
 * Auto-lock commands.
 */

#define DESKTOP_AUTOLOCK_CMD        "Autolock_Desktop"


/*
 * The max selection buffer length has to be less than the
 * ipc msg max size b/c the selection is transferred from mks -> vmx
 * and then through the backdoor to the tools. Also, leave
 * some room for ipc msg overhead.
 */
#define MAX_SELECTION_BUFFER_LENGTH       ((1 << 16) - 100)

#define VMWARE_DONT_EXCHANGE_SELECTIONS	(-2)
#define VMWARE_SELECTION_NOT_READY        (-1)

#define VMWARE_GUI_AUTO_GRAB              0x001
#define VMWARE_GUI_AUTO_UNGRAB            0x002
#define VMWARE_GUI_AUTO_SCROLL            0x004
#define VMWARE_GUI_AUTO_RAISE             0x008
#define VMWARE_GUI_EXCHANGE_SELECTIONS    0x010
#define VMWARE_GUI_WARP_CURSOR_ON_UNGRAB  0x020
#define VMWARE_GUI_FULL_SCREEN            0x040

#define VMWARE_GUI_TO_FULL_SCREEN         0x080
#define VMWARE_GUI_TO_WINDOW              0x100

#define VMWARE_GUI_AUTO_RAISE_DISABLED    0x200

#define VMWARE_GUI_SYNC_TIME              0x400

/* When set, toolboxes should not show the cursor options page. */
#define VMWARE_DISABLE_CURSOR_OPTIONS     0x800

#define  RPCIN_TCLO_PING                 0x1

enum {
   GUESTRPCPKT_TYPE_DATA = 1,
   GUESTRPCPKT_TYPE_PING
};

enum {
   GUESTRPCPKT_FIELD_TYPE = 1,
   GUESTRPCPKT_FIELD_PAYLOAD
};

#endif /* _TCLODEFS_H_ */