open-vm-tools 12.2.5
guestStore.h
Go to the documentation of this file.
1/*********************************************************
2 * Copyright (C) 2020 VMware, Inc. All rights reserved.
3 *
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.
7 *
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.
12 *
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.
16 *
17 *********************************************************/
18
19#ifndef _GUESTSTORE_H_
20#define _GUESTSTORE_H_
21
31#include <glib-object.h>
32#include "vmware/tools/plugin.h"
33
41#define TOOLS_CORE_SIG_GUESTSTORE_STATE "tcs_gueststore_state"
42
43/*
44 * Property name of the guestStore plugin in the tools application context
45 * service object.
46 */
47#define TOOLS_PLUGIN_SVC_PROP_GUESTSTORE "tps_prop_gueststore"
48
56 void (*shutdown)(void);
58
59
60/*
61 ******************************************************************************
62 * ToolsPluginSvcGuestStore_Shutdown -- */
76static inline void
77ToolsPluginSvcGuestStore_Shutdown(ToolsAppCtx *ctx) // IN
78{
79 ToolsPluginSvcGuestStore *svcGuestStore = NULL;
80 g_object_get(ctx->serviceObj, TOOLS_PLUGIN_SVC_PROP_GUESTSTORE,
81 &svcGuestStore, NULL);
82 if (svcGuestStore != NULL && svcGuestStore->shutdown != NULL) {
83 svcGuestStore->shutdown();
84 }
85}
86
89#endif /* _GUESTSTORE_H_ */
struct ToolsPluginSvcGuestStore ToolsPluginSvcGuestStore
Type of the public interface of the guestStore plugin.
Definition: plugin.h:282
gpointer serviceObj
Definition: plugin.h:314
Type of the public interface of the guestStore plugin.
Definition: guestStore.h:55