~n-muench/ubuntu/maverick/open-vm-tools/open-vm-tools.fix-632101

« back to all changes in this revision

Viewing changes to lib/include/rpcChannel.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-10-18 12:28:19 UTC
  • mfrom: (1.1.7 upstream) (2.4.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091018122819-00vqew6m0ztpqcqp
Tags: 2009.10.15-201664-1
MergingĀ upstreamĀ versionĀ 2009.10.15-201664.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
#include <rpc/rpc.h>
44
44
#include "vm_basic_types.h"
 
45
#include "vm_assert.h"
45
46
#include "rpcin.h"
46
47
 
47
48
struct RpcChannel;
115
116
 
116
117
 
117
118
/**
 
119
 * Wrapper for the start function of an RPC channel struct.
 
120
 *
 
121
 * @param[in]  chan        The RPC channel instance.
 
122
 *
 
123
 * @return TRUE on success.
 
124
 */
 
125
static INLINE Bool
 
126
RpcChannel_Start(RpcChannel *chan)
 
127
{
 
128
   ASSERT(chan != NULL);
 
129
   ASSERT(chan->start != NULL);
 
130
 
 
131
   return chan->start(chan);
 
132
}
 
133
 
 
134
 
 
135
/**
 
136
 * Wrapper for the stop function of an RPC channel struct.
 
137
 *
 
138
 * @param[in]  chan        The RPC channel instance.
 
139
 */
 
140
 
 
141
static INLINE void
 
142
RpcChannel_Stop(RpcChannel *chan)
 
143
{
 
144
   ASSERT(chan != NULL);
 
145
   ASSERT(chan->stop != NULL);
 
146
 
 
147
   chan->stop(chan);
 
148
}
 
149
 
 
150
/**
118
151
 * Wrapper for the send function of an RPC channel struct.
119
152
 *
120
153
 * @param[in]  chan        The RPC channel instance.
133
166
                char **result,
134
167
                size_t *resultLen)
135
168
{
 
169
   ASSERT(chan != NULL);
 
170
   ASSERT(chan->send != NULL);
 
171
 
136
172
   return chan->send(chan, data, dataLen, result, resultLen);
137
173
}
138
174