00001 /****************************************************************************** 00002 * Copyright (c) 2006 PalmSource, Inc (an ACCESS company). All rights reserved. 00003 *****************************************************************************/ 00011 #ifndef ALP_PDK_GRAS_NOTIF_H_ 00012 #define ALP_PDK_GRAS_NOTIF_H_ 1 00013 00014 #include <hiker/types.h> 00015 #include <alp/pdk/gras.h> 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00027 /************************************************************ 00028 * Errors 00029 *************************************************************/ 00030 // ALP_BUILD is always defined when building in ALP. 00031 #ifndef ALP_BUILD 00032 #error This file is for ALP only 00033 #endif 00034 00035 /************************************************************ 00036 * Notifications 00037 *************************************************************/ 00038 00039 #define GRAS_NOTIFICATIONS "alp_gras" 00040 00041 typedef struct _AlpGRASDBChangeEventDetails AlpGRASDBChangeEventDetails; 00042 struct _AlpGRASDBChangeEventDetails { 00043 unsigned int db_type; 00044 unsigned int db_creator; 00045 char db_name[dmDBNameLength]; 00046 int storage; 00048 int creation; 00049 }; 00050 00052 #define ALP_NOTIFY_EVENT_GRAS_DB_CHANGE "/alp/gras/dbchange" 00053 #define ALP_NOTIFY_EVENT_GRAS_PATH_CHANGE "/alp/gras/pathchange" 00054 00055 #ifndef ALP_GRAS_DBENVELOP_NAME 00056 // These must stay in sync with <libraries/pal/pal_misc.h> 00057 #define ALP_GRAS_DBENVELOP_NAME 1 00058 #define ALP_GRAS_DBENVELOP_TYPE 2 00059 #define ALP_GRAS_DBENVELOP_CREATOR 4 00060 #define ALP_GRAS_DBENVELOP_ATTRIBUTES 8 00061 #define ALP_GRAS_DBENVELOP_VERSION 16 00062 00063 typedef struct _AlpGRASDBEnvelopChangeEventDetails AlpGRASDBEnvelopChangeEventDetails; 00064 struct _AlpGRASDBEnvelopChangeEventDetails { 00065 unsigned int changes; 00066 unsigned int type, old_type; 00067 unsigned int creator, old_creator; 00068 unsigned short attributes, old_attributes; 00069 unsigned short version; 00070 char name[dmDBNameLength], old_name[dmDBNameLength]; 00071 }; 00072 #endif 00073 00075 #define ALP_NOTIFY_EVENT_GRAS_DBENVELOP_CHANGE "/alp/gras/dbenvelop" 00076 #define ALP_NOTIFY_EVENT_GRAS_STORAGE_REMOVED "/alp/gras/storageremoved" 00077 00078 /* @} */ 00079 00080 #ifdef __cplusplus 00081 } 00082 #endif 00083 00084 #endif /* ALP_PDK_GRAS_NOTIF_H_ */