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

 1 mike  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 mike  1.1 **==============================================================================
23           */
24           
25           #ifndef _context_h
26           #define _context_h
27           
28           #include <common.h>
29           #include <base/base.h>
30           #include "provmgr.h"
31           
32           BEGIN_EXTERNC
33           
34           typedef enum _Context_Type
35           {
36               CTX_TYPE_SINGLE_ITEM = 0,   /* regular execution, post results to the caller */
37               CTX_TYPE_IND_NOTINITIALIZED,    /* un-initialized indication context */
38               CTX_TYPE_IND_READY,             /* indication context that is ready for operation */
39               CTX_TYPE_INVOKE_WITH_INSTANCE   /* calling get before invoke - call invoke with result instance */
40           }
41           Context_Type;
42           
43 mike  1.1 typedef struct _Context
44           {
45               MI_Context base;
46               MI_Uint32 magic;
47           
48               /* Pointer to the request message (containing the callback) */
49               Message* request;
50           
51               /* chain processing */
52               Context_Type    chainType;
53           
54               /* delayed invoke parameters */
55               MI_MethodDecl* md;
56               MI_Instance* inst;
57               MI_Instance* instParams;
58               void * prov_self;
59           
60               /* Cancelled flag */
61               MI_Boolean cancelled;
62           
63               /* Reference to Provider */
64 mike  1.1     Provider*   provider;
65           
66               /* Result to caller */
67               MI_Result*  result;
68           
69               /* If non-null, PostInstance() only forwards 1st matching instance. */
70               MI_Instance* instanceName;
71           
72               /* Whether instanceName has been matched yet. */
73               MI_Boolean matchedInstanceName;
74           }
75           Context;
76           
77           void Context_Init(
78               Context* self,
79               Provider*   provider);
80           
81           void Context_Destroy(
82               Context* self);
83           
84           extern MI_ContextFT __mi_contextFT;
85 mike  1.1 
86           END_EXTERNC
87           
88           #endif /* _context_h */

ViewCVS 0.9.2