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 _omi_disp_h
26 #define _omi_disp_h
27
28 #include <common.h>
29 #include <base/base.h>
30 #include <base/messages.h>
31 #include <provreg/provreg.h>
32 #include <provmgr/provmgr.h>
33 #include <protocol/thread.h>
34 #include "agentmgr.h"
35
36 /*
37 **==============================================================================
38 **
39 ** Disp
40 **
41 ** This type implements the CIM server dispatcher module, which:
42 **
43 mike 1.1 ** (1) Accepts request messages (and a response callback).
44 **
45 ** (2) Creates sub-messages using the class relationships expressed
46 ** in the provider registry.
47 **
48 ** (3) Delegates messages and a response callback to the provider
49 ** manager.
50 **
51 ** (4) Accepts response messages and routes them back to the requestor.
52 **
53 **==============================================================================
54 */
55
56 typedef struct _Disp
57 {
58 ProvReg provreg;
59 AgentMgr agentmgr;
60
61 /* subscription part */
62 /* next id - whenever it needed */
63 MI_Uint64 nextID;
64 mike 1.1 Mutex mt;
65 /* Linked list of indication provider contexts - one per ns/cn pair */
66 ListElem* headIndCtx;
67 ListElem* tailIndCtx;
68
69 }
70 Disp;
71
72 MI_Result Disp_Init(
73 Disp* self,
74 Selector* selector);
75
76 MI_Result Disp_Destroy(
77 Disp* self);
78
79 MI_Result Disp_HandleRequest(
80 Disp* self,
81 Message* msg);
82
83 #endif /* _omi_disp_h */
|