windows-build-updates-20030314
[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 extern "C" {
11 #include <afs/param.h>
12 #include <afs/stds.h>
13 }
14
15 #include "svrmgr.h"
16 #include "agg_general.h"
17 #include "svr_general.h"
18
19
20 /*
21  * PROTOTYPES _________________________________________________________________
22  *
23  */
24
25
26 /*
27  * AGGREGATE PREFERENCES ______________________________________________________
28  *
29  */
30
31 PVOID Aggregates_LoadPreferences (LPIDENT lpiAggregate)
32 {
33    LPAGGREGATE_PREF pap = New (AGGREGATE_PREF);
34
35    if (!RestorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF)))
36       {
37       pap->perWarnAggFull = -1; // use the server's default value
38       pap->fWarnAggAlloc = FALSE;
39
40       Alert_SetDefaults (&pap->oa);
41       }
42
43    Alert_Initialize (&pap->oa);
44    return pap;
45 }
46
47
48 BOOL Aggregates_SavePreferences (LPIDENT lpiAggregate)
49 {
50    BOOL rc = FALSE;
51
52    PVOID pap = lpiAggregate->GetUserParam();
53    if (pap != NULL)
54       {
55       rc = StorePreferences (lpiAggregate, pap, sizeof(AGGREGATE_PREF));
56       }
57
58    return rc;
59 }
60
61
62 /*
63  * ROUTINES ___________________________________________________________________
64  *
65  */
66
67 LPIDENT Aggregates_GetFocused (HWND hDlg)
68 {
69    return (LPIDENT)FL_GetFocusedData (GetDlgItem (hDlg, IDC_AGG_LIST));
70 }
71
72
73 LPIDENT Aggregates_GetSelected (HWND hDlg)
74 {
75    return (LPIDENT)FL_GetSelectedData (GetDlgItem (hDlg, IDC_AGG_LIST));
76 }
77