From: VMware, Inc <> Date: Sat, 28 May 2011 19:33:52 +0000 (-0700) Subject: vix plugin: cleanup internal headers. X-Git-Tag: 2011.05.27-420096~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00d2d1921fe6cdc6ea763217ae9dd526fe6b648b;p=thirdparty%2Fopen-vm-tools.git vix plugin: cleanup internal headers. Get rid of a few headers by consolidating things a bit. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c index 4f2ac370d..2ca72b42f 100644 --- a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c +++ b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c @@ -68,14 +68,13 @@ #include "guest_msg_def.h" #include "conf.h" #include "vixCommands.h" -#include "foundryToolsDaemon.h" -#include "printer.h" #include "base64.h" #include "syncDriver.h" #include "hgfsServerManager.h" #include "hgfs.h" #include "system.h" #include "codeset.h" +#include "vixToolsInt.h" #if defined(linux) #include "hgfsDevLinux.h" @@ -86,7 +85,6 @@ #include "impersonate.h" #endif -#include "vixTools.h" #include "vixOpenSource.h" #define MAX64_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ diff --git a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.h b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.h deleted file mode 100644 index 5d9501635..000000000 --- a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.h +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************* - * Copyright (C) 1998 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. - * - *********************************************************/ - - -/* - * foundryToolsDaemon.h -- - * - * Foundry related Tools functionality. - * - */ - - -#ifndef __VIX_TOOLS_DAEMON_H__ -# define __VIX_TOOLS_DAEMON_H__ - - -#include "vmware/tools/plugin.h" - -void -FoundryToolsDaemon_Initialize(ToolsAppCtx *ctx); -void -FoundryToolsDaemon_Uninitialize(ToolsAppCtx *ctx); - -#endif /* __VIX_TOOLS_DAEMON_H__ */ diff --git a/open-vm-tools/services/plugins/vix/vixPlugin.c b/open-vm-tools/services/plugins/vix/vixPlugin.c index 4a5ba0cb2..f8438b7ab 100644 --- a/open-vm-tools/services/plugins/vix/vixPlugin.c +++ b/open-vm-tools/services/plugins/vix/vixPlugin.c @@ -27,7 +27,6 @@ #include #include "vmware.h" -#include "foundryToolsDaemon.h" #include "syncDriver.h" #include "vixCommands.h" #include "vixPluginInt.h" diff --git a/open-vm-tools/services/plugins/vix/vixPluginInt.h b/open-vm-tools/services/plugins/vix/vixPluginInt.h index 5479246a2..107f0f8bd 100644 --- a/open-vm-tools/services/plugins/vix/vixPluginInt.h +++ b/open-vm-tools/services/plugins/vix/vixPluginInt.h @@ -28,8 +28,13 @@ #define Debug g_debug #define Warning g_warning +#include "vmware/tools/guestrpc.h" #include "vmware/tools/plugin.h" -#include "rpcin.h" + +void +FoundryToolsDaemon_Initialize(ToolsAppCtx *ctx); +void +FoundryToolsDaemon_Uninitialize(ToolsAppCtx *ctx); gboolean ToolsDaemonTcloCheckUserAccount(RpcInData *data); diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 04e239141..49e0be6ec 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -108,7 +108,6 @@ #endif #include "vixOpenSource.h" -#include "vixTools.h" #include "vixToolsInt.h" #ifdef _WIN32 diff --git a/open-vm-tools/services/plugins/vix/vixTools.h b/open-vm-tools/services/plugins/vix/vixTools.h deleted file mode 100644 index a12ebca06..000000000 --- a/open-vm-tools/services/plugins/vix/vixTools.h +++ /dev/null @@ -1,107 +0,0 @@ -/********************************************************* - * Copyright (C) 1998 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. - * - *********************************************************/ - -/* - * vixTools.h -- - * - * Vix Tools functionality. - * - */ - -#ifndef __VIX_TOOLS_H__ -#define __VIX_TOOLS_H__ - - -struct DblLnkLst_Links; -struct GuestApp_Dict; - - -typedef void (*VixToolsReportProgramDoneProcType)(const char *requestName, - VixError err, - int exitCode, - int64 pid, - void *clientData); - -VixError VixTools_Initialize(Bool thisProcessRunsAsRootArg, - const char * const *originalEnvp, - VixToolsReportProgramDoneProcType reportProgramDoneProc, - void *clientData); - -void VixTools_Uninitialize(void); - -void VixTools_SetConsoleUserPolicy(Bool allowConsoleUserOpsParam); - -void VixTools_SetRunProgramCallback(VixToolsReportProgramDoneProcType reportProgramDoneProc, - void *clientData); - -/* - * These are internal procedures that are exposed for the legacy - * tclo callbacks. - */ -VixError VixToolsRunProgramImpl(char *requestName, - const char *commandLine, - const char *commandLineArgs, - int runProgramOptions, - void *userToken, - void *eventQueue, - int64 *pid); - -#if defined(VMTOOLS_USE_GLIB) -# include - -VixError VixTools_GetToolsPropertiesImpl(GKeyFile *confDictRef, - char **resultBuffer, - size_t *resultBufferLength); - -VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg, - char *requestName, - size_t maxResultBufferSize, - GKeyFile *confDictRef, - GMainLoop *eventQueue, - char **resultBuffer, - size_t *resultLen, - Bool *deleteResultBufferResult); - -#else -VixError VixTools_GetToolsPropertiesImpl(struct GuestApp_Dict **confDictRef, - char **resultBuffer, - size_t *resultBufferLength); - -VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg, - char *requestName, - size_t maxResultBufferSize, - struct GuestApp_Dict **confDictRef, - DblLnkLst_Links *eventQueue, - char **resultBuffer, - size_t *resultLen, - Bool *deleteResultBufferResult); - -#endif - -Bool VixToolsImpersonateUserImpl(char const *credentialTypeStr, - int credentialType, - char const *password, - void **userToken); - -void VixToolsUnimpersonateUser(void *userToken); - -void VixToolsLogoutUser(void *userToken); - -#endif /* __VIX_TOOLS_H__ */ - - diff --git a/open-vm-tools/services/plugins/vix/vixToolsInt.h b/open-vm-tools/services/plugins/vix/vixToolsInt.h index 12249863c..8128cd39a 100644 --- a/open-vm-tools/services/plugins/vix/vixToolsInt.h +++ b/open-vm-tools/services/plugins/vix/vixToolsInt.h @@ -46,6 +46,59 @@ typedef struct VixToolsEnvIterator VixToolsEnvIterator; typedef struct VixToolsUserEnvironment VixToolsUserEnvironment; +typedef void (*VixToolsReportProgramDoneProcType)(const char *requestName, + VixError err, + int exitCode, + int64 pid, + void *clientData); + +VixError VixTools_Initialize(Bool thisProcessRunsAsRootArg, + const char * const *originalEnvp, + VixToolsReportProgramDoneProcType reportProgramDoneProc, + void *clientData); + +void VixTools_Uninitialize(void); + +void VixTools_SetConsoleUserPolicy(Bool allowConsoleUserOpsParam); + +void VixTools_SetRunProgramCallback(VixToolsReportProgramDoneProcType reportProgramDoneProc, + void *clientData); + +/* + * These are internal procedures that are exposed for the legacy + * tclo callbacks. + */ +VixError VixToolsRunProgramImpl(char *requestName, + const char *commandLine, + const char *commandLineArgs, + int runProgramOptions, + void *userToken, + void *eventQueue, + int64 *pid); + +VixError VixTools_GetToolsPropertiesImpl(GKeyFile *confDictRef, + char **resultBuffer, + size_t *resultBufferLength); + +VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg, + char *requestName, + size_t maxResultBufferSize, + GKeyFile *confDictRef, + GMainLoop *eventQueue, + char **resultBuffer, + size_t *resultLen, + Bool *deleteResultBufferResult); + + +Bool VixToolsImpersonateUserImpl(char const *credentialTypeStr, + int credentialType, + char const *password, + void **userToken); + +void VixToolsUnimpersonateUser(void *userToken); + +void VixToolsLogoutUser(void *userToken); + VixError VixToolsNewEnvIterator(void *userToken, VixToolsEnvIterator **envItr); char *VixToolsGetNextEnvVar(VixToolsEnvIterator *envItr);