19#ifndef _VMWARE_TOOLS_GDP_H_
20#define _VMWARE_TOOLS_GDP_H_
28#include <glib-object.h>
36#define GDP_MAX_PACKET_LEN (17 * 4096 - 24)
44#define GDP_USER_DATA_LEN (12 * 4096)
50#define TOOLS_PLUGIN_SVC_PROP_GDP "tps_prop_gdp"
56 GDP_ERR_ITEM(GDP_ERROR_SUCCESS = 0, \
58 GDP_ERR_ITEM(GDP_ERROR_INVALID_DATA, \
60 GDP_ERR_ITEM(GDP_ERROR_DATA_SIZE, \
61 "Data size too large") \
62 GDP_ERR_ITEM(GDP_ERROR_GENERAL, \
64 GDP_ERR_ITEM(GDP_ERROR_STOP, \
65 "Stopped for vmtoolsd shutdown") \
66 GDP_ERR_ITEM(GDP_ERROR_UNREACH, \
67 "Host daemon unreachable") \
68 GDP_ERR_ITEM(GDP_ERROR_TIMEOUT, \
69 "Operation timed out")
74#define GDP_ERR_ITEM(a, b) a,
75typedef enum GdpError {
88 GdpError (*publish)(gint64 createTime,
91 const gchar *category,
125static inline GdpError
130 const gchar *category,
136 g_object_get(ctx->
serviceObj, TOOLS_PLUGIN_SVC_PROP_GDP, &svcGdp, NULL);
137 if (svcGdp != NULL && svcGdp->publish != NULL) {
138 return svcGdp->publish(createTime, topic, token,
139 category, data, dataLen, cacheData);
141 return GDP_ERROR_GENERAL;
struct ToolsPluginSvcGdp ToolsPluginSvcGdp
Type of the public interface of the gdp plugin service.