1
/*********************************************************
2
* Copyright (C) 1998 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
22
* Vix Tools functionality.
26
#ifndef __VIX_TOOLS_H__
27
#define __VIX_TOOLS_H__
30
struct DblLnkLst_Links;
34
typedef void (*VixToolsReportProgramDoneProcType)(const char *requestName,
40
VixError VixTools_Initialize(Bool thisProcessRunsAsRootArg,
41
const char * const *originalEnvp,
42
VixToolsReportProgramDoneProcType reportProgramDoneProc,
45
void VixTools_SetConsoleUserPolicy(Bool allowConsoleUserOpsParam);
47
void VixTools_SetRunProgramCallback(VixToolsReportProgramDoneProcType reportProgramDoneProc,
51
* These are internal procedures that are exposed for the legacy
54
VixError VixToolsRunProgramImpl(char *requestName,
56
char *commandLineArgs,
57
int runProgramOptions,
62
#if defined(VMTOOLS_USE_GLIB)
65
VixError VixTools_GetToolsPropertiesImpl(GKeyFile *confDictRef,
67
size_t *resultBufferLength);
69
VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg,
71
size_t maxResultBufferSize,
72
GKeyFile *confDictRef,
73
GMainLoop *eventQueue,
76
Bool *deleteResultBufferResult);
79
VixError VixTools_GetToolsPropertiesImpl(struct GuestApp_Dict **confDictRef,
81
size_t *resultBufferLength);
83
VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg,
85
size_t maxResultBufferSize,
86
struct GuestApp_Dict **confDictRef,
87
DblLnkLst_Links *eventQueue,
90
Bool *deleteResultBufferResult);
94
Bool VixToolsImpersonateUserImpl(char const *credentialTypeStr,
99
void VixToolsUnimpersonateUser(void *userToken);
101
void VixToolsLogoutUser(void *userToken);
104
VixError VixToolsGetUserTmpDir(void *userToken,
107
Bool VixToolsUserIsMemberOfAdministratorGroup(VixCommandRequestHeader *requestMsg);
110
#if IMPLEMENT_SOCKET_MGR
111
VixError VixToolsSocketConnect(VixCommandRequestHeader *requestMsg,
114
VixError VixToolsSocketListen(VixCommandRequestHeader *requestMsg,
117
VixError VixToolsSocketAccept(VixCommandRequestHeader *requestMsg,
120
VixError VixToolsSocketSend(VixCommandRequestHeader *requestMsg,
123
VixError VixToolsSocketRecv(VixCommandRequestHeader *requestMsg,
126
VixError VixToolsSocketClose(VixCommandRequestHeader *requestMsg);
127
#endif // IMPLEMENT_SOCKET_MGR
130
#endif /* __VIX_TOOLS_H__ */