open-vm-tools 2013.09.16
Main Page
Modules
Data Structures
Files
File List
Globals
lib
include
vmware
tools
rpcdebug.h
Go to the documentation of this file.
1
/*********************************************************
2
* Copyright (C) 2008 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 _VMWARE_TOOLS_RPCDEBUG_H_
20
#define _VMWARE_TOOLS_RPCDEBUG_H_
21
32
#include "
vmware/tools/plugin.h
"
33
34
41
#define RPCDEBUG_ASSERT(test, retval) do { \
42
CU_ASSERT(test); \
43
g_return_val_if_fail(test, retval); \
44
} while (0)
45
46
47
struct
RpcDebugPlugin
;
48
53
typedef
gboolean (*
RpcDebugRecvFn
)(
char
*data,
54
size_t
dataLen,
55
char
**result,
56
size_t
*resultLen);
57
59
typedef
struct
RpcDebugRecvMapping
{
60
gchar *name;
61
RpcDebugRecvFn
recvFn;
66
gpointer
xdrProc
;
68
size_t
xdrSize
;
69
}
RpcDebugRecvMapping
;
70
71
77
typedef
gboolean (*
RpcDebugValidateFn
)(
RpcInData
*data,
78
gboolean ret);
79
81
typedef
struct
RpcDebugMsgMapping
{
82
gchar *message;
83
size_t
messageLen;
84
RpcDebugValidateFn
validateFn;
85
gboolean freeMsg;
86
}
RpcDebugMsgMapping
;
87
89
typedef
struct
RpcDebugMsgList
{
90
RpcDebugMsgMapping
*mappings;
91
size_t
index;
92
}
RpcDebugMsgList
;
93
94
102
typedef
gboolean (*
RpcDebugSendFn
)(
RpcDebugMsgMapping
*rpcdata);
103
105
typedef
void (*
RpcDebugShutdownFn
)(
ToolsAppCtx
*ctx,
106
struct
RpcDebugPlugin
*
plugin
);
107
112
typedef
struct
RpcDebugPlugin
{
114
RpcDebugRecvMapping
*
recvFns
;
119
RpcDebugRecvFn
dfltRecvFn
;
121
RpcDebugSendFn
sendFn
;
123
RpcDebugShutdownFn
shutdownFn
;
125
ToolsPluginData
*
plugin
;
126
}
RpcDebugPlugin
;
127
128
133
typedef
RpcDebugPlugin
*(*RpcDebugOnLoadFn)(
ToolsAppCtx
*ctx);
134
135
struct
RpcDebugLibData
;
136
142
typedef
struct
RpcDebugLibData
{
143
RpcChannel * (*newDebugChannel) (
ToolsAppCtx
*,
144
struct
RpcDebugLibData
*);
145
int (*run) (
ToolsAppCtx
*,
146
gpointer runMainLoop,
147
gpointer runData,
148
struct
RpcDebugLibData
*);
149
RpcDebugPlugin
*debugPlugin;
150
}
RpcDebugLibData
;
151
153
typedef
RpcDebugLibData
*(* RpcDebugInitializeFn)(
ToolsAppCtx
*, gchar *);
154
155
156
G_BEGIN_DECLS
157
158
void
159
RpcDebug_DecRef
(
ToolsAppCtx
*ctx);
160
161
void
162
RpcDebug_IncRef
(
void
);
163
164
RpcDebugLibData
*
165
RpcDebug_Initialize
(
ToolsAppCtx
*ctx,
166
gchar *dbgPlugin);
167
168
gboolean
169
RpcDebug_SendNext
(
RpcDebugMsgMapping
*rpcdata,
170
RpcDebugMsgList
*list);
171
172
void
173
RpcDebug_SetResult
(
const
char
*str,
174
char
**res,
175
size_t
*len);
176
177
G_END_DECLS
178
181
#endif
/* _VMWARE_TOOLS_RPCDEBUG_H_ */
182
Generated on Thu Oct 10 2013 10:53:51 for open-vm-tools 2013.09.16 by
1.8.4