(file) Return to host.h CVS log (file) (dir) Up to [OMI] / omi / indication / indimgr

  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              
 25              #ifndef _indication_indimgr_host_h
 26              #define _indication_indimgr_host_h
 27              
 28              #include <common.h>
 29              #include <provreg/provreg.h>
 30              #include <base/interaction.h>
 31              
 32              BEGIN_EXTERNC
 33              
 34              /*
 35              **==============================================================================
 36              **
 37              ** IndicationManager calls this function to get ProvReg object
 38              **
 39              **==============================================================================
 40              */
 41              typedef ProvReg* (*fnGetProvReg)(_In_ void* context);
 42              
 43 krisbash 1.1 
 44              /*
 45              **==============================================================================
 46              **
 47              ** IndicationManager calls this function to handle requests
 48              **
 49              **==============================================================================
 50              */
 51              typedef void (*fnHandleRequest)(
 52                  _In_ void* context,
 53                  _Inout_ InteractionOpenParams* interactionParams, 
 54                  _In_ const ProvRegEntry* proventry);
 55              
 56              /*
 57              **==============================================================================
 58              **
 59              ** Represents a host of indication manager
 60              ** It provides runtime support for indication manager, such as
 61              **  ProvReg object;
 62              **  Handles the subscribe/unsubscribe request
 63              **
 64 krisbash 1.1 **==============================================================================
 65              */
 66              typedef struct _IndicationHost
 67              {
 68                  fnGetProvReg getProvReg;
 69                  fnHandleRequest handleRequest;
 70                  void* context;
 71              }IndicationHost;
 72              
 73              /*
 74              **==============================================================================
 75              ** Initialize host object from disp object
 76              **==============================================================================
 77              */
 78              int IndicationHost_InitFromDisp(
 79                  _In_ void* disp,
 80                  _Out_ IndicationHost* host);
 81              
 82              /*
 83              **==============================================================================
 84              ** Initialize host object from given context and functions
 85 krisbash 1.1 **==============================================================================
 86              */
 87              int IndicationHost_Init(
 88                  _In_ void* context,
 89                  _In_ fnGetProvReg getprovreg,
 90                  _In_ fnHandleRequest handlerequest,
 91                  _Out_ IndicationHost* host);
 92              
 93              /*
 94              **==============================================================================
 95              ** Get ProvReg object from host
 96              **==============================================================================
 97              */
 98              ProvReg* IndicationHost_GetProvReg(_In_ IndicationHost* host);
 99              
100              /*
101              **==============================================================================
102              ** Ask host to handle request
103              **==============================================================================
104              */
105              typedef struct _IndicationHost_Data
106 krisbash 1.1 {
107                  IndicationHost* host;
108                  const ProvRegEntry* proventry;
109              } IndicationHost_Data;
110              
111              void IndicationHost_HandleRequest(
112                  _Inout_ InteractionOpenParams* interactionParams );
113              
114              
115              END_EXTERNC
116              
117              #endif /* _indication_indimgr_host_h */

ViewCVS 0.9.2