Windows: AFSTearDownExtents may experience active extents
[openafs.git] / src / WINNT / afssvrmgr / agg_general.cpp
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 #include <winsock2.h>
11 #include <ws2tcpip.h>
12
13 extern "C" {
14 #include <afs/param.h>
15 #include <afs/stds.h>
16 }
17
18 #include "svrmgr.h"
19 #include "agg_general.h"
20 #include "svr_general.h"
21
22
23 /*
24  * PROTOTYPES _________________________________________________________________
25  *
26  */
27
28
29 /*
30  * AGGREGATE PREFERENCES ______________________________________________________
31  *
32  */
33
34 PVOID Aggregates_LoadPreferences (LPIDENT lpiAggregate)
35 {
36    LPAGGREGATE_PREF pap = New (AGGREGATE_PREF);
37
38    if (!RestorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF)))
39       {
40       pap->perWarnAggFull = -1; // use the server's default value
41       pap->fWarnAggAlloc = FALSE;
42
43       Alert_SetDefaults (&pap->oa);
44       }
45
46    Alert_Initialize (&pap->oa);
47    return pap;
48 }
49
50
51 BOOL Aggregates_SavePreferences (LPIDENT lpiAggregate)
52 {
53    BOOL rc = FALSE;
54
55    PVOID pap = lpiAggregate->GetUserParam();
56    if (pap != NULL)
57       {
58       rc = StorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF));
59       }
60
61    return rc;
62 }
63
64
65 /*
66  * ROUTINES ___________________________________________________________________
67  *
68  */
69
70 LPIDENT Aggregates_GetFocused (HWND hDlg)
71 {
72    return (LPIDENT)FL_GetFocusedData (GetDlgItem (hDlg, IDC_AGG_LIST));
73 }
74
75
76 LPIDENT Aggregates_GetSelected (HWND hDlg)
77 {
78    return (LPIDENT)FL_GetSelectedData (GetDlgItem (hDlg, IDC_AGG_LIST));
79 }
80