(file) Return to interaction.c CVS log (file) (dir) Up to [OMI] / omi / base

 1 krisbash 1.1 /*
 2              **==============================================================================
 3              **
 4              ** Open Management Infrastructure (OMI)
 5              **
 6              ** Copyright (c) Microsoft Corporation
 7              ** 
 8              ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 9              ** use this file except in compliance with the License. You may obtain a copy 
10              ** of the License at 
11              **
12              **     http://www.apache.org/licenses/LICENSE-2.0 
13              **
14              ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15              ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
16              ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
17              ** MERCHANTABLITY OR NON-INFRINGEMENT. 
18              **
19              ** See the Apache 2 License for the specific language governing permissions 
20              ** and limitations under the License.
21              **
22 krisbash 1.1 **==============================================================================
23              */
24              #include <base/interaction.h>
25              
26              Interaction* Interaction_New(
27                  _In_ Batch *batch,
28                  _In_opt_ InteractionFT* ft,
29                  size_t structSize )
30              {
31                  Interaction* self;
32              
33                  DEBUG_ASSERT( NULL != batch );
34              
35                  /* Allocate heap space for Interaction */
36                  self = (Interaction*)Batch_Get(batch, structSize);
37              
38                  if (!self)
39                      return NULL;
40              
41                  /* Clear all fields */
42                  memset(self, 0, structSize);
43 krisbash 1.1 
44                  self->ft = ft;
45              
46                  return self;
47              }
48              

ViewCVS 0.9.2