2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
15 * DEFINITIONS ________________________________________________________________
21 #define cmsec1SECOND (1000L)
22 #define cmsec1MINUTE (cmsec1SECOND * 60L)
23 #define cmsec1HOUR (cmsec1MINUTE * 60L)
24 #define cmsec1DAY (cmsec1HOUR * 24L)
26 #define DEFAULT_SCOUT_REFRESH_RATE (1L * cmsec1HOUR)
30 alertINVALID = 0, // (end-of-list)
31 alertSECONDARY, // Server alerted because agg(etc) did
32 alertTIMEOUT, // Server could not be contacted
33 alertFULL, // Usage is above warning threshold
34 alertNO_VLDBENT, // Fileset has no VLDB entry
35 alertNO_SVRENT, // Fileset has no Server entry
36 alertSTOPPED, // Service stopped unexpectedly
37 alertBADCREDS, // May not be able to access FTSERVER
38 alertOVERALLOC, // Aggregate allocation exceeds capacity
39 alertSTATE_NO_VNODE, // Fileset has not VNode
40 alertSTATE_NO_SERVICE, // Fileset has no service
41 alertSTATE_OFFLINE, // Fileset is offline
57 SYSTEMTIME stLastAttempt;
76 SYSTEMTIME stLastError;
93 } ALERTINFO, *LPALERTINFO;
98 DWORD cTickRefresh; // zero indicates no auto-refresh
99 DWORD dwTickNextRefresh;
100 DWORD dwTickNextTest;
102 ALERTINFO aAlerts[ nAlertsMAX ];
103 } OBJECTALERTS, *LPOBJECTALERTS;
107 * PROTOTYPES _________________________________________________________________
111 LPOBJECTALERTS Alert_GetObjectAlerts (LPIDENT lpi, BOOL fAlwaysServer = FALSE, ULONG *pStatus = NULL);
113 void Alert_SetDefaults (LPOBJECTALERTS lpoa);
114 void Alert_Initialize (LPOBJECTALERTS lpoa);
115 void Alert_Scout_SetOutOfDate (LPIDENT lpi);
116 void Alert_Scout_ServerStatus (LPIDENT lpi, ULONG status);
118 size_t Alert_GetCount (LPIDENT lpi);
119 ALERT Alert_GetAlert (LPIDENT lpi, size_t iIndex);
120 LPIDENT Alert_GetIdent (LPIDENT lpi, size_t iIndex);
121 LPTSTR Alert_GetDescription (LPIDENT lpi, size_t iIndex, BOOL fFull);
122 LPTSTR Alert_GetRemedy (LPIDENT lpi, size_t iIndex);
123 LPTSTR Alert_GetButton (LPIDENT lpi, size_t iIndex);
124 LPTSTR Alert_GetQuickDescription (LPIDENT lpi);
126 void Alert_RemoveSecondary (LPIDENT lpiChild);
127 void Alert_Remove (LPIDENT lpi, size_t iIndex);
128 void Alert_AddPrimary (LPIDENT lpi, LPALERTINFO lpai);
130 BOOL Alert_StartScout (ULONG *pStatus = NULL);
132 BOOL Alert_Scout_QueueCheckServer (LPIDENT lpi, ULONG *pStatus = NULL);