00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031 #ifndef __ALP_ATTN_COMMON_H__
00032 #define __ALP_ATTN_COMMON_H__
00033
00034 #include <time.h>
00035 #include <hiker/types.h>
00036 #include <hiker/sysclass.h>
00037
00041
00042
00043
00044 typedef AlpLuid AlpAttnId;
00045 typedef void *AlpAttnAlertH;
00046 typedef void *AlpAttnPropertyH;
00047
00053 #define ALP_STATUS_ATTN (ALP_CLASS_ATTN | 0x00010000)
00054 #define ALP_STATUS_ATTN_DML (ALP_CLASS_ATTN | 0x00020000)
00055 #define ALP_STATUS_ATTN_IPC (ALP_CLASS_ATTN | 0x00030000)
00056
00057
00062 #define ALP_STATUS_ATTN_BAD_PARAM (ALP_STATUS_ATTN | 0x00000100)
00063 #define ALP_STATUS_ATTN_NO_MEMORY (ALP_STATUS_ATTN | 0x00000200)
00064 #define ALP_STATUS_ATTN_INTERNAL_ERROR (ALP_STATUS_ATTN | 0x00000300)
00065 #define ALP_STATUS_ATTN_NOT_FOUND (ALP_STATUS_ATTN | 0x00000400)
00066
00067
00074 typedef enum {
00075 ALP_ATTN_PRIO_NONE = -1,
00076 ALP_ATTN_PRIO_1 = 1,
00077 ALP_ATTN_PRIO_2 = 2,
00078 ALP_ATTN_PRIO_3 = 3,
00079 ALP_ATTN_PRIO_4 = 4,
00080 ALP_ATTN_PRIO_5 = 5,
00081 ALP_ATTN_PRIO_NULL = 254,
00082 ALP_ATTN_PRIO_TEST = 255,
00083 } AlpAttnPriority;
00084
00085 #define ALP_ATTN_PRIO_MAX ALP_ATTN_PRIO_1
00086 #define ALP_ATTN_PRIO_MIN ALP_ATTN_PRIO_5
00087
00088 #define ALP_ATTN_PRIO_RANGE_LOWER 0
00089 #define ALP_ATTN_PRIO_RANGE_UPPER 255
00090
00091
00096 #define ALP_NOTIFY_EVENT_ATTN_ALERT "/alp/attn/alert/"
00097 typedef struct _AlpNotifyEventAttnAlert AlpNotifyEventAttnAlert;
00098 struct _AlpNotifyEventAttnAlert {
00099 uint32_t index;
00100 uint32_t flags;
00101 char handle[];
00102 };
00103
00104
00105
00106
00120 typedef struct _AlpAttnProp AlpAttnProp;
00121 struct _AlpAttnProp {
00122 const char *name;
00123 const void *value;
00124 };
00125
00126 #if 0
00127
00128
00129
00130
00131 typedef struct _AlpAttnProperty AlpAttnProperty;
00132 struct _AlpAttnProperty {
00133 int32_t itemType;
00134 AlpLuid itemId;
00135 AlpAttnProperty *next;
00136
00137
00138 AlpLuid alertId;
00139 const char *name;
00140 const char *value;
00141 };
00142
00143 typedef struct _AlpAttnAlert AlpAttnAlert;
00144 struct _AlpAttnAlert {
00145 int32_t itemType;
00146 AlpLuid itemId;
00147 AlpAttnAlert *next;
00148
00149
00150 time_t timestamp;
00151 bool pending;
00152 char *source;
00153 char *name;
00154 char *handle;
00155 char *interface;
00156 int32_t priority;
00157 int32_t duration;
00158 AlpAttnProperty *plist;
00159 };
00160 #endif
00161
00162
00163
00164 #endif