(file) Return to SubscriptionContext.h CVS log (file) (dir) Up to [OMI] / omi / provmgr

 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 _subscriptioncontext_h
26              #define _subscriptioncontext_h
27              
28              #include "context.h"
29              #include "provmgr.h"
30              #include "filter.h"
31              #include <common.h>
32              
33              BEGIN_EXTERNC
34              
35              struct _SubMgrSubscription;
36              
37              /*
38               * Subscription Context that wraps an MI_Context structure for handling
39               * user responses to indication operations.
40               */
41              struct _SubscriptionContext
42              {
43 krisbash 1.1     Context baseCtx;
44              
45                  struct _SubMgrSubscription* subscription;
46              
47                  void* subself; // subscriptionSelf pointer
48              
49              };
50              
51              MI_Result SubscrContext_Init(
52                  _Inout_ SubscriptionContext* subCtx,
53                  _In_ Provider* provider,
54                  _In_ Context_Type type,
55                  _Inout_ InteractionOpenParams* interactionParams,
56                  _Inout_ struct _SubMgrSubscription* subscription );
57              
58              void SubscrContext_Close( 
59                  _Pre_valid_ _Post_ptr_invalid_ SubscriptionContext* subCtx );
60              
61              MI_Result SubscrContext_SendFinalResultMsg(
62                  _In_ SubscriptionContext* subCtx,
63                  _In_ MI_Result result,
64 krisbash 1.1     _In_opt_z_ const ZChar* errorMessage,
65                  _In_opt_ const MI_Instance* cimError );
66              
67              MI_Result SubscrContext_SendSubscribeResponseMsg(
68                  _In_ SubscriptionContext* subCtx );
69                  
70              struct _SubMgrSubscription*  SubscrContext_GetSubscription(
71                  _In_ SubscriptionContext* subCtx );
72              
73              MI_Result SubscrContext_Unsubscribe(
74                  _In_ SubscriptionContext* subCtx);
75              
76              void SubscrContext_UnsubprvdOrSendfinalmsg(
77                  _In_ SubscriptionContext* subCtx,
78                  _In_ MI_Boolean invokeUnsubscribe,
79                  _In_ MI_Result finalResult);
80              
81              END_EXTERNC
82              
83              #endif /* _subscriptioncontext_h */

ViewCVS 0.9.2