OpenClovis Logo

clAmsClientNotification.h
1 #ifndef _CL_AMS_CLIENT_NOTIFICATION_H_
2 #define _CL_AMS_CLIENT_NOTIFICATION_H_
3 
4 #include <clCommon.h>
5 #include <clBufferApi.h>
6 #include <clEventApi.h>
7 #include <clLogApi.h>
8 #include <clCpmApi.h>
9 #include <clAmsUtils.h>
10 #include <clAmsErrors.h>
11 #include <clAmsEntities.h>
12 #include <saAmf.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #define CL_AMS_EVENT_CHANNEL_NAME "AMS_EVENT_CHANNEL"
19 #define CL_AMS_EVENT_PATTERN "AMS_NOTIFICATION"
20 #define CL_AMS_EVENT_PUBLISHER_NAME "AMS_NOTIFICATION_MANAGER"
21 #define CL_AMS_EVENT_VERSION "B.01.01"
22 
23 typedef enum
24 {
25  CL_AMS_NOTIFICATION_NONE,
26  CL_AMS_NOTIFICATION_FAULT,
27  CL_AMS_NOTIFICATION_SU_INSTANTIATION_FAILURE,
28  CL_AMS_NOTIFICATION_SU_HA_STATE_CHANGE,
29  CL_AMS_NOTIFICATION_SI_FULLY_ASSIGNED,
30  CL_AMS_NOTIFICATION_SI_PARTIALLY_ASSIGNED,
31  CL_AMS_NOTIFICATION_SI_UNASSIGNED,
32  CL_AMS_NOTIFICATION_COMP_ARRIVAL,
33  CL_AMS_NOTIFICATION_COMP_DEPARTURE,
34  CL_AMS_NOTIFICATION_NODE_ARRIVAL,
35  CL_AMS_NOTIFICATION_NODE_DEPARTURE,
36  CL_AMS_NOTIFICATION_ENTITY_CREATE,
37  CL_AMS_NOTIFICATION_ENTITY_DELETE,
38  CL_AMS_NOTIFICATION_OPER_STATE_CHANGE,
39  CL_AMS_NOTIFICATION_ADMIN_STATE_CHANGE,
40  CL_AMS_NOTIFICATION_NODE_SWITCHOVER,
41  CL_AMS_NOTIFICATION_NODE_FAILOVER,
42  CL_AMS_NOTIFICATION_COMP_HA_STATE_CHANGE,
43  CL_AMS_NOTIFICATION_MAX,
44 }ClAmsNotificationTypeT;
45 
46 typedef struct
47 {
48  ClAmsNotificationTypeT type;
49  ClAmsEntityTypeT entityType;
50  SaNameT entityName;
51  SaNameT faultyCompName;
52  SaNameT siName;
53  SaNameT suName;
54  SaAmfHAStateT lastHAState;
55  SaAmfHAStateT newHAState;
56  SaAmfRecommendedRecoveryT recoveryActionTaken;
57  ClBoolT repairNecessary;
58  ClAmsOperStateT lastOperState;
59  ClAmsOperStateT newOperState;
60  ClAmsAdminStateT lastAdminState;
61  ClAmsAdminStateT newAdminState;
62 } ClAmsNotificationDescriptorT;
63 
64 typedef struct ClAmsNotificationInfo
65 {
66  ClAmsNotificationTypeT type;
67  union
68  {
69  ClAmsNotificationDescriptorT amsStateInfo;
70  ClCpmEventPayLoadT amsCompInfo;
71  ClCpmEventNodePayLoadT amsNodeInfo;
72  } amsNotificationInfo;
73 
74 #define amsStateNotification amsNotificationInfo.amsStateInfo
75 #define amsCompNotification amsNotificationInfo.amsCompInfo
76 #define amsNodeNotification amsNotificationInfo.amsNodeInfo
77 
78 }ClAmsNotificationInfoT;
79 
80 typedef ClRcT (*ClAmsClientNotificationCallbackT)(ClAmsNotificationInfoT *);
81 
82 ClRcT clAmsClientNotificationInitialize(ClAmsClientNotificationCallbackT callback);
83 
84 ClRcT clAmsClientNotificationFinalize(void);
85 
86 ClRcT clAmsNotificationEventPayloadExtract(ClEventHandleT eventHandle,
87  ClSizeT eventDataSize,
88  void *payLoad);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen