Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

attnmgr_common.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved.
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the entire contents of this file.
00016  *
00017  * The Initial Developer of the Original Code is ACCESS Systems Americas, Inc.
00018  *
00019  * Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All
00020  * Rights Reserved.
00021  * 
00022  * Contributor(s): none.
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 /* typedefs common for attention manager components */
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;    //<! Alert index (currently zero)
00100     uint32_t flags;    //<! Flags associated with alert (currently zero)
00101     char     handle[]; //<! Handle of alert associated with event
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  * These structures will probably be hidden in one of the
00129  * prv include files once the their proper scope is determined.
00130  */
00131 typedef struct _AlpAttnProperty AlpAttnProperty;
00132 struct _AlpAttnProperty {
00133     int32_t           itemType;
00134     AlpLuid           itemId;
00135     AlpAttnProperty  *next;
00136 
00137     /* property specific data */
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     /* alert specific data */
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 /* __ALP_ATTN_COMMON_H__ */

Generated on Sat Dec 16 20:29:47 2006 for hiker-0.9 by  doxygen 1.4.4