guestStore.h
Go to the documentation of this file.
/*********************************************************
* Copyright (c) 2020,2023 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 _GUESTSTORE_H_
#define _GUESTSTORE_H_
/*
* glib-object.h should not be placed inside `extern "C"' blocks.
* However, this header is often placed inside such blocks.
* Here we change back into C++ for glib-object.h
*/
#ifdef __cplusplus
extern "C++" {
#endif
#include <glib-object.h>
#ifdef __cplusplus
}
#endif
#include "vmware/tools/plugin.h"
#define TOOLS_CORE_SIG_GUESTSTORE_STATE "tcs_gueststore_state"
/*
* Property name of the guestStore plugin in the tools application context
* service object.
*/
#define TOOLS_PLUGIN_SVC_PROP_GUESTSTORE "tps_prop_gueststore"
typedef struct ToolsPluginSvcGuestStore {
void (*shutdown)(void);
} ToolsPluginSvcGuestStore;
/*
******************************************************************************
* ToolsPluginSvcGuestStore_Shutdown -- */
static inline void
ToolsPluginSvcGuestStore_Shutdown(ToolsAppCtx *ctx) // IN
{
ToolsPluginSvcGuestStore *svcGuestStore = NULL;
g_object_get(ctx->serviceObj, TOOLS_PLUGIN_SVC_PROP_GUESTSTORE,
&svcGuestStore, NULL);
if (svcGuestStore != NULL && svcGuestStore->shutdown != NULL) {
svcGuestStore->shutdown();
}
}
#endif /* _GUESTSTORE_H_ */
plugin.h
ToolsAppCtx
Definition plugin.h:307
ToolsPluginSvcGuestStore
Type of the public interface of the guestStore plugin.
Definition guestStore.h:67