OpenClovis Logo

saNtf.h
1 /*******************************************************************************
2 **
3 ** FILE:
4 ** saNtf.h
5 **
6 ** DESCRIPTION:
7 ** This file provides the C language binding for the Service
8 ** Availability(TM) Forum Notification Service (NTF).
9 ** It contains all of the prototypes and type definitions required
10 ** for user API functions
11 **
12 ** SPECIFICATION VERSION:
13 ** SAI-AIS-NTF-A.03.01
14 **
15 ** DATE:
16 ** Wed Oct 08 2008
17 **
18 ** LEGAL:
19 ** OWNERSHIP OF SPECIFICATION AND COPYRIGHTS.
20 **
21 ** Copyright 2008 by the Service Availability Forum. All rights reserved.
22 **
23 ** Permission to use, copy, modify, and distribute this software for any
24 ** purpose without fee is hereby granted, provided that this entire notice
25 ** is included in all copies of any software which is or includes a copy
26 ** or modification of this software and in all copies of the supporting
27 ** documentation for such software.
28 **
29 ** THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
30 ** WARRANTY. IN PARTICULAR, THE SERVICE AVAILABILITY FORUM DOES NOT MAKE ANY
31 ** REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
32 ** OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
33 **
34 *******************************************************************************/
35 
36 #ifndef _SA_NTF_H
37 #define _SA_NTF_H
38 
39 #include <saAis.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif /* __cplusplus */
44 
45 typedef SaUint64T SaNtfHandleT;
46 typedef SaUint64T SaNtfNotificationHandleT;
47 typedef SaUint64T SaNtfNotificationFilterHandleT;
48 typedef SaUint64T SaNtfReadHandleT;
49 
50 
51 typedef enum {
52  SA_NTF_TYPE_OBJECT_CREATE_DELETE = 0x1000,
53  SA_NTF_TYPE_ATTRIBUTE_CHANGE = 0x2000,
54  SA_NTF_TYPE_STATE_CHANGE = 0x3000,
55  SA_NTF_TYPE_ALARM = 0x4000,
56  SA_NTF_TYPE_SECURITY_ALARM = 0x5000,
57  SA_NTF_TYPE_MISCELLANEOUS = 0x6000
58 } SaNtfNotificationTypeT;
59 
60 /*
61  * Event types enum, these are only generic
62  * types as defined by the X.73x standards
63  */
64 #define SA_NTF_NOTIFICATIONS_TYPE_MASK 0xF000
65 
66 typedef enum {
67  SA_NTF_OBJECT_NOTIFICATIONS_START = SA_NTF_TYPE_OBJECT_CREATE_DELETE,
68  SA_NTF_OBJECT_CREATION,
69  SA_NTF_OBJECT_DELETION,
70 
71  SA_NTF_ATTRIBUTE_NOTIFICATIONS_START = SA_NTF_TYPE_ATTRIBUTE_CHANGE,
72  SA_NTF_ATTRIBUTE_ADDED,
73  SA_NTF_ATTRIBUTE_REMOVED,
74  SA_NTF_ATTRIBUTE_CHANGED,
75  SA_NTF_ATTRIBUTE_RESET,
76 
77  SA_NTF_STATE_CHANGE_NOTIFICATIONS_START = SA_NTF_TYPE_STATE_CHANGE,
78  SA_NTF_OBJECT_STATE_CHANGE,
79 
80  SA_NTF_ALARM_NOTIFICATIONS_START = SA_NTF_TYPE_ALARM,
81  SA_NTF_ALARM_COMMUNICATION,
82  SA_NTF_ALARM_QOS,
83  SA_NTF_ALARM_PROCESSING,
84  SA_NTF_ALARM_EQUIPMENT,
85  SA_NTF_ALARM_ENVIRONMENT,
86 
87  SA_NTF_SECURITY_ALARM_NOTIFICATIONS_START = SA_NTF_TYPE_SECURITY_ALARM,
88  SA_NTF_INTEGRITY_VIOLATION,
89  SA_NTF_OPERATION_VIOLATION,
90  SA_NTF_PHYSICAL_VIOLATION,
91  SA_NTF_SECURITY_SERVICE_VIOLATION,
92  SA_NTF_TIME_VIOLATION,
93 
94  SA_NTF_MISCELLANEOUS_NOTIFICATIONS_START = SA_NTF_TYPE_MISCELLANEOUS,
95  SA_NTF_APPLICATION_EVENT,
96  SA_NTF_ADMIN_OPERATION_START,
97  SA_NTF_ADMIN_OPERATION_END,
98  SA_NTF_CONFIG_UPDATE_START,
99  SA_NTF_CONFIG_UPDATE_END,
100  SA_NTF_ERROR_REPORT,
101  SA_NTF_ERROR_CLEAR,
102  SA_NTF_HPI_EVENT_RESOURCE,
103  SA_NTF_HPI_EVENT_SENSOR,
104  SA_NTF_HPI_EVENT_WATCHDOG,
105  SA_NTF_HPI_EVENT_DIMI,
106  SA_NTF_HPI_EVENT_FUMI,
107  SA_NTF_HPI_EVENT_OTHER
108 } SaNtfEventTypeT;
109 
110 #if defined(SA_NTF_A01) || defined(SA_NTF_A02)
111 typedef enum {
112  SA_NTF_TYPE_OBJECT_CREATE_DELETE_BIT = 0x0001,
113  SA_NTF_TYPE_ATTRIBUTE_CHANGE_BIT = 0x0002,
114  SA_NTF_TYPE_STATE_CHANGE_BIT = 0x0004,
115  SA_NTF_TYPE_ALARM_BIT = 0x0008,
116  SA_NTF_TYPE_SECURITY_ALARM_BIT = 0x0010
117 } SaNtfNotificationTypeBitsT;
118 #endif /* SA_NTF_A01 || SA_NTF_A02 */
119 
120 #define SA_NTF_OBJECT_CREATION_BIT 0x01
121 #define SA_NTF_OBJECT_DELETION_BIT 0x02
122 #define SA_NTF_ATTRIBUTE_ADDED_BIT 0x04
123 #define SA_NTF_ATTRIBUTE_REMOVED_BIT 0x08
124 #define SA_NTF_ATTRIBUTE_CHANGED_BIT 0x10
125 #define SA_NTF_ATTRIBUTE_RESET_BIT 0x20
126 #define SA_NTF_OBJECT_STATE_CHANGE_BIT 0x40
127 #define SA_NTF_ALARM_COMMUNICATION_BIT 0x80
128 #define SA_NTF_ALARM_QOS_BIT 0x100
129 #define SA_NTF_ALARM_PROCESSING_BIT 0x200
130 #define SA_NTF_ALARM_EQUIPMENT_BIT 0x400
131 #define SA_NTF_ALARM_ENVIRONMENT_BIT 0x800
132 #define SA_NTF_INTEGRITY_VIOLATION_BIT 0x1000
133 #define SA_NTF_OPERATION_VIOLATION_BIT 0x2000
134 #define SA_NTF_PHYSICAL_VIOLATION_BIT 0x4000
135 #define SA_NTF_SECURITY_SERVICE_VIOLATION_BIT 0x8000
136 #define SA_NTF_TIME_VIOLATION_BIT 0x10000
137 #define SA_NTF_ADMIN_OPERATION_START_BIT 0x20000
138 #define SA_NTF_ADMIN_OPERATION_END_BIT 0x40000
139 #define SA_NTF_CONFIG_UPDATE_START_BIT 0x80000
140 #define SA_NTF_CONFIG_UPDATE_END_BIT 0x100000
141 #define SA_NTF_ERROR_REPORT_BIT 0x200000
142 #define SA_NTF_ERROR_CLEAR_BIT 0x400000
143 #define SA_NTF_HPI_EVENT_RESOURCE_BIT 0x800000
144 #define SA_NTF_HPI_EVENT_SENSOR_BIT 0x1000000
145 #define SA_NTF_HPI_EVENT_WATCHDOG_BIT 0x2000000
146 #define SA_NTF_HPI_EVENT_DIMI_BIT 0x4000000
147 #define SA_NTF_HPI_EVENT_FUMI_BIT 0x8000000
148 #define SA_NTF_HPI_EVENT_OTHER_BIT 0x10000000
149 #define SA_NTF_APPLICATION_EVENT_BIT 0x100000000000
150 
151 typedef SaUint64T SaNtfEventTypeBitmapT;
152 
153 typedef struct {
154  SaUint32T vendorId;
155  SaUint16T majorId;
156  SaUint16T minorId;
157 } SaNtfClassIdT;
158 
159 #define SA_NTF_VENDOR_ID_SAF 18568
160 
161 typedef SaUint16T SaNtfElementIdT;
162 
163 typedef SaUint64T SaNtfIdentifierT;
164 
165 #define SA_NTF_IDENTIFIER_UNUSED ((SaNtfIdentifierT) 0LL)
166 
167 typedef struct {
168  SaNtfIdentifierT rootCorrelationId;
169  SaNtfIdentifierT parentCorrelationId;
170  SaNtfIdentifierT notificationId;
171 } SaNtfCorrelationIdsT;
172 
173 /* Initializing this enum to start with value 1, as the earlier value
174  * of 0 was causing issue during marshalling/unmarshalling the unused value types */
175 typedef enum {
176  SA_NTF_VALUE_UINT8 = 1, /* 1 byte long - unsigned int */
177  SA_NTF_VALUE_INT8, /* 1 byte long - signed int */
178  SA_NTF_VALUE_UINT16, /* 2 bytes long - unsigned int */
179  SA_NTF_VALUE_INT16, /* 2 bytes long - signed int */
180  SA_NTF_VALUE_UINT32, /* 4 bytes long - unsigned int */
181  SA_NTF_VALUE_INT32, /* 4 bytes long - signed int */
182  SA_NTF_VALUE_FLOAT, /* 4 bytes long - float */
183  SA_NTF_VALUE_UINT64, /* 8 bytes long - unsigned int */
184  SA_NTF_VALUE_INT64, /* 8 bytes long - signed int */
185  SA_NTF_VALUE_DOUBLE, /* 8 bytes long - double */
186  SA_NTF_VALUE_LDAP_NAME, /* SaNameT type */
187  SA_NTF_VALUE_STRING, /* '\0' terminated char array (UTF-8
188  encoded) */
189  SA_NTF_VALUE_IPADDRESS, /* IPv4 or IPv6 address as '\0' terminated
190  char array */
191  SA_NTF_VALUE_BINARY, /* Binary data stored in bytes - number of
192  bytes stored separately */
193  SA_NTF_VALUE_ARRAY /* Array of some data type - size of elements
194  and number of elements stored separately */
195 } SaNtfValueTypeT;
196 
197 typedef union {
198  SaUint8T uint8Val; /* SA_NTF_VALUE_UINT8 */
199  SaInt8T int8Val; /* SA_NTF_VALUE_INT8 */
200  SaUint16T uint16Val; /* SA_NTF_VALUE_UINT16 */
201  SaInt16T int16Val; /* SA_NTF_VALUE_INT16 */
202  SaUint32T uint32Val; /* SA_NTF_VALUE_UINT32 */
203  SaInt32T int32Val; /* SA_NTF_VALUE_INT32 */
204  SaFloatT floatVal; /* SA_NTF_VALUE_FLOAT */
205  SaUint64T uint64Val; /* SA_NTF_VALUE_UINT64 */
206  SaInt64T int64Val; /* SA_NTF_VALUE_INT64 */
207  SaDoubleT doubleVal; /* SA_NTF_VALUE_DOUBLE */
208 
209  /*
210  * This struct can represent variable length fields like
211  * LDAP names, strings, IP addresses and binary data.
212  * It may only be used in conjunction with the data type values
213  * SA_NTF_VALUE_LDAP_NAME, SA_NTF_VALUE_STRING,
214  * SA_NTF_VALUE_IPADDRESS and SA_NTF_VALUE_BINARY.
215  * This field shall not be directly accessed.
216  * To initialise this structure and to set a pointer to the real data
217  * use saNtfPtrValAllocate(). The function saNtfPtrValGet() shall be used
218  * for retrieval of the real data.
219  */
220  struct {
221  SaUint16T dataOffset;
222  SaUint16T dataSize;
223  } ptrVal;
224 
225  /*
226  * This struct represents sets of data of identical type
227  * like notification identifiers, attributes etc.
228  * It may only be used in conjunction with the data type value
229  * SA_NTF_VALUE_ARRAY. Functions
230  * SaNtfArrayValAllocate() or SaNtfArrayValGet() shall be used to
231  * get a pointer for accessing the real data. Direct access is not allowed.
232  */
233 
234  struct {
235  SaUint16T arrayOffset;
236  SaUint16T numElements;
237  SaUint16T elementSize;
238  } arrayVal;
239 
240 } SaNtfValueT;
241 
242 typedef struct {
243  SaNtfElementIdT infoId;
244  /* API user is expected to define this field */
245  SaNtfValueTypeT infoType;
246  SaNtfValueT infoValue;
247 } SaNtfAdditionalInfoT;
248 
249 typedef struct {
250  SaNtfEventTypeT *eventType;
251  SaNameT *notificationObject;
252  SaNameT *notifyingObject;
253  SaNtfClassIdT *notificationClassId;
254  SaTimeT *eventTime;
255  SaUint16T numCorrelatedNotifications;
256  SaUint16T lengthAdditionalText;
257  SaUint16T numAdditionalInfo;
258  SaNtfIdentifierT *notificationId;
259  SaNtfIdentifierT *correlatedNotifications;
260  SaStringT additionalText;
261  SaNtfAdditionalInfoT *additionalInfo;
262 } SaNtfNotificationHeaderT;
263 
264 typedef enum {
265  SA_NTF_OBJECT_OPERATION = 0,
266  SA_NTF_UNKNOWN_OPERATION = 1,
267  SA_NTF_MANAGEMENT_OPERATION = 2
268 } SaNtfSourceIndicatorT;
269 
270 typedef struct {
271  SaNtfElementIdT attributeId;
272  SaNtfValueTypeT attributeType;
273  SaBoolT oldAttributePresent;
274  SaNtfValueT oldAttributeValue;
275  SaNtfValueT newAttributeValue;
276 } SaNtfAttributeChangeT;
277 
278 typedef struct {
279  SaNtfNotificationHandleT notificationHandle;
280  SaNtfNotificationHeaderT notificationHeader;
281  SaUint16T numAttributes;
282  SaNtfSourceIndicatorT *sourceIndicator;
283  SaNtfAttributeChangeT *changedAttributes;
284 } SaNtfAttributeChangeNotificationT;
285 
286 typedef struct {
287  SaNtfElementIdT attributeId;
288  SaNtfValueTypeT attributeType;
289  SaNtfValueT attributeValue;
290 } SaNtfAttributeT;
291 
292 typedef struct {
293  SaNtfNotificationHandleT notificationHandle;
294  SaNtfNotificationHeaderT notificationHeader;
295  SaUint16T numAttributes;
296  SaNtfSourceIndicatorT *sourceIndicator;
297  SaNtfAttributeT *objectAttributes;
298 } SaNtfObjectCreateDeleteNotificationT;
299 
300 typedef struct {
301  SaNtfElementIdT stateId;
302  SaBoolT oldStatePresent;
303  SaUint16T oldState;
304  SaUint16T newState;
305 } SaNtfStateChangeT;
306 
307 typedef struct {
308  SaNtfNotificationHandleT notificationHandle;
309  SaNtfNotificationHeaderT notificationHeader;
310  SaUint16T numStateChanges;
311  SaNtfSourceIndicatorT *sourceIndicator;
312  SaNtfStateChangeT *changedStates;
313 } SaNtfStateChangeNotificationT;
314 
315 typedef enum {
316  SA_NTF_ADAPTER_ERROR,
317  SA_NTF_APPLICATION_SUBSYSTEM_FAILURE,
318  SA_NTF_BANDWIDTH_REDUCED,
319  SA_NTF_CALL_ESTABLISHMENT_ERROR,
320  SA_NTF_COMMUNICATIONS_PROTOCOL_ERROR,
321  SA_NTF_COMMUNICATIONS_SUBSYSTEM_FAILURE,
322  SA_NTF_CONFIGURATION_OR_CUSTOMIZATION_ERROR,
323  SA_NTF_CONGESTION,
324  SA_NTF_CORRUPT_DATA,
325  SA_NTF_CPU_CYCLES_LIMIT_EXCEEDED,
326  SA_NTF_DATASET_OR_MODEM_ERROR,
327  SA_NTF_DEGRADED_SIGNAL,
328  SA_NTF_D_T_E,
329  SA_NTF_ENCLOSURE_DOOR_OPEN,
330  SA_NTF_EQUIPMENT_MALFUNCTION,
331  SA_NTF_EXCESSIVE_VIBRATION,
332  SA_NTF_FILE_ERROR,
333  SA_NTF_FIRE_DETECTED,
334  SA_NTF_FLOOD_DETECTED,
335  SA_NTF_FRAMING_ERROR,
336  SA_NTF_HEATING_OR_VENTILATION_OR_COOLING_SYSTEM_PROBLEM,
337  SA_NTF_HUMIDITY_UNACCEPTABLE,
338  SA_NTF_INPUT_OUTPUT_DEVICE_ERROR,
339  SA_NTF_INPUT_DEVICE_ERROR,
340  SA_NTF_L_A_N_ERROR,
341  SA_NTF_LEAK_DETECTED,
342  SA_NTF_LOCAL_NODE_TRANSMISSION_ERROR,
343  SA_NTF_LOSS_OF_FRAME,
344  SA_NTF_LOSS_OF_SIGNAL,
345  SA_NTF_MATERIAL_SUPPLY_EXHAUSTED,
346  SA_NTF_MULTIPLEXER_PROBLEM,
347  SA_NTF_OUT_OF_MEMORY,
348  SA_NTF_OUTPUT_DEVICE_ERROR,
349  SA_NTF_PERFORMANCE_DEGRADED,
350  SA_NTF_POWER_PROBLEM,
351  SA_NTF_PRESSURE_UNACCEPTABLE,
352  SA_NTF_PROCESSOR_PROBLEM,
353  SA_NTF_PUMP_FAILURE,
354  SA_NTF_QUEUE_SIZE_EXCEEDED,
355  SA_NTF_RECEIVE_FAILURE,
356  SA_NTF_RECEIVER_FAILURE,
357  SA_NTF_REMOTE_NODE_TRANSMISSION_ERROR,
358  SA_NTF_RESOURCE_AT_OR_NEARING_CAPACITY,
359  SA_NTF_RESPONSE_TIME_EXCESSIVE,
360  SA_NTF_RETRANSMISSION_RATE_EXCESSIVE,
361  SA_NTF_SOFTWARE_ERROR,
362  SA_NTF_SOFTWARE_PROGRAM_ABNORMALLY_TERMINATED,
363  SA_NTF_SOFTWARE_PROGRAM_ERROR,
364  SA_NTF_STORAGE_CAPACITY_PROBLEM,
365  SA_NTF_TEMPERATURE_UNACCEPTABLE,
366  SA_NTF_THRESHOLD_CROSSED,
367  SA_NTF_TIMING_PROBLEM,
368  SA_NTF_TOXIC_LEAK_DETECTED,
369  SA_NTF_TRANSMIT_FAILURE,
370  SA_NTF_TRANSMITTER_FAILURE,
371  SA_NTF_UNDERLYING_RESOURCE_UNAVAILABLE,
372  SA_NTF_VERSION_MISMATCH,
373  SA_NTF_AUTHENTICATION_FAILURE,
374  SA_NTF_BREACH_OF_CONFIDENTIALITY,
375  SA_NTF_CABLE_TAMPER,
376  SA_NTF_DELAYED_INFORMATION,
377  SA_NTF_DENIAL_OF_SERVICE,
378  SA_NTF_DUPLICATE_INFORMATION,
379  SA_NTF_INFORMATION_MISSING,
380  SA_NTF_INFORMATION_MODIFICATION_DETECTED,
381  SA_NTF_INFORMATION_OUT_OF_SEQUENCE,
382  SA_NTF_INTRUSION_DETECTION,
383  SA_NTF_KEY_EXPIRED,
384  SA_NTF_NON_REPUDIATION_FAILURE,
385  SA_NTF_OUT_OF_HOURS_ACTIVITY,
386  SA_NTF_OUT_OF_SERVICE,
387  SA_NTF_PROCEDURAL_ERROR,
388  SA_NTF_UNAUTHORIZED_ACCESS_ATTEMPT,
389  SA_NTF_UNEXPECTED_INFORMATION,
390  SA_NTF_UNSPECIFIED_REASON
391 } SaNtfProbableCauseT;
392 
393 typedef struct {
394  SaNtfElementIdT problemId;
395  SaNtfClassIdT problemClassId;
396  SaNtfValueTypeT problemType;
397  SaNtfValueT problemValue;
398 } SaNtfSpecificProblemT;
399 
400 typedef enum {
401  SA_NTF_SEVERITY_CLEARED, /* alarm notification, only */
402  SA_NTF_SEVERITY_INDETERMINATE,
403  SA_NTF_SEVERITY_WARNING,
404  SA_NTF_SEVERITY_MINOR,
405  SA_NTF_SEVERITY_MAJOR,
406  SA_NTF_SEVERITY_CRITICAL
407 } SaNtfSeverityT;
408 
409 typedef enum {
410  SA_NTF_TREND_MORE_SEVERE,
411  SA_NTF_TREND_NO_CHANGE,
412  SA_NTF_TREND_LESS_SEVERE
413 } SaNtfSeverityTrendT;
414 
415 typedef struct {
416  SaNtfElementIdT thresholdId;
417  SaNtfValueTypeT thresholdValueType;
418  SaNtfValueT thresholdValue;
419  SaNtfValueT thresholdHysteresis;
420  /* This has to be of the same type as threshold */
421  SaNtfValueT observedValue;
422  SaTimeT armTime;
423 } SaNtfThresholdInformationT;
424 
425 typedef struct {
426  SaNtfElementIdT actionId;
427  SaNtfValueTypeT actionValueType;
428  SaNtfValueT actionValue;
429 } SaNtfProposedRepairActionT;
430 
431 typedef struct {
432  SaNtfNotificationHandleT notificationHandle;
433  SaNtfNotificationHeaderT notificationHeader;
434  SaUint16T numSpecificProblems;
435  SaUint16T numMonitoredAttributes;
436  SaUint16T numProposedRepairActions;
437  SaNtfProbableCauseT *probableCause;
438  SaNtfSpecificProblemT *specificProblems;
439  SaNtfSeverityT *perceivedSeverity;
440  SaNtfSeverityTrendT *trend;
441  SaNtfThresholdInformationT *thresholdInformation;
442  SaNtfAttributeT *monitoredAttributes;
443  SaNtfProposedRepairActionT *proposedRepairActions;
444 } SaNtfAlarmNotificationT;
445 
446 typedef struct {
447  SaNtfValueTypeT valueType;
448  SaNtfValueT value;
449 } SaNtfSecurityAlarmDetectorT;
450 
451 typedef struct {
452  SaNtfValueTypeT valueType;
453  SaNtfValueT value;
454 } SaNtfServiceUserT;
455 
456 typedef struct {
457  SaNtfNotificationHandleT notificationHandle;
458  SaNtfNotificationHeaderT notificationHeader;
459  SaNtfProbableCauseT *probableCause;
460  SaNtfSeverityT *severity;
461  SaNtfSecurityAlarmDetectorT *securityAlarmDetector;
462  SaNtfServiceUserT*serviceUser;
463  SaNtfServiceUserT *serviceProvider;
464 } SaNtfSecurityAlarmNotificationT;
465 
466 typedef struct {
467  SaNtfNotificationHandleT notificationHandle;
468  SaNtfNotificationHeaderT notificationHeader;
469 } SaNtfMiscellaneousNotificationT;
470 
471 /*
472  * Default for API user when not sure how much memory is in sum needed to
473  * accommodate the variable size data
474  */
475 #define SA_NTF_ALLOC_SYSTEM_LIMIT (-1)
476 
477 typedef SaUint32T SaNtfSubscriptionIdT;
478 
479 typedef struct {
480  SaUint16T numEventTypes;
481  SaNtfEventTypeT *eventTypes;
482  SaUint16T numNotificationObjects;
483  SaNameT *notificationObjects;
484  SaUint16T numNotifyingObjects;
485  SaNameT *notifyingObjects;
486  SaUint16T numNotificationClassIds;
487  SaNtfClassIdT *notificationClassIds;
488 } SaNtfNotificationFilterHeaderT;
489 
490 typedef struct {
491  SaNtfNotificationFilterHandleT notificationFilterHandle;
492  SaNtfNotificationFilterHeaderT notificationFilterHeader;
493  SaUint16T numSourceIndicators;
494  SaNtfSourceIndicatorT *sourceIndicators;
495 } SaNtfObjectCreateDeleteNotificationFilterT;
496 
497 typedef struct {
498  SaNtfNotificationFilterHandleT notificationFilterHandle;
499  SaNtfNotificationFilterHeaderT notificationFilterHeader;
500  SaUint16T numSourceIndicators;
501  SaNtfSourceIndicatorT *sourceIndicators;
502 } SaNtfAttributeChangeNotificationFilterT;
503 
504 #ifdef SA_NTF_A01
505 typedef struct {
506  SaNtfNotificationFilterHandleT notificationFilterHandle;
507  SaNtfNotificationFilterHeaderT notificationFilterHeader;
508  SaUint16T numSourceIndicators;
509  SaNtfSourceIndicatorT *sourceIndicators;
510  SaUint16T numStateChanges;
511  SaNtfStateChangeT *changedStates;
512 } SaNtfStateChangeNotificationFilterT;
513 #endif /* SA_NTF_A01 */
514 
515 typedef struct {
516  SaNtfNotificationFilterHandleT notificationFilterHandle;
517  SaNtfNotificationFilterHeaderT notificationFilterHeader;
518  SaUint16T numSourceIndicators;
519  SaNtfSourceIndicatorT *sourceIndicators;
520  SaUint16T numStateChanges;
521  SaNtfElementIdT *stateId;
522 } SaNtfStateChangeNotificationFilterT_2;
523 
524 typedef struct {
525  SaNtfNotificationFilterHandleT notificationFilterHandle;
526  SaNtfNotificationFilterHeaderT notificationFilterHeader;
527  SaUint16T numProbableCauses;
528  SaUint16T numPerceivedSeverities;
529  SaUint16T numTrends;
530  SaNtfProbableCauseT *probableCauses;
531  SaNtfSeverityT *perceivedSeverities;
532  SaNtfSeverityTrendT *trends;
533 } SaNtfAlarmNotificationFilterT;
534 
535 typedef struct {
536  SaNtfNotificationFilterHandleT notificationFilterHandle;
537  SaNtfNotificationFilterHeaderT notificationFilterHeader;
538  SaUint16T numProbableCauses;
539  SaUint16T numSeverities;
540  SaUint16T numSecurityAlarmDetectors;
541  SaUint16T numServiceUsers;
542  SaUint16T numServiceProviders;
543  SaNtfProbableCauseT *probableCauses;
544  SaNtfSeverityT *severities;
545  SaNtfSecurityAlarmDetectorT *securityAlarmDetectors;
546  SaNtfServiceUserT *serviceUsers;
547  SaNtfServiceUserT *serviceProviders;
548 } SaNtfSecurityAlarmNotificationFilterT;
549 
550 typedef struct {
551  SaNtfNotificationFilterHandleT notificationFilterHandle;
552  SaNtfNotificationFilterHeaderT notificationFilterHeader;
553 } SaNtfMiscellaneousNotificationFilterT;
554 
555 typedef enum {
556  SA_NTF_SEARCH_BEFORE_OR_AT_TIME = 1,
557  SA_NTF_SEARCH_AT_TIME = 2,
558  SA_NTF_SEARCH_AT_OR_AFTER_TIME = 3,
559  SA_NTF_SEARCH_BEFORE_TIME = 4,
560  SA_NTF_SEARCH_AFTER_TIME = 5,
561  SA_NTF_SEARCH_NOTIFICATION_ID = 6,
562  SA_NTF_SEARCH_ONLY_FILTER = 7
563 } SaNtfSearchModeT;
564 
565 typedef struct {
566  SaNtfSearchModeT searchMode;
567  SaTimeT eventTime;
568  /*
569  * event time (relevant only if searchMode is one of SA_NTF_SEARCH_*_TIME)
570  */
571 
572  SaNtfIdentifierT notificationId;
573  /*
574  * notification ID (relevant only if searchMode is
575  * SA_NTF_SEARCH_NOTIFICATION_ID)
576  */
577 } SaNtfSearchCriteriaT;
578 
579 typedef enum {
580  SA_NTF_SEARCH_OLDER = 1,
581  SA_NTF_SEARCH_YOUNGER = 2
582 } SaNtfSearchDirectionT;
583 
584 #if defined(SA_NTF_A01) || defined(SA_NTF_A02)
585 typedef struct {
586  SaNtfNotificationFilterHandleT objectCreateDeleteFilterHandle;
587  SaNtfNotificationFilterHandleT attributeChangeFilterHandle;
588  SaNtfNotificationFilterHandleT stateChangeFilterHandle;
589  SaNtfNotificationFilterHandleT alarmFilterHandle;
590  SaNtfNotificationFilterHandleT securityAlarmFilterHandle;
591 } SaNtfNotificationTypeFilterHandlesT;
592 #endif /* SA_NTF_A01 || SA_NTF_A02 */
593 
594 typedef struct {
595  SaNtfNotificationFilterHandleT objectCreateDeleteFilterHandle;
596  SaNtfNotificationFilterHandleT attributeChangeFilterHandle;
597  SaNtfNotificationFilterHandleT stateChangeFilterHandle;
598  SaNtfNotificationFilterHandleT alarmFilterHandle;
599  SaNtfNotificationFilterHandleT securityAlarmFilterHandle;
600  SaNtfNotificationFilterHandleT miscellaneousFilterHandle;
601 } SaNtfNotificationTypeFilterHandlesT_3;
602 
603 #define SA_NTF_FILTER_HANDLE_NULL ((SaNtfNotificationFilterHandleT) 0)
604 
605 typedef struct {
606  SaNtfNotificationTypeT notificationType;
607  union {
608  SaNtfObjectCreateDeleteNotificationT objectCreateDeleteNotification;
609  SaNtfAttributeChangeNotificationT attributeChangeNotification;
610  SaNtfStateChangeNotificationT stateChangeNotification;
611  SaNtfAlarmNotificationT alarmNotification;
612  SaNtfSecurityAlarmNotificationT securityAlarmNotification;
613  } notification;
614 } SaNtfNotificationsT;
615 
616 typedef enum {
617  SA_NTF_STATIC_FILTER_STATE = 1,
618  SA_NTF_SUBSCRIBER_STATE = 2,
619 } SaNtfStateT;
620 
621 typedef enum {
622  SA_NTF_STATIC_FILTER_STATE_INACTIVE = 1,
623  SA_NTF_STATIC_FILTER_STATE_ACTIVE = 2,
624 } SaNtfStaticFilterStateT;
625 
626 typedef enum {
627  SA_NTF_SUBSCRIBER_STATE_FORWARD_NOT_OK = 1,
628  SA_NTF_SUBSCRIBER_STATE_FORWARD_OK = 2,
629 } SaNtfSubscriberStateT;
630 
631 typedef enum {
632  SA_NTF_NTFID_STATIC_FILTER_ACTIVATED = 0x065,
633  SA_NTF_NTFID_STATIC_FILTER_DEACTIVATED = 0x066,
634  SA_NTF_NTFID_CONSUMER_SLOW = 0x067,
635  SA_NTF_NTFID_CONSUMER_FAST_ENOUGH = 0x068
636 } SaNtfNotificationMinorIdT;
637 
638 typedef void
639 (*SaNtfNotificationCallbackT)(
640  SaNtfSubscriptionIdT subscriptionId,
641  const SaNtfNotificationsT *notification);
642 
643 typedef void
644 (*SaNtfNotificationDiscardedCallbackT)(
645  SaNtfSubscriptionIdT subscriptionId,
646  SaNtfNotificationTypeT notificationType,
647  SaUint32T numberDiscarded,
648  const SaNtfIdentifierT *discardedNotificationIdentifiers);
649 
650 #ifdef SA_NTF_A01
651 typedef struct {
652  SaNtfNotificationCallbackT saNtfNotificationCallback;
653  SaNtfNotificationDiscardedCallbackT saNtfNotificationDiscardedCallback;
654 } SaNtfCallbacksT;
655 
656 extern SaAisErrorT
657 saNtfInitialize(
658  SaNtfHandleT *ntfHandle,
659  const SaNtfCallbacksT *ntfCallbacks,
660  SaVersionT *version);
661 
662 extern SaAisErrorT
663 saNtfLocalizedMessageFree(
664  SaStringT message);
665 
666 extern SaAisErrorT
667 saNtfStateChangeNotificationFilterAllocate(
668  SaNtfHandleT ntfHandle,
669  SaNtfStateChangeNotificationFilterT *notificationFilter,
670  SaUint16T numEventTypes,
671  SaUint16T numNotificationObjects,
672  SaUint16T numNotifyingObjects,
673  SaUint16T numNotificationClassIds,
674  SaUint32T numSourceIndicators,
675  SaUint32T numChangedStates);
676 
677 extern SaAisErrorT
678 saNtfNotificationUnsubscribe(
679  SaNtfSubscriptionIdT subscriptionId);
680 
681 extern SaAisErrorT
682 saNtfNotificationReadInitialize(
683  SaNtfSearchCriteriaT searchCriteria,
684  const SaNtfNotificationTypeFilterHandlesT *notificationFilterHandles,
685  SaNtfReadHandleT *readHandle);
686 #endif /* SA_NTF_A01 */
687 
688 #ifdef SA_NTF_A02
689 typedef void
690 (*SaNtfStaticSuppressionFilterSetCallbackT)(
691  SaNtfHandleT ntfHandle,
692  SaUint16T notificationTypeBitmap);
693 
694 typedef struct {
695  SaNtfNotificationCallbackT saNtfNotificationCallback;
696  SaNtfNotificationDiscardedCallbackT saNtfNotificationDiscardedCallback;
697  SaNtfStaticSuppressionFilterSetCallbackT
698  saNtfStaticSuppressionFilterSetCallback;
699 } SaNtfCallbacksT_2;
700 
701 extern SaAisErrorT
702 saNtfInitialize_2(
703  SaNtfHandleT *ntfHandle,
704  const SaNtfCallbacksT_2 *ntfCallbacks,
705  SaVersionT *version);
706 
707 extern SaAisErrorT
708 saNtfNotificationReadInitialize_2(
709  const SaNtfSearchCriteriaT *searchCriteria,
710  const SaNtfNotificationTypeFilterHandlesT *notificationFilterHandles,
711  SaNtfReadHandleT *readHandle);
712 #endif /* SA_NTF_A02 */
713 
714 #if defined(SA_NTF_A01) || defined(SA_NTF_A02)
715 extern SaAisErrorT
716 saNtfNotificationSubscribe(
717  const SaNtfNotificationTypeFilterHandlesT *notificationFilterHandles,
718  SaNtfSubscriptionIdT subscriptionId);
719 #endif /* SA_NTF_A01 || SA_NTF_A02 */
720 
721 typedef void
722 (*SaNtfStaticSuppressionFilterSetCallbackT_3)(
723  SaNtfHandleT ntfHandle,
724  SaNtfEventTypeBitmapT eventTypeBitmap);
725 
726 typedef struct {
727  SaNtfNotificationCallbackT saNtfNotificationCallback;
728  SaNtfNotificationDiscardedCallbackT saNtfNotificationDiscardedCallback;
729  SaNtfStaticSuppressionFilterSetCallbackT_3 saNtfStaticSuppressionFilterSetCallback;
730 } SaNtfCallbacksT_3;
731 
732 extern SaAisErrorT
733 saNtfInitialize_3(
734  SaNtfHandleT *ntfHandle,
735  const SaNtfCallbacksT_3 *ntfCallbacks,
736  SaVersionT *version);
737 
738 extern SaAisErrorT
739 saNtfSelectionObjectGet(
740  SaNtfHandleT ntfHandle,
741  SaSelectionObjectT *selectionObject);
742 
743 extern SaAisErrorT
744 saNtfDispatch(
745  SaNtfHandleT ntfHandle,
746  SaDispatchFlagsT dispatchFlags);
747 
748 extern SaAisErrorT
749 saNtfFinalize(
750  SaNtfHandleT ntfHandle);
751 
752 extern SaAisErrorT
753 saNtfObjectCreateDeleteNotificationAllocate(
754  SaNtfHandleT ntfHandle,
755  SaNtfObjectCreateDeleteNotificationT *notification,
756  SaUint16T numCorrelatedNotifications,
757  SaUint16T lengthAdditionalText,
758  SaUint16T numAdditionalInfo,
759  SaUint16T numAttributes,
760  SaInt16T variableDataSize);
761 
762 extern SaAisErrorT
763 saNtfAttributeChangeNotificationAllocate(
764  SaNtfHandleT ntfHandle,
765  SaNtfAttributeChangeNotificationT *notification,
766  SaUint16T numCorrelatedNotifications,
767  SaUint16T lengthAdditionalText,
768  SaUint16T numAdditionalInfo,
769  SaUint16T numAttributes,
770  SaInt16T variableDataSize);
771 
772 extern SaAisErrorT
773 saNtfStateChangeNotificationAllocate(
774  SaNtfHandleT ntfHandle,
775  SaNtfStateChangeNotificationT *notification,
776  SaUint16T numCorrelatedNotifications,
777  SaUint16T lengthAdditionalText,
778  SaUint16T numAdditionalInfo,
779  SaUint16T numStateChanges,
780  SaInt16T variableDataSize);
781 
782 extern SaAisErrorT
783 saNtfAlarmNotificationAllocate(
784  SaNtfHandleT ntfHandle,
785  SaNtfAlarmNotificationT *notification,
786  SaUint16T numCorrelatedNotifications,
787  SaUint16T lengthAdditionalText,
788  SaUint16T numAdditionalInfo,
789  SaUint16T numSpecificProblems,
790  SaUint16T numMonitoredAttributes,
791  SaUint16T numProposedRepairActions,
792  SaInt16T variableDataSize);
793 
794 extern SaAisErrorT
795 saNtfSecurityAlarmNotificationAllocate(
796  SaNtfHandleT ntfHandle,
797  SaNtfSecurityAlarmNotificationT *notification,
798  SaUint16T numCorrelatedNotifications,
799  SaUint16T lengthAdditionalText,
800  SaUint16T numAdditionalInfo,
801  SaInt16T variableDataSize);
802 
803 extern SaAisErrorT
804 saNtfPtrValAllocate(
805  SaNtfNotificationHandleT notificationHandle,
806  SaUint16T dataSize,
807  void **dataPtr,
808  SaNtfValueT *value);
809 
810 extern SaAisErrorT
811 saNtfArrayValAllocate(
812  SaNtfNotificationHandleT notificationHandle,
813  SaUint16T numElements,
814  SaUint16T elementSize,
815  void **arrayPtr,
816  SaNtfValueT *value);
817 
818 extern SaAisErrorT
819 saNtfNotificationSend(
820  SaNtfNotificationHandleT notificationHandle);
821 
822 extern SaAisErrorT
823 saNtfNotificationFree(
824  SaNtfNotificationHandleT notificationHandle);
825 
826 extern SaAisErrorT
827 saNtfVariableDataSizeGet(
828  SaNtfNotificationHandleT notificationHandle,
829  SaUint16T *variableDataSpaceAvailable);
830 
831 extern SaAisErrorT
832 saNtfLocalizedMessageGet(
833  SaNtfNotificationHandleT notificationHandle,
834  SaStringT *message);
835 
836 extern SaAisErrorT
837 saNtfLocalizedMessageFree_2(
838  SaNtfHandleT ntfHandle,
839  SaStringT message);
840 
841 extern SaAisErrorT saNtfPtrValGet(
842  SaNtfNotificationHandleT notificationHandle,
843  SaNtfValueT *value,
844  void **dataPtr,
845  SaUint16T *dataSize);
846 
847 extern SaAisErrorT
848 saNtfArrayValGet(
849  SaNtfNotificationHandleT notificationHandle,
850  SaNtfValueT *value,
851  void **arrayPtr,
852  SaUint16T *numElements,
853  SaUint16T *elementSize);
854 
855 extern SaAisErrorT
856 saNtfObjectCreateDeleteNotificationFilterAllocate(
857  SaNtfHandleT ntfHandle,
858  SaNtfObjectCreateDeleteNotificationFilterT *notificationFilter,
859  SaUint16T numEventTypes,
860  SaUint16T numNotificationObjects,
861  SaUint16T numNotifyingObjects,
862  SaUint16T numNotificationClassIds,
863  SaUint16T numSourceIndicators);
864 
865 extern SaAisErrorT
866 saNtfAttributeChangeNotificationFilterAllocate(
867  SaNtfHandleT ntfHandle,
868  SaNtfAttributeChangeNotificationFilterT *notificationFilter,
869  SaUint16T numEventTypes,
870  SaUint16T numNotificationObjects,
871  SaUint16T numNotifyingObjects,
872  SaUint16T numNotificationClassIds,
873  SaUint32T numSourceIndicators);
874 
875 extern SaAisErrorT
876 saNtfStateChangeNotificationFilterAllocate_2(
877  SaNtfHandleT ntfHandle,
878  SaNtfStateChangeNotificationFilterT_2 *notificationFilter,
879  SaUint16T numEventTypes,
880  SaUint16T numNotificationObjects,
881  SaUint16T numNotifyingObjects,
882  SaUint16T numNotificationClassIds,
883  SaUint32T numSourceIndicators,
884  SaUint32T numChangedStates);
885 
886 extern SaAisErrorT
887 saNtfAlarmNotificationFilterAllocate(
888  SaNtfHandleT ntfHandle,
889  SaNtfAlarmNotificationFilterT *notificationFilter,
890  SaUint16T numEventTypes,
891  SaUint16T numNotificationObjects,
892  SaUint16T numNotifyingObjects,
893  SaUint16T numNotificationClassIds,
894  SaUint32T numProbableCauses,
895  SaUint32T numPerceivedSeverities,
896  SaUint32T numTrends);
897 
898 extern SaAisErrorT
899 saNtfSecurityAlarmNotificationFilterAllocate(
900  SaNtfHandleT ntfHandle,
901  SaNtfSecurityAlarmNotificationFilterT *notificationFilter,
902  SaUint16T numEventTypes,
903  SaUint16T numNotificationObjects,
904  SaUint16T numNotifyingObjects,
905  SaUint16T numNotificationClassIds,
906  SaUint32T numProbableCauses,
907  SaUint32T numSeverities,
908  SaUint32T numSecurityAlarmDetectors,
909  SaUint32T numServiceUsers,
910  SaUint32T numServiceProviders);
911 
912 extern SaAisErrorT
913 saNtfNotificationFilterFree(
914  SaNtfNotificationFilterHandleT notificationFilterHandle);
915 
916 extern SaAisErrorT
917 saNtfNotificationSubscribe_3(
918  const SaNtfNotificationTypeFilterHandlesT_3 *notificationFilterHandles,
919  SaNtfSubscriptionIdT subscriptionId);
920 
921 extern SaAisErrorT
922 saNtfNotificationReadInitialize_3(
923  const SaNtfSearchCriteriaT *searchCriteria,
924  const SaNtfNotificationTypeFilterHandlesT_3 *notificationFilterHandles,
925  SaNtfReadHandleT *readHandle);
926 
927 extern SaAisErrorT
928 saNtfNotificationUnsubscribe_2(
929  SaNtfHandleT ntfHandle,
930  SaNtfSubscriptionIdT subscriptionId);
931 
932 extern SaAisErrorT
933 saNtfNotificationReadNext(
934  SaNtfReadHandleT readHandle,
935  SaNtfSearchDirectionT searchDirection,
936  SaNtfNotificationsT *notification);
937 
938 extern
939 SaAisErrorT saNtfNotificationReadFinalize(
940  SaNtfReadHandleT readHandle);
941 
942 #ifdef __cplusplus
943 }
944 #endif /* __cplusplus */
945 
946 #endif /* _SA_NTF_H */
947 

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