]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Remove rpchChannel.h's dependendy on rpcin.h.
authorVMware, Inc <>
Tue, 17 Nov 2009 21:27:24 +0000 (13:27 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 17 Nov 2009 21:27:24 +0000 (13:27 -0800)
rpcChannel.h is part of the "public" tools core API, and shouldn't expose
internal APIs (such as those in rpcin.h). This has the downside of having
to duplicate some definitions from rpcin.h, since we still have code that
uses the rpcin library directly.

This change also standardizes rpcChannel.h's interface to use glib types
and not VMware types. This is the cause of most of the churn in this
change (Bool -> gboolean), and also required the definition of a new type
(RpcInRet) to be used while we still have code that needs to be compatible
both with vmtoolsd and vmware-user; this type can (and should) go away
once vmware-user is deprecated.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
19 files changed:
open-vm-tools/lib/include/resolution.h
open-vm-tools/lib/include/rpcChannel.h
open-vm-tools/lib/include/rpcin.h
open-vm-tools/lib/include/vmtoolsApp.h
open-vm-tools/lib/rpcChannel/bdoorChannel.c
open-vm-tools/lib/rpcChannel/rpcChannel.c
open-vm-tools/lib/rpcIn/rpcin.c
open-vm-tools/services/plugins/guestInfo/guestInfoServer.c
open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
open-vm-tools/services/plugins/powerOps/powerOps.c
open-vm-tools/services/plugins/resolutionSet/resolutionSet.c
open-vm-tools/services/plugins/timeSync/timeSync.c
open-vm-tools/services/plugins/vix/foundryToolsDaemon.c
open-vm-tools/services/plugins/vix/vixPluginInt.h
open-vm-tools/services/plugins/vixUser/vixUser.c
open-vm-tools/services/plugins/vmbackup/stateMachine.c
open-vm-tools/services/vmtoolsd/toolsRpc.c
open-vm-tools/tests/testPlugin/testPlugin.c
open-vm-tools/tests/vmrpcdbg/debugChannel.c

index fcff0c1b87b223818f7414541b0bdfd4eae1076c..f72534ac979209b242db2712b2cdf1ea476bdf8c 100644 (file)
@@ -50,7 +50,6 @@
 #include "includeCheck.h"
 
 #include "vmware.h"
-#include "rpcin.h"
 
 
 /*
@@ -88,6 +87,10 @@ typedef enum {
  * Global functions
  */
 
+#if !defined(VMTOOLS_USE_GLIB)
+
+#include "rpcin.h"
+
 Bool Resolution_Init(const char *tcloChannel, InitHandle handle);
 void Resolution_Cleanup(void);
 
@@ -97,4 +100,6 @@ void Resolution_CleanupBackdoor(void);
 Bool Resolution_RegisterCaps(void);
 Bool Resolution_UnregisterCaps(void);
 
+#endif
+
 #endif // ifndef _LIB_RESOLUTION_H_
index ea03cbf9c90c8db11cfadc19a5b8556aae22ad11..4fdfe3a789b6152acabb36e23ecb30441981cade 100644 (file)
 #  error "This library needs to be compiled with VMTOOLS_USE_GLIB."
 #endif
 
-#include <rpc/rpc.h>
-#include "vm_basic_types.h"
-#include "vm_assert.h"
-#include "rpcin.h"
+#include <glib.h>
+#include "vmware.h"
+
+/** Alias for RpcChannel_SetRetVals. */
+#define RPCIN_SETRETVALS RpcChannel_SetRetVals
 
 struct RpcChannel;
 
+/** Data structure passed to RPC callbacks. */
+typedef struct RpcInData {
+   /** RPC name. */
+   const char *name;
+   /**
+    * RPC arguments. Either the raw argument data, or de-serialized XDR data
+    * in case @a xdrIn was provided in the registration data.
+    */
+   const char *args;
+   /** Size of raw argument data, in bytes. */
+   size_t argsSize;
+   /**
+    * Data to be returned to the caller, or pointer to XDR structure if
+    * @a xdrOut was provided in the registration data.
+    */
+   char *result;
+   /** Length in bytes of raw data being returned (ignored for XDR structures). */
+   size_t resultLen;
+   /**
+    * Whether the RPC library should free the contents of the @a result
+    * field (using vm_free()).
+    */
+   gboolean freeResult;
+   /** Application context. */
+   void *appCtx;
+   /** Client data specified in the registration data. */
+   void *clientData;
+} RpcInData;
+
+
+/**
+ * Type for RpcIn callbacks. The callback function is responsible for
+ * allocating memory for the result string.
+ */
+typedef gboolean (*RpcIn_Callback)(RpcInData *data);
+
+
 /** Defines the registration data for a GuestRPC application. */
 typedef struct RpcChannelCallback {
    /** String identifying the RPC message. */
@@ -72,14 +110,14 @@ typedef struct RpcChannelCallback {
 } RpcChannelCallback;
 
 
-typedef Bool (*RpcChannelStartFn)(struct RpcChannel *);
+typedef gboolean (*RpcChannelStartFn)(struct RpcChannel *);
 typedef void (*RpcChannelStopFn)(struct RpcChannel *);
 typedef void (*RpcChannelShutdownFn)(struct RpcChannel *);
-typedef Bool (*RpcChannelSendFn)(struct RpcChannel *,
-                                 char *data,
-                                 size_t dataLen,
-                                 char **result,
-                                 size_t *resultLen);
+typedef gboolean (*RpcChannelSendFn)(struct RpcChannel *,
+                                     char *data,
+                                     size_t dataLen,
+                                     char **result,
+                                     size_t *resultLen);
 
 
 /**
@@ -122,7 +160,8 @@ typedef struct RpcChannel {
  *
  * @return TRUE on success.
  */
-static INLINE Bool
+
+static INLINE gboolean
 RpcChannel_Start(RpcChannel *chan)
 {
    ASSERT(chan != NULL);
@@ -147,6 +186,7 @@ RpcChannel_Stop(RpcChannel *chan)
    chan->stop(chan);
 }
 
+
 /**
  * Wrapper for the send function of an RPC channel struct.
  *
@@ -159,7 +199,7 @@ RpcChannel_Stop(RpcChannel *chan)
  * @return The status from the remote end (TRUE if call was successful).
  */
 
-static INLINE Bool
+static INLINE gboolean
 RpcChannel_Send(RpcChannel *chan,
                 char *data,
                 size_t dataLen,
@@ -172,7 +212,7 @@ RpcChannel_Send(RpcChannel *chan,
    return chan->send(chan, data, dataLen, result, resultLen);
 }
 
-Bool
+gboolean
 RpcChannel_BuildXdrCommand(const char *cmd,
                            void *xdrProc,
                            void *xdrData,
@@ -182,7 +222,7 @@ RpcChannel_BuildXdrCommand(const char *cmd,
 gboolean
 RpcChannel_Destroy(RpcChannel *chan);
 
-Bool
+gboolean
 RpcChannel_Dispatch(RpcInData *data);
 
 void
@@ -197,6 +237,11 @@ void
 RpcChannel_RegisterCallback(RpcChannel *chan,
                             RpcChannelCallback *rpc);
 
+gboolean
+RpcChannel_SetRetVals(RpcInData *data,
+                      char *result,
+                      gboolean retVal);
+
 void
 RpcChannel_UnregisterCallback(RpcChannel *chan,
                               RpcChannelCallback *rpc);
index 0fe53e949345ab1f974a3873481ecdefb6d19da7..c624c3fc9b3e75813df5db0e2d48a2551ae967e6 100644 (file)
 
 #if defined(VMTOOLS_USE_GLIB)
 #  include <glib.h>
+   typedef gboolean RpcInRet;
 #else
 #  include "dbllnklst.h"
+   typedef Bool RpcInRet;
 #endif
 
-/* Helper macro for porting old callbacks that currently use RpcIn_SetRetVals. */
-#define RPCIN_SETRETVALS(data, val, retVal)                                \
-   RpcIn_SetRetVals((char const **) &(data)->result, &(data)->resultLen,   \
-                    (val), (retVal))
-
 typedef void RpcIn_ErrorFunc(void *clientData, char const *status);
 
 typedef struct RpcIn RpcIn;
 
+#if defined(VMTOOLS_USE_GLIB)
+
+RpcIn *RpcIn_Construct(GMainContext *mainCtx,
+                       RpcIn_Callback dispatch,
+                       gpointer clientData);
+
+Bool RpcIn_start(RpcIn *in, unsigned int delay,
+                 RpcIn_ErrorFunc *errorFunc, void *errorData);
+
+#else
+
 /* Data passed to new-style RpcIn callbacks. */
 typedef struct RpcInData {
    /* Data from the host's RPC request. */
@@ -62,19 +70,8 @@ typedef struct RpcInData {
  * Type for RpcIn callbacks. The callback function is responsible for
  * allocating memory for the result string.
  */
-typedef Bool (*RpcIn_Callback)(RpcInData *data);
-
+typedef RpcInRet (*RpcIn_Callback)(RpcInData *data);
 
-#if defined(VMTOOLS_USE_GLIB)
-
-RpcIn *RpcIn_Construct(GMainContext *mainCtx,
-                       RpcIn_Callback dispatch,
-                       gpointer clientData);
-
-Bool RpcIn_start(RpcIn *in, unsigned int delay,
-                 RpcIn_ErrorFunc *errorFunc, void *errorData);
-
-#else
 
 /*
  * Type for old RpcIn callbacks. Don't use this anymore - this is here
@@ -105,13 +102,19 @@ void RpcIn_RegisterCallbackEx(RpcIn *in, const char *name,
                               RpcIn_Callback callback, void *clientData);
 void RpcIn_UnregisterCallback(RpcIn *in, const char *name);
 
+/* Helper macro for porting old callbacks that currently use RpcIn_SetRetVals. */
+#define RPCIN_SETRETVALS(data, val, retVal)                                \
+   RpcIn_SetRetVals((char const **) &(data)->result, &(data)->resultLen,   \
+                    (val), (retVal))
+
+unsigned int RpcIn_SetRetVals(char const **result, size_t *resultLen,
+                              const char *resultVal, Bool retVal);
+
 #endif
 
 void RpcIn_Destruct(RpcIn *in);
 Bool RpcIn_restart(RpcIn *in);
 Bool RpcIn_stop(RpcIn *in);
 
-unsigned int RpcIn_SetRetVals(char const **result, size_t *resultLen,
-                              const char *resultVal, Bool retVal);
 #endif /* __RPCIN_H__ */
 
index 16f2a63c80117a5652c004623e078ddfa8118a1b..ea35df76cbaedc51129e55f67e56c3a71ff5594a 100644 (file)
@@ -217,7 +217,7 @@ typedef struct ToolsAppCtx {
  *
  * @return TRUE if COM is initialized when the function returns.
  */
-static INLINE gboolean
+G_INLINE_FUNC gboolean
 ToolsCore_InitializeCOM(ToolsAppCtx *ctx)
 {
    if (!ctx->comInitialized) {
index 80dd801f8fa779afc70db7178d9f96e613dc213d..971f1e08bc166686789e2a39c960d66197ed24fd 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "vm_assert.h"
 #include "rpcChannelInt.h"
+#include "rpcin.h"
 #include "rpcout.h"
 #include "util.h"
 
@@ -94,7 +95,7 @@ RpcInStopChannel(RpcChannel *chan,
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 RpcInStart(RpcChannel *chan)
 {
    gboolean ret;
@@ -162,7 +163,7 @@ RpcInStop(RpcChannel *chan)
  * @return The status from the remote end (TRUE if call was successful).
  */
 
-static Bool
+static gboolean
 RpcInSend(RpcChannel *chan,
           char *data,
           size_t dataLen,
index a68023ef8caf193c860563684126ed5d8eb9fc01..3cc0c4d5aff4ee51c21af5724d76b6fe0126837a 100644 (file)
@@ -34,7 +34,7 @@
 /** Max number of times to attempt a channel restart. */
 #define RPCIN_MAX_RESTARTS 60
 
-static Bool
+static gboolean
 RpcChannelPing(RpcInData *data);
 
 static RpcChannelCallback gRpcHandlers[] =  {
@@ -50,7 +50,7 @@ static RpcChannelCallback gRpcHandlers[] =  {
  * @return TRUE.
  */
 
-static Bool
+static gboolean
 RpcChannelPing(RpcInData *data)
 {
    return RPCIN_SETRETVALS(data, "", TRUE);
@@ -144,7 +144,7 @@ exit:
  * @return TRUE.
  */
 
-static Bool
+static gboolean
 RpcChannelReset(RpcInData *data)
 {
    gchar *msg;
@@ -262,7 +262,7 @@ exit:
  * @return Whether successfully built the command.
  */
 
-Bool
+gboolean
 RpcChannel_BuildXdrCommand(const char *cmd,
                            void *xdrProc,
                            void *xdrData,
@@ -310,7 +310,7 @@ exit:
  * @return Whether the RPC was handled successfully.
  */
 
-Bool
+gboolean
 RpcChannel_Dispatch(RpcInData *data)
 {
    char *name = NULL;
@@ -470,6 +470,32 @@ RpcChannel_Setup(RpcChannel *chan,
 }
 
 
+
+/**
+ * Sets the result of the given RPC context to the given value. The result
+ * should be a NULL-terminated string.
+ *
+ * @param[in] data     RPC context.
+ * @param[in] result   Result string.
+ * @param[in] retVal   Return value of this function.
+ *
+ * @return @a retVal
+ */
+
+gboolean
+RpcChannel_SetRetVals(RpcInData *data,
+                      char *result,
+                      gboolean retVal)
+{
+   ASSERT(data);
+
+   data->result = result;
+   data->resultLen = strlen(data->result);
+
+   return retVal;
+}
+
+
 /**
  * Registers a new RPC handler in the given RPC channel. This function is
  * not thread-safe.
index 0f469b8b1bf7cf761b1b8a6d531a7d47f62a2c34..3fbd342de80706c1b50215740bd6eaca88826dbc 100644 (file)
@@ -44,7 +44,9 @@
 #   include "strutil.h"
 #endif
 
-
+#if defined(VMTOOLS_USE_GLIB)
+#  include "rpcChannel.h"
+#endif
 
 #include "vmware.h"
 #include "message.h"
@@ -910,6 +912,7 @@ RpcIn_restart(RpcIn *in)  // IN
 }
 
 
+#if !defined(VMTOOLS_USE_GLIB)
 /*
  *-----------------------------------------------------------------------------
  *
@@ -944,4 +947,4 @@ RpcIn_SetRetVals(char const **result,   // OUT
 
    return retVal;
 }
-
+#endif
index 9380aa432528defb4e4d034c473df13366664bac..f3fdb9d6319c67df6e65b1bdf16da739412bb0a4 100644 (file)
@@ -127,7 +127,7 @@ static void TweakGatherLoop(ToolsAppCtx *ctx);
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 GuestInfoVMSupport(RpcInData *data)
 {
 #if defined(_WIN32)
index 17c3a3c31a18678642f6d790ebdb2ed57c7ca26a..da72a75c49abadb30ab88997acfd453c22a03c6a 100644 (file)
@@ -88,7 +88,7 @@ HgfsChannel_Exit(void *data)
  * @return TRUE on success, FALSE on error.
  */
 
-static Bool
+static gboolean
 HgfsServerRpcInDispatch(RpcInData *data)
 {
    size_t packetSize;
index b0854ce7536f28e7dcbe8053c1b1bb314f8d92b0..ebc10fa9ae93d83818927fcb6a5421ab24805c6c 100644 (file)
@@ -390,7 +390,7 @@ PowerOpsRunScript(PowerOpState *state,
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 PowerOpsStateChange(RpcInData *data)
 {
    size_t i;
@@ -481,7 +481,7 @@ PowerOpsStateChange(RpcInData *data)
          }
 
          g_free(script);
-         return RPCIN_SETRETVALS(data, result, ret);
+         return RPCIN_SETRETVALS(data, (char *) result, ret);
       }
    }
 
index f78f4b1b19f74b052b63c6908202b21e94336f70..75631752c6c057c6bf33849128acb394c4f80f45 100644 (file)
@@ -65,14 +65,8 @@ ResolutionInfoType resolutionInfo;
  * Local function prototypes
  */
 
-static Bool ResolutionResolutionSetCB(RpcInData *data);
-static Bool ResolutionDisplayTopologySetCB(RpcInData *data);
 static void ResolutionSetServerCapability(unsigned int value);
 
-#if defined(RESOLUTION_WIN32)
-static Bool ResolutionDisplayTopologyModesSetCB(RpcInData *data);
-static Bool ResolutionChangeHost3DAvailabilityHintCB(RpcInData *data);
-#endif
 
 /*
  * Global function definitions
@@ -134,13 +128,13 @@ ResolutionCleanup(void)
  * @return TRUE if we can reply, FALSE otherwise.
  */
 
-static Bool
+static gboolean
 ResolutionResolutionSetCB(RpcInData *data)
 {
    uint32 width = 0 ;
    uint32 height = 0;
    unsigned int index = 0;
-   Bool retval = FALSE;
+   gboolean retval = FALSE;
 
    ResolutionInfoType *resInfo = &resolutionInfo;
 
@@ -176,11 +170,11 @@ invalid_arguments:
  * @return TRUE if we can reply, FALSE otherwise.
  */
 
-static Bool
+static gboolean
 ResolutionChangeHost3DAvailabilityHintCB(RpcInData *data)
 {
    unsigned int set;
-   Bool success = FALSE;
+   gboolean success = FALSE;
    unsigned int index = 0;
 
    Debug("%s: enter\n", __FUNCTION__);
@@ -218,7 +212,7 @@ ResolutionChangeHost3DAvailabilityHintCB(RpcInData *data)
  * @return TRUE if we can reply, FALSE otherwise.
  */
 
-static Bool
+static gboolean
 ResolutionDisplayTopologyModesSetCB(RpcInData *data)
 {
    DisplayTopologyInfo *displays = NULL;
@@ -226,7 +220,7 @@ ResolutionDisplayTopologyModesSetCB(RpcInData *data)
    unsigned int i;
    unsigned int cmd;
    unsigned int screen;
-   Bool success = FALSE;
+   gboolean success = FALSE;
    const char *p;
 
    Debug("%s: enter\n", __FUNCTION__);
@@ -297,12 +291,12 @@ out:
  * @return TRUE if we can reply, FALSE otherwise.
  */
 
-static Bool
+static gboolean
 ResolutionDisplayTopologySetCB(RpcInData *data)
 {
    DisplayTopologyInfo *displays = NULL;
    unsigned int count, i;
-   Bool success = FALSE;
+   gboolean success = FALSE;
    const char *p;
 
    ResolutionInfoType *resInfo = &resolutionInfo;
index 74c78cf8395c6c614e29f80c59d0f70cb063ca88..73bdd365bd8bf05898405de55636127ee8e5c427 100644 (file)
@@ -418,7 +418,7 @@ TimeSyncStartStopLoop(ToolsAppCtx *ctx,
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 TimeSyncTcloHandler(RpcInData *data)
 {
    Bool backwardSync = !strcmp(data->args, "1");
index e72af25b09d989fb0c24e6a58c292f33bb32e4ca..f9f4c2f7d7ce656c72ff801f1d0e114426f57ecf 100644 (file)
@@ -123,19 +123,17 @@ static char *ToolsDaemonTcloGetQuotedString(const char *args,
 static char * ToolsDaemonTcloGetEncodedQuotedString(const char *args,
                                                     const char **endOfArg);
 
-Bool ToolsDaemonTcloReceiveVixCommand(RpcInData *data);
+RpcInRet ToolsDaemonTcloReceiveVixCommand(RpcInData *data);
 
-#if !defined(N_PLAT_NLM)
-Bool ToolsDaemonHgfsImpersonated(RpcInData *data);
-#endif
+RpcInRet ToolsDaemonHgfsImpersonated(RpcInData *data);
 
 #if defined(linux) || defined(_WIN32)
-Bool ToolsDaemonTcloSyncDriverFreeze(RpcInData *data);
+RpcInRet ToolsDaemonTcloSyncDriverFreeze(RpcInData *data);
 
-Bool ToolsDaemonTcloSyncDriverThaw(RpcInData *data);
+RpcInRet ToolsDaemonTcloSyncDriverThaw(RpcInData *data);
 #endif
 
-Bool ToolsDaemonTcloMountHGFS(RpcInData *data);
+RpcInRet ToolsDaemonTcloMountHGFS(RpcInData *data);
 
 void ToolsDaemonTcloReportProgramCompleted(const char *requestName,
                                            VixError err,
@@ -171,7 +169,7 @@ static Bool thisProcessRunsAsRoot = FALSE;
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 FoundryToolsDaemonRunProgram(RpcInData *data) // IN
 {
    VixError err = VIX_OK;
@@ -285,7 +283,7 @@ abort:
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 FoundryToolsDaemonGetToolsProperties(RpcInData *data) // IN
 {
    VixError err = VIX_OK;
@@ -372,7 +370,7 @@ abort:
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonTcloCheckUserAccount(RpcInData *data) // IN
 {
    VixError err = VIX_OK;
@@ -699,7 +697,7 @@ ToolsDaemonTcloGetEncodedQuotedString(const char *args,      // IN
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonTcloOpenUrl(RpcInData *data) // IN
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
@@ -796,7 +794,7 @@ abort:
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonTcloSetPrinter(RpcInData *data) // IN
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
@@ -901,7 +899,7 @@ abort:
  */
 
 #if defined(linux) || defined(_WIN32)
-Bool
+RpcInRet
 ToolsDaemonTcloSyncDriverFreeze(RpcInData *data)
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
@@ -1068,7 +1066,7 @@ exit:
  */
 
 #if defined(linux) || defined(_WIN32)
-Bool
+RpcInRet
 ToolsDaemonTcloSyncDriverThaw(RpcInData *data) // IN
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
@@ -1371,7 +1369,7 @@ FoundryToolsDaemon_UnregisterSetPrinter(RpcIn *in) // IN
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonTcloMountHGFS(RpcInData *data) // IN
 {
    VixError err = VIX_OK;
@@ -1470,7 +1468,7 @@ ToolsDaemonTcloMountHGFS(RpcInData *data) // IN
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonHgfsImpersonated(RpcInData *data) // IN
 {
    VixError err;
@@ -1707,7 +1705,7 @@ ToolsDaemonTcloReportProgramCompleted(const char *requestName,    // IN
  *-----------------------------------------------------------------------------
  */
 
-Bool
+RpcInRet
 ToolsDaemonTcloReceiveVixCommand(RpcInData *data) // IN
 {
    VixError err = VIX_OK;
index 5381489768efa7ecfe6dcc58c20af6a668fd94af..3a36da3951c4b1e60f42f27f68462a1fcfc060c9 100644 (file)
 #define Warning      g_warning
 
 #include "vmtoolsApp.h"
+#include "rpcin.h"
 
-Bool
+RpcInRet
 ToolsDaemonTcloCheckUserAccount(RpcInData *data);
 
-Bool
+RpcInRet
 FoundryToolsDaemonGetToolsProperties(RpcInData *data);
 
-Bool
+RpcInRet
 ToolsDaemonHgfsImpersonated(RpcInData *data);
 
-Bool
+RpcInRet
 ToolsDaemonTcloMountHGFS(RpcInData *data);
 
-Bool
+RpcInRet
 ToolsDaemonTcloReceiveVixCommand(RpcInData *data);
 
-Bool
+RpcInRet
 FoundryToolsDaemonRunProgram(RpcInData *data);
 
 #if defined(linux) || defined(_WIN32)
-Bool
+RpcInRet
 ToolsDaemonTcloSyncDriverFreeze(RpcInData *data);
 
-Bool
+RpcInRet
 ToolsDaemonTcloSyncDriverThaw(RpcInData *data);
 #endif
 
index c424dd06405908a0ba7db8ea6d39afb83fea75fb..52471ccec5f57053dee5c6bd6792dfd1f58f048f 100644 (file)
@@ -161,7 +161,7 @@ ToolsDaemonTcloGetEncodedQuotedString(const char *args,
  * @return TRUE on success, FALSE on failure.
  */
 
-static Bool
+static gboolean
 VixUserOpenUrl(RpcInData *data)
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
@@ -232,7 +232,7 @@ abort:
  * @return TRUE on success, FALSE on failure.
  */
 
-static Bool
+static gboolean
 VixUserSetPrinter(RpcInData *data)
 {
    static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH];
index a9f3f7d5e55201ad94646b5d96d195d9fe874385..126eefc6a48d402a31b3a6e248340cc419aee655 100644 (file)
@@ -463,7 +463,7 @@ VmBackupEnableSync(void)
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 VmBackupStart(RpcInData *data)
 {
    g_debug("*** %s\n", __FUNCTION__);
@@ -521,7 +521,7 @@ VmBackupStart(RpcInData *data)
  * @return TRUE
  */
 
-static Bool
+static gboolean
 VmBackupAbort(RpcInData *data)
 {
    g_debug("*** %s\n", __FUNCTION__);
@@ -564,7 +564,7 @@ VmBackupAbort(RpcInData *data)
  * @return TRUE
  */
 
-static Bool
+static gboolean
 VmBackupSnapshotDone(RpcInData *data)
 {
    g_debug("*** %s\n", __FUNCTION__);
index 8ca3628c8d388e6d22eb3e40c9300f4927b52888..897901b4adb3ff6024e5bf976496a83816458edc 100644 (file)
@@ -96,7 +96,7 @@ ToolsCoreCheckReset(struct RpcChannel *chan,
  * @return TRUE.
  */
 
-static Bool
+static gboolean
 ToolsCoreRpcCapReg(RpcInData *data)
 {
    char *confPath = GuestApp_GetConfPath();
@@ -163,10 +163,10 @@ ToolsCoreRpcCapReg(RpcInData *data)
  *
  * @param[in]  data     The RPC data.
  *
- * @return TRUE.
+ * @return Whether the option was successfully processed.
  */
 
-static Bool
+static gboolean
 ToolsCoreRpcSetOption(RpcInData *data)
 {
 
@@ -204,7 +204,7 @@ exit:
    } else {
       RPCIN_SETRETVALS(data, "Unknown or invalid option", retVal);
    }
-   return (Bool) retVal;
+   return retVal;
 }
 
 
index 68e9abbc62cf3e3c8ea1169f23f6ba6e17231de8..2c9eeea6c106f132d31b6fa94e1dfe42d563c1ce 100644 (file)
@@ -47,7 +47,7 @@
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 TestPluginRpc1(RpcInData *data)
 {
    ToolsAppCtx *ctx = data->appCtx;
@@ -88,7 +88,7 @@ TestPluginRpc1(RpcInData *data)
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 TestPluginRpc2(RpcInData *data)
 {
    g_debug("%s: %s\n", __FUNCTION__, data->name);
@@ -105,7 +105,7 @@ TestPluginRpc2(RpcInData *data)
  * @return TRUE on success.
  */
 
-static Bool
+static gboolean
 TestPluginRpc3(RpcInData *data)
 {
    TestPluginData *ret;
index 3622467f1ba9b1de2cc3cecc3179e4336595adda..bc2782e4d18ca0b329ffc1b982ffad6fe4749195 100644 (file)
@@ -57,7 +57,7 @@ typedef struct DbgChannelData {
 static gboolean
 RpcDebugDispatch(gpointer _chan)
 {
-   Bool ret;
+   gboolean ret;
    RpcChannel *chan = _chan;
    DbgChannelData *cdata = chan->_private;
    RpcDebugPlugin *plugin = cdata->plugin;
@@ -86,7 +86,7 @@ RpcDebugDispatch(gpointer _chan)
 
    ret = RpcChannel_Dispatch(&data);
    if (rpcdata.validateFn != NULL) {
-      ret = (Bool) rpcdata.validateFn(&data, ret);
+      ret = rpcdata.validateFn(&data, ret);
    } else if (!ret) {
       g_debug("RpcChannel_Dispatch returned error for RPC.\n");
    }
@@ -119,7 +119,7 @@ RpcDebugDispatch(gpointer _chan)
  * @return TRUE.
  */
 
-static Bool
+static gboolean
 RpcDebugStart(RpcChannel *chan)
 {
    DbgChannelData *data = chan->_private;
@@ -170,7 +170,7 @@ RpcDebugStop(RpcChannel *chan)
  *         a validation function was not provided.
  */
 
-static Bool
+static gboolean
 RpcDebugSend(RpcChannel *chan,
              char *data,
              size_t dataLen,
@@ -182,7 +182,7 @@ RpcDebugSend(RpcChannel *chan,
    RpcDebugPlugin *plugin = ((DbgChannelData *)chan->_private)->plugin;
    RpcDebugRecvMapping *mapping = NULL;
    RpcDebugRecvFn recvFn = NULL;
-   Bool ret = TRUE;
+   gboolean ret = TRUE;
 
    g_assert(chan->appName != NULL);